You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "merlimat (via GitHub)" <gi...@apache.org> on 2026/09/17 22:56:12 UTC
[PR] [improve][build] Resolve the integration-test commit id lazily to keep the configuration cache reusable [pulsar]
merlimat opened a new pull request, #26638:
URL: https://github.com/apache/pulsar/pull/26638
### Motivation
`tests/integration/build.gradle.kts` obtains the short git commit id, which `PulsarContainer` stamps into the async-profiler output file names, by calling `.get()` on a `providers.exec` provider while the script is evaluated. A process output obtained at configuration time is a configuration cache input, so every commit, cherry-pick, rebase or checkout discards the cached configuration of any build that configures the module. That is every build here, since the module is evaluated even for a root-only task such as `help`:
```
Calculating task graph as configuration cache cannot be reused because output of the external process 'git' has changed.
```
The commit id is only a label in a file name and does not need to be known while configuring.
### Modifications
- Keep the commit id as a provider: the `git.commit.id.abbrev` Gradle property, falling back to the `providers.exec` output, without reading it at configuration time.
- Read it in a `doFirst` action of the two integration test tasks and set the system property there. The provider is copied into a local first so the action does not capture the script object. The empty-id fallback for a tree built without git is kept.
### Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Checked locally with Gradle 9.7.1:
- Configuration cache entries for `help`, `:tests:integration:integrationTest --dry-run` and `assemble --dry-run` are reused after an empty commit moves HEAD. Before the change, the same experiment discarded all three.
- With `--info`, no `git` process is started during configuration.
- A scratch TestNG build using the same pattern receives the current commit id in the forked JVM, picks up a new commit on the next run while still reusing the cache, and honors `-Pgit.commit.id.abbrev`.
- `./gradlew quickCheck` passes.
### Does this pull request potentially affect one of the following parts:
*If the box was checked, please highlight the changes*
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [ ] The REST endpoints
- [ ] The admin CLI options
- [ ] The metrics
- [ ] Anything that affects deployment
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve][build] Resolve the integration-test commit id lazily to keep the configuration cache reusable [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #26638:
URL: https://github.com/apache/pulsar/pull/26638
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org