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

HBASE-24651 release script utils should set local user when GPG_KEY is defined. #1992

Closed
wants to merge 1 commit into from

Conversation

busbey
Copy link
Contributor

@busbey busbey commented Jun 28, 2020

If the release manager has multiple private keys defined and wants to use one for running a release that isn't configured to be the default then currently the release scripts will use the selected gpg key when doing the test signing but will fall back to using whatever is configured as the default when signing the source and binary tarballs.

this PR changes when we define the local user arg for gpg so that it is defined whenever we have GPG_KEY defined. tested both using do-release-docker.sh and directly with do-release.sh.

@busbey busbey requested a review from ndimiduk June 28, 2020 06:48
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 30s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 22s Maven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗 mvndep 0m 8s Maven dependency ordering for patch
_ Other Tests _
1m 52s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1992/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #1992
Optional Tests
uname Linux 7df81aebdfd5 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 47742b2
Max. process+thread count 49 (vs. ulimit of 12500)
modules C: U:
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1992/1/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 43s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 24s Maven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗 mvndep 0m 9s Maven dependency ordering for patch
_ Other Tests _
2m 14s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1992/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #1992
Optional Tests
uname Linux 669903a78066 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 47742b2
Max. process+thread count 55 (vs. ulimit of 12500)
modules C: U:
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1992/1/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 49s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 shelldocs 0m 0s Shelldocs was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 24s Maven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗 mvndep 0m 9s Maven dependency ordering for patch
+1 💚 shellcheck 0m 2s There were no new shellcheck issues.
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
_ Other Tests _
+0 🆗 asflicense 0m 0s ASF License check generated no output?
2m 32s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1992/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #1992
Optional Tests dupname asflicense shellcheck shelldocs
uname Linux b26492ed3eec 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 47742b2
Max. process+thread count 48 (vs. ulimit of 12500)
modules C: U:
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1992/1/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) shellcheck=0.4.6
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Member

@ndimiduk ndimiduk left a comment

Choose a reason for hiding this comment

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

Just some observations.

@@ -20,6 +20,9 @@ DRY_RUN=${DRY_RUN:-1} #default to dry run
DEBUG=${DEBUG:-0}
GPG=${GPG:-gpg}
GPG_ARGS=(--no-autostart --batch)
if [ -n "${GPG_KEY}" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

When is GPG_KEY not set? The script builds up the @apache.org email address, so it should always be available. Shouldn't that be an error case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, in the case of directly running do-release.sh then GPG_KEY isn't defined when we source release-util.sh. shortly thereafter we call get_release_info, which sets GPG_KEY. (with this change we use GPG_KEY to update GPG_ARGS in that function)

@@ -20,6 +20,9 @@ DRY_RUN=${DRY_RUN:-1} #default to dry run
DEBUG=${DEBUG:-0}
GPG=${GPG:-gpg}
GPG_ARGS=(--no-autostart --batch)
if [ -n "${GPG_KEY}" ]; then
GPG_ARGS=("${GPG_ARGS[@]}" --local-user "${GPG_KEY}")
Copy link
Member

Choose a reason for hiding this comment

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

Again, to my previous comments, I'm surprised this script identifies GPG identity via an email address/--local-user. I expected that we'd manage everything via a key fingerprint/--default-key.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it doesn't identify the gpg identity necessarily via email address. --local-user takes the name of a key, the same as --default-key does. that name can be a keyid, email address, or fingerprint. the --local-user option is defined as "I specifically want you to use this identity to sign" and overrides any given default. IMO that better fits our usage because we expressly want to sign with this key.

@asfgit asfgit closed this in 982bd5f Jun 30, 2020
@busbey busbey deleted the HBASE-24651 branch June 30, 2020 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants