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

build: Add Develocity configuration and enable remote build cache #4862

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ribafish
Copy link

This PR will enable you to publish Build Scans to develocity-staging.eclipse.org as explained in the issue #4846.

Description

This PR publishes a build scan for every CI build and for every local build from an authenticated Eclipse committer. The build will not fail if publishing fails. Setting the access key env var was added in relevant CI pipelines, however, the secret will need to be set by Eclipse infra - you can initiate that by opening a helpdesk ticket.

The build scans of the Eclipse EDC Connector project are published to the Develocity instance at develocity-staging.eclipse.org, hosted by the Eclipse Foundation and run in partnership between the Eclipse and Gradle. This Develocity instance has all features and extensions enabled and is freely available for use by the Eclipse EDC Connector project and all other Eclipse projects.

On this Develocity instance, the Eclipse EDC Connector project will have access not only to all of the published build scans but also to other aggregate data features such as:

  • Dashboards to view all historical build scans, along with performance trends over time. For example, look at the Quarkus instance trends dashboard with the ci filter applied.
  • Build failure analytics for enhanced investigation and diagnosis of build failures. You can also explore the Quarkus instance for example of a different OSS projects Develocity instance.
  • Test failure analytics to better understand trends and causes around slow, failing, and flaky tests. Going to the Quarkus instance again, this will probably give you a better representation of the type of data available. You can also order it by flakiness, which is a good starting point when deciding which tests need fixing the most.

This will also enable you to (optionally) use build time optimization features, such as (remote) build caching and Predictive Test Selection. In this PR, build caching is already configured and enabled.

I ran some tests about build speed improvements when caching is configured with the following results - there is additional ~20s os savings available when the project is relocated, but that would require a fix in the EDC Gradle Plugins / AutodocDependencyInjector. Here are the best case savings:

Invocation Build time without cache Build time with cache Build time savings
assemble 7m 44s 25s 7m 19s (94%)
test 11m 47s 20s 11m 27s (97%)
test -DincludeTags=PostgresqlIntegrationTest -DincludeTags=EndToEndTest -DincludeTags=ComponentTest -DincludeTags=ApiTest 8m 36s 19s 8m 17s (96%)

As explained in the Eclipse Develocity documentation, you can start publishing scans locally if you run the ./gradlew provisionDevelocityAccessKey task, which will take you to develocity-staging.eclipse.org, where you can log in with your eclipse account and confirm access key generation. All the subsequent builds will be published.

Caching can be tested without setting up the Develocity credentials - simply run 2 or more builds (the first one will fill the local cache, next ones can use it).

More information can be read in the Eclipse announcement.

Please let me know if there are any questions about the value of Develocity or the changes in this pull request and I’d be happy to address them.

IMPORTANT

To get scans publishing on CI, a helpdesk ticket needs to be opened in order for those credentials to be created, as explained in the initiative documentation.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

We are always happy to welcome new contributors ❤️ To make things easier for everyone, please make sure to follow our contributors manual, check if you have already signed the ECA, and relate this pull request to an existing issue or discussion.

@ndr-brt ndr-brt added the build Anything related to the CI/CD Pipeline on Github Actions label Mar 14, 2025
@ribafish ribafish changed the title Added Develocity configuration and enabled remote build cache. build: Added Develocity configuration and enabled remote build cache. Mar 14, 2025
@ribafish
Copy link
Author

Note: I modified the PR title to include build:, as I saw a check failed

@ribafish ribafish force-pushed the feature/develocity branch from 088a657 to 91567f9 Compare March 14, 2025 15:40
@ribafish ribafish changed the title build: Added Develocity configuration and enabled remote build cache. build: Add Develocity configuration and enable remote build cache Mar 17, 2025
@ribafish ribafish force-pushed the feature/develocity branch from 91567f9 to ea82f9d Compare March 24, 2025 10:37
Copy link

github-actions bot commented Apr 1, 2025

This pull request is stale because it has been open for 7 days with no activity.

@github-actions github-actions bot added the stale Open for x days with no activity label Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Anything related to the CI/CD Pipeline on Github Actions stale Open for x days with no activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants