Skip to content

Conversation

@eserscor
Copy link
Contributor

@eserscor eserscor commented Jan 6, 2026

Description

Update search for GPG to check for both Program Files and Program Files (x86)

Motivation and Context

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You can commit the suggested changes from lintrunner.

eserscor and others added 3 commits January 6, 2026 19:32
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@eserscor eserscor marked this pull request as ready for review January 7, 2026 00:33
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You can commit the suggested changes from lintrunner.

tianleiwu
tianleiwu previously approved these changes Jan 7, 2026
Copy link
Contributor

@tianleiwu tianleiwu left a comment

Choose a reason for hiding this comment

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

The PR addresses GPG signing issues in the Windows CI environment for Java artifacts. It improves the robustness of locating the gpg.exe binary and adds a cleanup step for the GPG trust database to prevent potential corruption or stale state issues.

Detailed Review

tools/ci_build/github/windows/sign_java_artifacts.py

1. GPG Path Detection (get_gpg_path)

  • The update to search for gpg.exe in both %ProgramFiles(x86)% and %ProgramFiles% is a good addition. As noted in the comments, the tool installation location can vary (e.g., changed on 12/31/2025). This makes the script more resilient.

2. TrustDB Cleanup (clean_gpg_trustdb)

  • clean_gpg_trustdb explicitly removes trustdb.gpg from the APPDATA directory. This is a practical fix for CI environments where state persistence can lead to conflicts.
  • Note: The error handling (try...except OSError) prints a warning but allows execution to continue, which is appropriate.

3. Main Execution Flow

  • Calling gpg --check-trustdb ensures that the trust database is in a valid state before importing keys.
  • Adding --yes to the gpg --import command ensures non-interactive execution.

Conclusion

The changes are well-targeted fixes for the Windows CI environment.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@eserscor eserscor merged commit 751af64 into main Jan 7, 2026
91 checks passed
@eserscor eserscor deleted the dev/erscor/2026/1/5-fix-gnupg branch January 7, 2026 22:07
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