-
Notifications
You must be signed in to change notification settings - Fork 497
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
release-notes (and release-sdk) don't check the remotes when reusing an existing temp dir for repos #3444
Comments
@DannyBrito and I just debugged this and we have a solution and will open a PR but we wanted to chat about it first. I think the proper fix here is to update release-sdk to make This is probably going to impact very few people since most folks aren't running release-notes for multiple projects :) @puerco @saschagrunert wdyt? |
@jeremyrickard, what are the parameters that you use to run the rel-notes? to run for another repo usually you do
|
@cpanato I used the following command: release-notes generate \
--org="kubernetes-sigs" \
--repo="promo-tools" \
--start-rev="v4.0.4" \
--end-rev="v4.0.5" \
--branch="main" \
--markdown-links |
@cpanato yeah the issue here using you already have a temp directory with the remotes pointing at another repo, we just reuse that dir and run a git pull —rebase. We don’t check that it’s the right repo |
I see so the issue is we need to clean the temp dir as well |
Yeah checking the remote and wiping the cache if they don't match is a good solution. 👍 |
@jeremyrickard should I do the fix or you already have something? |
@cpanato have a fix. we'll open a PR. |
What happened:
When running
release-notes
withstart-rev
andend-rev
provided, it was observed that the wrong repo was being cloned/updated. The tooling was using kubernetes/kubernetes instead kubernetes-sigs/promo-tools. This appears to be happening because there is an existing repo clone in the expected temp directory, however it's for another repository (i.e. k/k). ThecloneOrOpenRepo
function in release-sdk doesn't ensure that the repoPath given is one of the remotes.Slack Thread For Reference
What you expected to happen:
release-notes either provides a descriptive error and directions to clean up the temp dir or it clones to a new temp dir.
How to reproduce it (as minimally and precisely as possible):
Run 'release-notes' with no temp directory on one project. Then run it again on a second project (i.e. it would have a different repo path).
Anything else we need to know?:
Environment:
cat /etc/os-release
):uname -a
):The text was updated successfully, but these errors were encountered: