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

Disable Develocity local build cache #1512

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

clayburn
Copy link
Contributor

@clayburn clayburn commented Oct 1, 2024

sbt-develocity v1.1 ships with local and remote build cache support for the compile and test tasks (see
https://gradle.com/develocity/releases/2024.2#build-caching-for-sbt).

The local build cache is enabled by default, while the remote cache requires configuring the nodes that are allowed to upload artifacts to the build cache (see
https://docs.gradle.com/develocity/sbt-build-cache/#rolling_out_the_cache_in_your_organization).

It's important to confirm that a project's build is ready to use the build cache (local or remote) to avoid unexpected behaviors. Specifically, one should make sure that all relevant inputs to the compile or test task are captured, as otherwise the generated build cache key will be incorrect (this can lead to erractic behavior, as entries from the cache will be reused when they shouldn't). Refer to
https://docs.gradle.com/enterprise/sbt-plugin/#caching_the_compile_task to know what are the build cache inputs captured for the compile task and https://docs.gradle.com/enterprise/sbt-plugin/#caching_the_test_testonly_and_testquick_tasks for the test task.

This commits disables the local build cache so that a proper rollout can be planned (see
https://docs.gradle.com/develocity/sbt-build-cache/#rolling_out_the_cache_in_your_organization).

@clayburn clayburn changed the title Disablee Develocity local build cache Disable Develocity local build cache Oct 1, 2024
}
// See https://docs.gradle.com/develocity/sbt-plugin/#enabling_build_cache_in_a_custom_sbt_configuration
override lazy val projectSettings = DevelocityPlugin.develocitySettings(Jdk9.TestJdk9)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

minor nit but could you add a new line at the end of the file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, done

sbt-develocity v1.1 ships with local and remote build cache support for the
`compile` and `test` tasks (see
https://gradle.com/develocity/releases/2024.2#build-caching-for-sbt).

The local build cache is enabled by default, while the remote cache requires
configuring the nodes that are allowed to upload artifacts to the build cache
(see
https://docs.gradle.com/develocity/sbt-build-cache/#rolling_out_the_cache_in_your_organization).

It's important to confirm that a project's build is ready to use the build cache
(local or remote) to avoid unexpected behaviors. Specifically, one should make
sure that all relevant inputs to the `compile` or `test` task are captured, as
otherwise the generated build cache key will be incorrect (this can lead to
erractic behavior, as entries from the cache will be reused when they
shouldn't). Refer to
https://docs.gradle.com/enterprise/sbt-plugin/#caching_the_compile_task to know
what are the build cache inputs captured for the `compile` task and
https://docs.gradle.com/enterprise/sbt-plugin/#caching_the_test_testonly_and_testquick_tasks
for the `test` task.

This commits disables the local build cache so that a proper rollout can be
planned (see
https://docs.gradle.com/develocity/sbt-build-cache/#rolling_out_the_cache_in_your_organization).
@clayburn clayburn force-pushed the disable-local-develocity-build-cache branch from d1d76f5 to ece0b84 Compare October 1, 2024 17:59
@raboof raboof merged commit 2698511 into apache:main Oct 2, 2024
9 checks passed
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.

4 participants