-
Notifications
You must be signed in to change notification settings - Fork 3.6k
GPG changed default install location on 12/31/2025 for Windows #26917
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
Conversation
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.
You can commit the suggested changes from lintrunner.
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>
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.
You can commit the suggested changes from lintrunner.
tianleiwu
left a comment
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.
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.exein 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_trustdbexplicitly removestrustdb.gpgfrom theAPPDATAdirectory. 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-trustdbensures that the trust database is in a valid state before importing keys. - Adding
--yesto thegpg --importcommand 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>
Description
Update search for GPG to check for both Program Files and Program Files (x86)
Motivation and Context