Skip to content

fix(release): verify archives before signing - #1096

Open
gty404 wants to merge 1 commit into
apache:mainfrom
gty404:fix/verify-release-archive
Open

gty404 wants to merge 1 commit into
apache:mainfrom
gty404:fix/verify-release-archive

Conversation

@gty404

@gty404 gty404 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Verify downloaded release archives against the RC commit before signing.
  • Use fresh downloads and reject existing RC output directories.
  • Add regression coverage; all 6 tests and pre-commit checks pass.

Compare downloaded archives with the RC commit before signing.
Comment thread dev/release/release_rc.sh
echo "Failed to decompress ${tar_gz}. Not signing."
exit 1
fi
if ! git archive "${rc_hash}" --format=tar --prefix "${id}/" > "${verify_dir}/expected.tar"; then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One issue: git archive output depends on local config. I confirmed that core.autocrlf=true or tar.umask=022 produces a different tar, so a release manager with either setting would get a false "does not match RC commit" with no easy way around it. Could we pin the defaults CI uses?

git -c core.autocrlf=false -c core.eol=lf -c tar.umask=0002 \
  archive "${rc_hash}" --format=tar --prefix "${id}/"

import unittest


MOCK_TOOL = r'''

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we need this test? Should we hook it into CI if yes?

This branch has not been deployed

No deployments
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.

2 participants