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

[sc-29504] PathSpec._path_is_excluded to check if path is excluded #1018

Merged

Conversation

usefulalgorithm
Copy link
Contributor

🤔 Why?

If the exclude path has a wildcard in the template label component, the crawler would not be able to filter the path out.

The original logic to decide if a path should be excluded is hard to follow, and even harder to fix the bug. Rewrote the whole thing to make it easier to follow.

🤓 What?

  • PathSpec._path_is_excluded method to check if the path is excluded.
  • Added unit test.

🧪 Tested?

Added unit test. Previously skipped unit test is now passing.

☑️ Checks

  • My PR contains actual code changes, and I have updated the version number in pyproject.toml.

Copy link

github-actions bot commented Oct 23, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
13103 11689 89% 85% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
metaphor/s3/path_spec.py 94% 🟢
TOTAL 94% 🟢

updated for commit: 9fc5fab by action🐍

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.20%. Comparing base (4dcad79) to head (9fc5fab).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
metaphor/s3/path_spec.py 90.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1018      +/-   ##
==========================================
- Coverage   89.21%   89.20%   -0.01%     
==========================================
  Files         200      200              
  Lines       13097    13103       +6     
==========================================
+ Hits        11684    11689       +5     
- Misses       1413     1414       +1     

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

@usefulalgorithm usefulalgorithm enabled auto-merge (squash) October 23, 2024 11:56
Copy link
Contributor

@mars-lan mars-lan left a comment

Choose a reason for hiding this comment

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

LGTM from a high level. @alyiwang @elic-eon pls take a closer look.

metaphor/s3/path_spec.py Outdated Show resolved Hide resolved
metaphor/s3/path_spec.py Outdated Show resolved Hide resolved
@usefulalgorithm usefulalgorithm merged commit 8821381 into main Oct 24, 2024
6 checks passed
@usefulalgorithm usefulalgorithm deleted the tsung-julii/sc-29504/fix-test-exclude-table-wildcard branch October 24, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants