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

scripts/release.sh is not signing off release version bump commits #18581

Closed
4 tasks done
jmhbnz opened this issue Sep 12, 2024 · 4 comments
Closed
4 tasks done

scripts/release.sh is not signing off release version bump commits #18581

jmhbnz opened this issue Sep 12, 2024 · 4 comments
Assignees
Labels
area/tooling backport/v3.5 priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. type/bug

Comments

@jmhbnz
Copy link
Member

jmhbnz commented Sep 12, 2024

Bug report criteria

What happened?

For a long time now scripts/release.sh has been used on the release-3.5 branch to automate bumping versions, committing this bump and pushing it to the git remote.

Recent examples of these partially-automated commits are:

Version Link
v3.5.16 f20bbad
v3.5.15 9a55333
v3.5.14 bf51a53
v3.5.13 c9063a0
v3.5.12 e7b3bb6

What did you expect to happen?

These commits should be signed off for Developer Certificate of Origin reasons.

How can we reproduce it (as minimally and precisely as possible)?

Produce a release with scripts/release.sh on the release-3.5 branch.

Anything else we need to know?

This has not impacted release-3.4 branch as we have had a historic practice of creating release commits and tags manually on that branch.

The relevant section of code is:

etcd/scripts/release.sh

Lines 151 to 159 in 9aaaafe

if [[ -n $(git status -s) ]]; then
log_callout "Committing mods & api/version/version.go update."
run git add api/version/version.go
# shellcheck disable=SC2038,SC2046,SC2185
run git add $(find -name go.mod ! -path './release/*'| xargs)
run git diff --staged | cat
run git commit -m "version: bump up to ${VERSION}"
run git diff --staged | cat
fi

We should be adding the --signoff flag to the git commit command.

@jmhbnz jmhbnz added type/bug area/tooling priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Sep 12, 2024
@jmhbnz
Copy link
Member Author

jmhbnz commented Sep 12, 2024

/assign

cc @serathius, @ahrtr for your awareness. Let's fix this before our next set of releases.

@ivanvc
Copy link
Member

ivanvc commented Sep 13, 2024

@jmhbnz, jfyi, the code is also in the main branch (although there haven't been any recent v3.6 releases, it's affected, too).

Ref:

run git commit -m "version: bump up to ${VERSION}"

And, release-3.4 is not affected (although not used, it does the signoff):

etcd/scripts/release.sh

Lines 118 to 124 in a1375b7

if [[ -n $(git status -s) ]]; then
log_callout "Committing version/version.go update."
git add version/version.go
git diff --staged | cat
git commit --signoff -m "version: bump up to ${VERSION}"
git diff --staged | cat
fi

@ahrtr
Copy link
Member

ahrtr commented Sep 13, 2024

Thanks for the catch!

@jmhbnz
Copy link
Member Author

jmhbnz commented Sep 17, 2024

Closed backport completed in #18599

@jmhbnz jmhbnz closed this as completed Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tooling backport/v3.5 priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. type/bug
Development

No branches or pull requests

3 participants