-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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: repository.Init() to Add gitRepoPaths using the proper new cache key format #20962
base: master
Are you sure you want to change the base?
fix: repository.Init() to Add gitRepoPaths using the proper new cache key format #20962
Conversation
✅ Preview Environment deployed on Bunnyshell
See: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
fcb7feb
to
2ed5acb
Compare
…key format Signed-off-by: Jean-Philippe Bélanger <30598824+jpbelangerupgrade@users.noreply.github.com>
2ed5acb
to
c6534c0
Compare
We use pre-cloned repository so if a repository is already cloned, before it would cache that repo location. Now because of the project key, it’s ignoring the existing cloned repository and cloning a new one. So before this change. we’d end up with twice the repo cloned. |
return err | ||
} | ||
|
||
s.gitRepoPaths.Add(string(keyData), fullPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we update getters as well? How does it work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All other "Get" (GetPath and GetPathIfExists) have been updated already to use the Project with the composite key. Add was left behind apparently in the original PR
Regression from #18388
The gitRepoPaths cache key was updated to now include not just the repository url but the repository Project. Since during init we have no way of knowing the repository project. At least add that repository into cache as the "default" / undefined project.
Note: Cherrypicking this in all active release would be great given 2.12+ are all impacted.
Checklist: