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

fix: update to setup-gradle #5905

Merged

Conversation

devinrsmith
Copy link
Member

This upgrades from the no longer maintained action burrunan/gradle-cache-action to the gradle maintained action gradle/actions/setup-gradle. There is a different usage pattern; with setup-gradle, it is invoked first during setup as opposed to at the command site. We were also using job-ids with burrunan/gradle-cache-action to implicitly control cache prefixes; it is not clear if we actually need to separate caches, and so (for now), the default caching behavior of gradle/actions/setup-gradle is used, https://github.com/gradle/actions/blob/v3.5.0/docs/setup-gradle.md#caching-build-state-between-jobs. By default, the action will read from cache, but will only write to the cache for jobs on the main branch.

Fixes #5161

This upgrades from the no longer maintained action `burrunan/gradle-cache-action` to the gradle maintained action `gradle/actions/setup-gradle`. There is a different usage pattern; with `setup-gradle`, it is invoked first during setup as opposed to at the command site. We were also using job-ids with `burrunan/gradle-cache-action` to implicitly control cache prefixes; it is not clear if we actually need to separate caches, and so (for now), the default caching behavior of `gradle/actions/setup-gradle` is used, https://github.com/gradle/actions/blob/v3.5.0/docs/setup-gradle.md#caching-build-state-between-jobs. By default, the action will read from cache, but will only write to the cache for jobs on the `main` branch.

Fixes deephaven#5161
@devinrsmith devinrsmith self-assigned this Aug 5, 2024
@devinrsmith devinrsmith changed the title fix: Upgrade to gradle fix: update to setup-gradle Aug 5, 2024
@devinrsmith
Copy link
Member Author

A nightlies run has succeeded, and I don't see any negative change in build time.

@devinrsmith devinrsmith added this to the 0.36.0 milestone Aug 6, 2024
@devinrsmith devinrsmith marked this pull request as ready for review August 6, 2024 16:06
Copy link
Member

@niloc132 niloc132 left a comment

Choose a reason for hiding this comment

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

One version bump, otherwise basically exactly matches my version of the patch.

@@ -29,6 +29,9 @@ jobs:
distribution: 'temurin'
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
Copy link
Member

Choose a reason for hiding this comment

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

Looks like these should all be version 4.

Suggested change
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4

Copy link
Member Author

Choose a reason for hiding this comment

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

v4 is an RC candidate right now, noted in #5898

Copy link
Member

Choose a reason for hiding this comment

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

Hmm okay - their readme suggests v4, so I assumed it was ready for prime time.

Copy link
Member

@rcaudy rcaudy left a comment

Choose a reason for hiding this comment

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

Code owner approval

@devinrsmith devinrsmith merged commit bf5bfef into deephaven:main Aug 7, 2024
20 of 23 checks passed
@devinrsmith devinrsmith deleted the nightly/replace-gradle-action branch August 7, 2024 19:09
@github-actions github-actions bot locked and limited conversation to collaborators Aug 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update github gradle action to something well supported
3 participants