-
Notifications
You must be signed in to change notification settings - Fork 178
fix: Update System.env syntax for Gradle 9 compatibility #4129
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Daniel Widdis <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4129 +/- ##
=========================================
Coverage 81.63% 81.64%
Complexity 8829 8829
=========================================
Files 761 761
Lines 38099 38099
Branches 4250 4250
=========================================
+ Hits 31104 31105 +1
Misses 5167 5167
+ Partials 1828 1827 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The IT failed. The new way of exporting variables seems changing the values of the aws credentials.
|
The changes only impact the gradle build's access to the specific Sonatype system environment variables (GitHub secrets) associated with publishing snapshots, and should have zero impact on compiled code and internal handling of credentials. |
This PR updates the Gradle build files to fix compatibility with Gradle 9.
Problem
The current syntax using
$System.env.VARIABLE_NAME
for accessing environment variables is not compatible with Gradle 9.This format is used in this repository for Sonatype credentials for SNAPSHOT publication. This fails with under Gradle 9.
See example failed workflow here.
Solution
Update to use the
System.getenv()
method instead:Example fix which restored successful snapshots: opensearch-project/opensearch-remote-metadata-sdk#245