Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update link checker exclude patterns #73

Merged
merged 6 commits into from
Dec 18, 2023

Conversation

joshuali925
Copy link
Member

@joshuali925 joshuali925 commented Dec 13, 2023

Description

  • exclude urls that end with '$', which are regexes
  • remove unnecessary cloning of whole OSD repo

Issues Resolved

partially #72

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Dec 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (afc1a86) 58.67% compared to head (baa1ab9) 74.29%.
Report is 13 commits behind head on main.

❗ Current head baa1ab9 differs from pull request most recent head a0f8e6b. Consider uploading reports for the commit a0f8e6b to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #73       +/-   ##
===========================================
+ Coverage   58.67%   74.29%   +15.61%     
===========================================
  Files          46       43        -3     
  Lines        1089     1023       -66     
  Branches      252      238       -14     
===========================================
+ Hits          639      760      +121     
+ Misses        441      262      -179     
+ Partials        9        1        -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

.github/workflows/links_checker.yml Outdated Show resolved Hide resolved
- name: Load Excludes
run: |
LYCHEE_EXCLUDE=$(sed -e :a -e 'N;s/\n/ --exclude /;ta' OpenSearch-Dashboards/.lycheeexclude)
LYCHEE_EXCLUDE=$(curl -fsSL https://raw.githubusercontent.com/opensearch-project/OpenSearch-Dashboards/HEAD/.lycheeexclude | cat - .lycheeexclude | grep -v '^#\|^$' | sed -e :a -e 'N;s/\n/ --exclude /;ta')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we have a repo-specific .lycheeexclude instead of rely on the external? I guess we can start with a small list of .lycheeexclude first?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's already in the PR

# exclude regexes
https?://.+\$$
https://bedrock-runtime.*.amazonaws.com/*
https://link

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but do we still need to download from https://raw.githubusercontent.com/opensearch-project/OpenSearch-Dashboards/HEAD/.lycheeexclude?

Copy link
Collaborator

@Hailong-am Hailong-am Dec 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but do we still need to download from https://raw.githubusercontent.com/opensearch-project/OpenSearch-Dashboards/HEAD/.lycheeexclude?

we don't want to maintain common excludes in two places, the mainly part should from OSD core and we have patch in this repo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but do we still need to download from https://raw.githubusercontent.com/opensearch-project/OpenSearch-Dashboards/HEAD/.lycheeexclude?

we don't want to maintain common excludes in two places, the mainly part should from OSD core and we have patch in this repo.

But the .lycheeexclude in OSD repo is not common excludes as I understand, it's specific to OSD repo, am I right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's specific to OSD repo

agree, it is specific to OSD. But dashboards-assistant is a plugin of OSD, .lycheeexclude defined in OSD should suitable for plugins.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the OSD list makes sense, but we are the only one using it besides OSD. It was added by db292f8, my PR just avoids the whole repo clone for faster CI and debugging. @SuZhou-Joe any specific reason that you added the .lycheeexclude from OSD?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I copy the lint-checker from OSD, and thus I use the .lycheeexclude from OSD as a reference to keep dashboards-assistant align with OSD. It is OK that we remove this step or merge some repo-specific exclude config with OSD's.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see, in that case i'll remove it. the OSD one contains links like github.com, it excludes 404 checks for github links in this repo. without it CI would be able to catch outdated github URLs

Signed-off-by: Joshua Li <[email protected]>
@joshuali925 joshuali925 merged commit 35787c6 into opensearch-project:main Dec 18, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants