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

misc: gradle mirror #1486

Merged
merged 36 commits into from
Feb 5, 2025
Merged

misc: gradle mirror #1486

merged 36 commits into from
Feb 5, 2025

Conversation

0marperez
Copy link
Contributor

Issue #

Description of changes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@0marperez 0marperez added the no-changelog Indicates that a changelog entry isn't required for a pull request. Use sparingly. label Jan 6, 2025
Copy link

github-actions bot commented Jan 6, 2025

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK

This comment has been minimized.

@0marperez 0marperez marked this pull request as ready for review January 6, 2025 21:00
@0marperez 0marperez requested a review from a team as a code owner January 6, 2025 21:00
Copy link

github-actions bot commented Jan 7, 2025

A new generated diff is ready to view.

This comment has been minimized.

Comment on lines 86 to 87
- name: Configure Gradle
run: gradle wrapper --gradle-distribution-url ${{ secrets.CUSTOM_GRADLE_DISTRIBUTION_URL }}/gradle-8.5-bin.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: All this repetition means we'll have to update the version number in a bunch of places. This seems like a good candidate for either a custom action or possibly integrating into our common build setup.

Copy link
Member

Choose a reason for hiding this comment

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

Even better, add the custom action to aws-kotlin-repo-tools like I did for kat

Copy link
Contributor

Choose a reason for hiding this comment

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

That would hamper our ability to upgrade Gradle versions independently across the repos. Couldn't that also cause issues that wouldn't be caught until the next run of CI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great suggestion, thanks

Copy link
Member

Choose a reason for hiding this comment

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

It would be caught when you go to upgrade the version of aws-kotlin-repo-tools you're using

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I can turn it into an action with inputs to specify the gradle version we want to use. That way we can move it to repo tools

Copy link
Contributor

Choose a reason for hiding this comment

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

Specify the Gradle version where? In each action that uses Gradle? Doesn't that defeat the goal of commonizing the version in a single place?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh you're right, nvm

Comment on lines 86 to 87
- name: Configure Gradle
run: gradle wrapper --gradle-distribution-url ${{ secrets.CUSTOM_GRADLE_DISTRIBUTION_URL }}/gradle-8.5-bin.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: Why make the distribution URL a secret?

Copy link
Contributor Author

@0marperez 0marperez Jan 7, 2025

Choose a reason for hiding this comment

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

I think someone could use it and possibly perform some sort of attack. I doubt someone will but theoretically they could take down our CI or just run up our AWS bill

Copy link
Member

Choose a reason for hiding this comment

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

I think the full command (and the Gradle distribution URL) will still be visible in the CI's logs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see it hidden as ***

Copy link
Contributor

Choose a reason for hiding this comment

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

Moving conversation offline.

distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: Why standardize on 8.5? Why not use the latest release, 8.12?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Iirc there are some soon to be deprecated features we're using. I'll try using 8.12 and see if everything works okay

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like it works👍

Copy link

github-actions bot commented Jan 7, 2025

A new generated diff is ready to view.

Copy link

A new generated diff is ready to view.

Copy link

A new generated diff is ready to view.

Copy link

A new generated diff is ready to view.

This comment has been minimized.

Copy link

A new generated diff is ready to view.

Copy link

A new generated diff is ready to view.

Copy link

A new generated diff is ready to view.

Copy link

A new generated diff is ready to view.

Copy link

A new generated diff is ready to view.

This comment has been minimized.

Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK

This comment has been minimized.

Copy link

A new generated diff is ready to view.

Comment on lines 3 to 4
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
# Keep gradle version in sync with aws-sdk-kotlin/gradle/wrapper/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Extraneous \ in URL. Applies to other gradle-wrapper.properties files in this PR too.

Copy link

A new generated diff is ready to view.

Copy link

sonarqubecloud bot commented Feb 4, 2025

Copy link

github-actions bot commented Feb 4, 2025

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK

Copy link

github-actions bot commented Feb 4, 2025

Affected Artifacts

No artifacts changed size

@0marperez 0marperez merged commit f9add36 into main Feb 5, 2025
19 checks passed
@0marperez 0marperez deleted the gradle-mirror branch February 5, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a changelog entry isn't required for a pull request. Use sparingly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants