-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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: properly change working dir if tmp location already exists #18812
base: main
Are you sure you want to change the base?
Conversation
Currently, the script won't change directories into the previously cloned repository if the temporary location exists. This may be an issue when testing first with a dry run and later with the actual release. Signed-off-by: Ivan Valdes <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted filessee 27 files with indirect coverage changes @@ Coverage Diff @@
## main #18812 +/- ##
==========================================
- Coverage 68.75% 68.72% -0.03%
==========================================
Files 420 420
Lines 35522 35522
==========================================
- Hits 24422 24412 -10
- Misses 9669 9680 +11
+ Partials 1431 1430 -1 Continue to review full report in Codecov by Sentry.
|
Probably I was missing something. Why we did not see this issue previously when we were releasing 3.5.x together?
Sounds good to me. But leave it to you and James to decide it. |
The issue is that instead of erroring out, it silently doesn't change the directory. The only way to catch it is by reading the log lines and noticing that it skips changing the directory. Given the number of log lines the release script generates, it is difficult to catch. The temp directory it creates follows the pattern: /retest |
Usually there isn't any issue as long as the tag was successfully created, because the release script will checkout the tag anyway (see code link below). But theoretically there is a potential issue if the Thanks for the good catch! Lines 107 to 110 in 98e53e5
|
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.
LGTM
Thank you!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahrtr, ivanvc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I identified this issue while working on #18649. Currently, if we follow the practice of testing the release script in the first step when doing a release with
DRY=true
and then rerun the script, the script won't change directories into the freshly cloned repository. Instead, it will use the current directory, which may be prone to unwanted changes accidentally being pushed as part of the release.With this approach, running it after a DRY run will yield the error:
However, I feel the best experience would be to replace:
With a fetch and the hard reset to avoid manual intervention. But, I didn't want to implement it without alignment on this.
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.