Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Conversation

@sashaostrikov
Copy link
Contributor

Previously, we checked for a substring, but it breaks in cases where given repo name is a prefix for another repo names, e.g.: "repo/a" is included, but "repo/ab" and "repo/a-1" are included too, because of the check.

This commit changes this behaviour to check for the suffix instead, which is not perfect, but judging from local testing and how the repos are named ("orgName/repoName"), this check will filter out most repos which were previously included by mistake.

Precise implementation requires a lot of effort to propagate repo names through the recording stack and can be done later.

Test plan:
Local sg run and test that repos with matching prefix are not recorded.

Part of https://github.com/sourcegraph/sourcegraph/issues/55058

…ing.

Previously, we checked for a substring, but it breaks in cases where given repo name is a prefix for another repo names, e.g.: "repo/a" is included, but "repo/ab" and "repo/a-1" are included too, because of the check.

This commit changes this behaviour to check for the suffix instead, which is not perfect, but judging from local testing and how the repos are named ("orgName/repoName"), this check will filter out most repos which were previously included by mistake.

Precise implementation requires a lot of effort to propagate repo names through the recording stack and can be done later.

Test plan:
Local sg run and test that repos with matching prefix are not recorded.
@sashaostrikov sashaostrikov added the team/source Tickets under the purview of Source - the one Source to graph it all label Jul 19, 2023
@sashaostrikov sashaostrikov requested review from a team and indradhanush July 19, 2023 13:36
@sashaostrikov sashaostrikov self-assigned this Jul 19, 2023
@cla-bot cla-bot bot added the cla-signed label Jul 19, 2023
Copy link
Contributor

@BolajiOlajide BolajiOlajide left a comment

Choose a reason for hiding this comment

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

Nice catch.

@sashaostrikov sashaostrikov merged commit d9c9fa8 into main Jul 19, 2023
@sashaostrikov sashaostrikov deleted the ao/git-recording-correct-name-matching branch July 19, 2023 14:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/source Tickets under the purview of Source - the one Source to graph it all

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants