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

Gradle plugin: optionally respect non-quarkus.* cache-relevant properties #35003

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

snazy
Copy link
Contributor

@snazy snazy commented Jul 25, 2023

Currently the Gradle plugin considers only system properties starting with quarkus. (and env vars starting with QUARKUS_) as relevant for Gradle's cache key. This is on purpose to not cause unnecessary rebuilds, because especially system properties can contain entries that are rather "random-ish". But other environment variables or system properties cannot be specified as "relevant".

This change introduces a new list-property cachingRelevantProperties on the Quarkus Gradle extension object to tell the Quarkus Gradle plugin to consider the specified properties/env-vars as input(s) for the tasks. This list-property accepts regex patterns, and by default contains quarkus[.].*, matching the current .startsWith("quarkus.").

Fixes #34869

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/gradle Gradle labels Jul 25, 2023
@snazy
Copy link
Contributor Author

snazy commented Jul 25, 2023

/cc @gsmet

@github-actions
Copy link

github-actions bot commented Jul 25, 2023

🙈 The PR is closed and the preview is expired.

@quarkus-bot

This comment has been minimized.

…erties

Currently the Gradle plugin considers only system properties starting with `quarkus.` (and env vars starting with `QUARKUS_`) as relevant for Gradle's cache key. This is on purpose to not cause unnecessary rebuilds, because especially system properties can contain entries that are rather "random-ish". But other environment variables or system properties cannot be specified as "relevant".

This change introduces a new list-property `cachingRelevantProperties` on the Quarkus Gradle extension object to tell the Quarkus Gradle plugin to consider the specified properties/env-vars as input(s) for the tasks. This list-property accepts regex patterns, and by default contains `quarkus[.].*`, matching the current `.startsWith("quarkus.")`.

Fixes quarkusio#34869
@snazy
Copy link
Contributor Author

snazy commented Jul 26, 2023

Although this change introduces a new property on the extension object, it's probably worth backporting this to 3.2 (should apply cleanly).

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 26, 2023

✔️ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@gsmet
Copy link
Member

gsmet commented Aug 23, 2023

@aloubyansky this one seems to have fallen through the cracks.

@aloubyansky aloubyansky merged commit f29fa19 into quarkusio:main Aug 23, 2023
24 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.4 - main milestone Aug 23, 2023
@snazy snazy deleted the relevant-build-env-vars branch August 23, 2023 14:10
@gsmet gsmet modified the milestones: 3.4 - main, 3.3.1 Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/gradle Gradle kind/bugfix
Projects
3 participants