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

fix(git): fix exclude filter in repo Git scan mode #5526

Merged
merged 7 commits into from
Dec 22, 2023

Conversation

vvagaytsev
Copy link
Collaborator

@vvagaytsev vvagaytsev commented Dec 6, 2023

What this PR does / why we need it:
This PR aligns the exclude file filter behavior between GitRepoHandler and GitHandler.
Also, it adds a few more test cases to cover more scenarios.

The behavior of GitHandler was taken as a reference, because it's been there for a long time before we switched the default repo scanner to GitRepoHandler in #5399 (0.13.20).

Which issue(s) this PR fixes:

Fixes some of the GitRepoHandler test failures that were introduced in #5472. Those were enabled only for GitHandler that passed all the tests.

Special notes for your reviewer:

@vvagaytsev vvagaytsev force-pushed the fix/align-git-handler-behavior branch 6 times, most recently from 2ad4d5f to 4850451 Compare December 11, 2023 10:40
@vvagaytsev vvagaytsev changed the title fix(git): fix exclude filter in GitRepoHandler fix(git): minor fix for exclude filter in GitRepoHandler Dec 11, 2023
@vvagaytsev vvagaytsev requested review from a team and stefreak December 11, 2023 13:16
@vvagaytsev vvagaytsev marked this pull request as ready for review December 11, 2023 13:17
@vvagaytsev vvagaytsev force-pushed the fix/align-git-handler-behavior branch 2 times, most recently from db6115b to 205c71d Compare December 11, 2023 13:19
@vvagaytsev vvagaytsev marked this pull request as draft December 11, 2023 14:45
@vvagaytsev vvagaytsev changed the title fix(git): minor fix for exclude filter in GitRepoHandler fix(git): fix exclude filter in repo Git scan mode Dec 11, 2023
@vvagaytsev vvagaytsev marked this pull request as ready for review December 11, 2023 15:35
More robust way of the default `Dockerfile` exclusion.
It doesn't have to be a first element in the array of files.
Align `exclude` filter behavior between `subtree` and `repo` Git repository scan modes.
Now both `GitHandler` and `GitRepoHandler` behave identically if any exclusions are configured.

chore: amend
Copy link
Member

@stefreak stefreak left a comment

Choose a reason for hiding this comment

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

Thank you for digging into this! Great work @vvagaytsev ❤️

@vvagaytsev vvagaytsev added this pull request to the merge queue Dec 22, 2023
Merged via the queue into main with commit 5ef9998 Dec 22, 2023
45 checks passed
@vvagaytsev vvagaytsev deleted the fix/align-git-handler-behavior branch December 22, 2023 10:36
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.

None yet

2 participants