Develocity integration - #9167
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9167 +/- ##
=========================================
Coverage 17.56% 17.56%
+ Complexity 15539 15537 -2
=========================================
Files 5911 5911
Lines 529359 529359
Branches 64655 64655
=========================================
+ Hits 92979 92982 +3
+ Misses 425920 425919 -1
+ Partials 10460 10458 -2
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:
|
a565234 to
2601328
Compare
|
@ribafish, thanks for the PR; it was nice to meet you at the conference. Now we will run the tests and, as soon we meet the requirements, we will merge the PR. |
|
@blueorangutan package |
|
@GutoVeronezi a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9793 |
|
@GutoVeronezi what is your intention with this? Are you proposing to base some policy on this? Also, |
The main goal is to identify slow and flaky tests, so we can improve our code and workflow. Having those metrics can also help us to identify other problems that might be there and we are not seeing.
Not sure if more, but well structured. |
@GutoVeronezi , my communication skill are way below par. I meant to ask if we need more testing on this PR. You are absolutely right in your reply and it is valid with repect to the question I posed, just not to the one I intended ;) |
I see hehe It should not affect the system itself; however, I would run it just for sanity. |
|
@ribafish Thanks for PR. I don't remember exactly, but there was some issue related to security in github actions resulting in leaking of secrets. One of the reasons we disabled sonar on PRs from forks. |
It was because of target in the github actions. I think this pr doesn't have the issue. |
|
Hi @vishesh92 and @weizhouapache This PR enables you to push build scans to Apache Develocity at ge.apache.org. These capture metadata about your build, which can then be used to monitor and improve the build performance, test times and fix flaky tests. It is also a prerequisite for other build performance improvements, such as using local and remote build cache, test distribution or predictive test selection (not part of this PR). Develocity supports multiple build tools; there are also several Apache projects built with Maven that use it already, such as Camel, Pulsar, Creadur RAT, etc. -> you can see their build scans at ge.apache.org with the Maven filter applied. The information captured includes the execution plan and timings, tests executed, dependencies and their versions, etc., but it does not include information such as the full list of env vars or the full cli command used to start a build unless added explicitly via custom values. |
@ribafish do we need to ask ASF infra to add the secret |
|
It is set up that any authenticated build will get published - at the moment, only CI jobs are authenticated and ASF infra already added |
cool, thanks @ribafish I've got an access key via command |
|
@ribafish |
|
@weizhouapache - an admin can do this. Are you referring to the 4 local build scans from this project? If so, I can ensure this happens |
@clayburn |
|
Done |
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9874 |
yadvr
left a comment
There was a problem hiding this comment.
LGTM - short questions, have we (a) added the token secrets.GE_ACCESS_TOKEN to the repo and (b) does having this in the .mvn affect private builds who may not want to publish build related data to the central server?
GE_ACCESS_TOKEN is an org-wide secret for the GitHub Apache org, managed by ASF Infra. As such, it is available to the cloudstack repo (but not for builds originating from forks).
No, there are two scenarios here:
|
@clayburn |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
* main: (1223 commits) Standardize and auto add license headers for SQL files with pre-commit (apache#12071) pre-commit use colored text in the CI for `pass / fail / skipped` (apache#11977) ui(locales): remove duplicates and fix typos (apache#11872) pre-commit: auto add table of contents with `doctoc` (apache#11679) chore: rename workflow `linter.yml` to `pre-commit.yml` (apache#11647) engine-schema: upgrade path for 4.23.0 (apache#12048) Fixes:apache#7837: Add isolationMethods and vlan to TrafficTypeResponse (apache#8151) Svgs (apache#12051) Update GUI Kubernetes logo (apache#11895) Keeping consistency with other error messages. (apache#11649) enhancement: add instance info as Libvirt metadata (apache#11061) Add empty Provider value in Network/VPC Offering form (apache#11982) merge fix Updating pom.xml version numbers for release 4.23.0.0-SNAPSHOT Updating pom.xml version numbers for release 4.22.1.0-SNAPSHOT UI: fix typo Upload SSL certificate (apache#11869) api/test: fix storage pool update with only id (apache#11897) Updating pom.xml version numbers for release 4.22.0.0 Handle null mountTimeout in RestoreBackupCommand (apache#11944) Fix the config 'powerflex.connect.on.demand' description (apache#11926) ...
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
Hi @ribafish can you please fix the conflicts? |
Conflict resolution: - build.yml, ci.yml, rat.yml, sonar-check.yml, main-sonar-check.yml: keep main's reworked concurrency/permissions blocks from the GitHub Actions refactor (apache#12774) and re-add the top-level DEVELOCITY_ACCESS_KEY env, matching main's formatting. - codecov.yml: accept main's deletion; JaCoCo coverage now runs in the sonar-check workflows, which carry the env. Signed-off-by: Gasper Kojek <[email protected]>
Signed-off-by: Gasper Kojek <[email protected]>
- develocity-maven-extension 1.21.4 -> 2.5.0 - common-custom-user-data-maven-extension 2.0 -> 2.4.0 CCUD 2.4.0 targets develocity-maven-extension 2.5.0, and both are compatible with the Develocity 2026.2.x server. Verified locally with `mvn -N validate`: both extensions load and the existing .mvn/develocity.xml is read and accepted unchanged. Also drop DEVELOCITY_ACCESS_KEY from ui.yml and pre-commit.yml, which do not run Maven. Signed-off-by: Gasper Kojek <[email protected]>
There was a problem hiding this comment.
Pull request overview
Adds Develocity (Gradle) Maven extensions and CI configuration so CloudStack builds can publish Develocity Build Scans to https://develocity.apache.org, enabling centralized build/test performance and failure analytics without enabling build caching.
Changes:
- Adds
.mvn/extensions.xmlto load the Develocity Maven extension and common custom user data extension. - Adds
.mvn/develocity.xmlconfiguring the Develocity server, Build Scan publishing rules, and keeping caches disabled. - Exposes
DEVELOCITY_ACCESS_KEYto multiple GitHub Actions workflows and ignores Develocity local metadata in.gitignore.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .mvn/extensions.xml | Enables Develocity-related Maven extensions for all Maven builds. |
| .mvn/develocity.xml | Configures Develocity server + Build Scan publishing behavior; keeps caches disabled. |
| .gitignore | Ignores Develocity local metadata and adds waf3-* ignore. |
| .github/workflows/sonar-check.yml | Provides DEVELOCITY_ACCESS_KEY for PR Sonar workflow builds. |
| .github/workflows/rat.yml | Provides DEVELOCITY_ACCESS_KEY for RAT license-check workflow builds. |
| .github/workflows/main-sonar-check.yml | Provides DEVELOCITY_ACCESS_KEY for main-branch Sonar workflow builds. |
| .github/workflows/ci.yml | Provides DEVELOCITY_ACCESS_KEY for simulator CI workflow builds. |
| .github/workflows/build.yml | Provides DEVELOCITY_ACCESS_KEY for general build workflow builds. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <remote> | ||
| <enabled>false</enabled> | ||
| <storeEnabled>#{isTrue(env['GITHUB_ACTIONS'])}</storeEnabled> | ||
| </remote> |
There was a problem hiding this comment.
This is left explicitly disabled; however, the store-enabled configuration should stay for the future when the project maintainers decide to enable remote build caching.
Signed-off-by: Gasper Kojek <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.
Suppressed comments (4)
.mvn/develocity.xml:48
<buildCache><remote>is explicitly disabled (<enabled>false</enabled>), so<storeEnabled>has no effect. Keeping ineffective config is confusing and makes it harder to reason about whether caching is intended to be on/off.
<remote>
<enabled>false</enabled>
<storeEnabled>#{isTrue(env['GITHUB_ACTIONS'])}</storeEnabled>
</remote>
.github/workflows/ci.yml:32
DEVELOCITY_ACCESS_KEYis set at workflow scope, which exposes the secret to all steps (including third-party actions likeactions/download-artifactandcodecov/codecov-action). To reduce secret exposure, scope this env var to only the Mavenrun:steps that actually need it (or clear it for steps that don't).
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
.github/workflows/sonar-check.yml:28
DEVELOCITY_ACCESS_KEYis set at workflow scope, which exposes the secret to all steps, including third-party actions (actions/cache,codecov/codecov-action). Prefer scoping the secret to only the Maven steps that require it to minimize the blast radius if an action prints or forwards environment variables.
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
.github/workflows/main-sonar-check.yml:29
DEVELOCITY_ACCESS_KEYis set at workflow scope, which exposes the secret to all steps (including third-party actions likeactions/cacheandcodecov/codecov-action). Consider moving it to step-level env on the Maven steps that need it.
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
Hi @nvazquez, I have resolved the merge conflicts, bumped the Develocity and CCUD extensions to their latest versions, and updated the secret name to match what ASF Infra has set up. |
@GutoVeronezi, it was nice meeting you at Community over Code today. This PR will enable you to publish Build Scans to develocity.apache.org as discussed.
Description
This PR publishes a build scan for every CI build and for every local build from an authenticated Apache committer. The build will not fail if publishing fails. Local and remote caching was left disabled on this PR by design so that the build is not affected by this change.
The build scans of the Apache Cloudstack project are published to the Develocity instance at develocity.apache.org, hosted by the Apache Software Foundation and run in partnership between the ASF and Gradle. This Develocity instance has all features and extensions enabled and is freely available for use by the Apache Cloudstack project and all other Apache projects.
On this Develocity instance, Apache Cloudstack will have access not only to all of the published build scans but other aggregate data features such as:
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.
Types of changes