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

baseline-java-versions: explainJavaVersions task #3079

Merged
merged 5 commits into from
Mar 21, 2025

Conversation

CRogers
Copy link
Contributor

@CRogers CRogers commented Mar 21, 2025

Before this PR

It's hard to work out which versions baseline-java-versions has chosen for each project without looking at the logs or debugging.

After this PR

==COMMIT_MSG==
baseline-java-versions: Provide an explainJavaVersions task that makes it easier to work out which target and runtime java versions have been chosen by the plugin and why.
==COMMIT_MSG==

Example output from a repo:

> Task :project-api:explainJavaVersions
target  = 21 (default value was 17 - changed by a Gradle script or plugin)
runtime = 21 (default value)
Reason: considered a library because it didn't match any other conditions that would indicate it was a distribution:
  * It did not have a distribution plugin: [com.palantir.external-publish-dist, com.palantir.publish-dist, com.palantir.sls-java-service-distribution]
  * It had a publishing extension, indicating *something* that isn't a known distribution type is being published. The publications in this extensions are [auditSchema, conjure]
Despite not having any library publish plugins ([com.palantir.external-publish-jar, com.palantir.publish-jar]), this is conservatively regarded as a library for safety.

> Task :project-adjudicator-provider:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

> Task :project-adjudicator-api:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

> Task :project-adjudicator-impl-installation:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

> Task :project-commons:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

> Task :project-adjudicator-impl-release-channel-promotion:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

> Task :project-internal-api:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a library because it didn't match any other conditions that would indicate it was a distribution:
  * It did not have a distribution plugin: [com.palantir.external-publish-dist, com.palantir.publish-dist, com.palantir.sls-java-service-distribution]
  * It had a publishing extension, indicating *something* that isn't a known distribution type is being published. The publications in this extensions are [auditSchema, conjure]
Despite not having any library publish plugins ([com.palantir.external-publish-jar, com.palantir.publish-jar]), this is conservatively regarded as a library for safety.

> Task :extras:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

> Task :project-api:project-api-objects:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a library because it has the 'com.palantir.publish-jar' plugin applied

> Task :project-api:project-api-typescript:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

> Task :project:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it has the 'com.palantir.publish-dist' plugin applied

> Task :project-api:project-api-undertow:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a library because it has the 'com.palantir.publish-jar' plugin applied

> Task :project-constraints:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

> Task :project-store-alta:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

> Task :project-internal-api:project-internal-api-objects:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

> Task :project-api:audited-project-api:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a library because it has the 'com.palantir.publish-jar' plugin applied

> Task :project-store-api:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a library because it didn't match any other conditions that would indicate it was a distribution:
  * It did not have a distribution plugin: [com.palantir.external-publish-dist, com.palantir.publish-dist, com.palantir.sls-java-service-distribution]
  * It had a publishing extension, indicating *something* that isn't a known distribution type is being published. The publications in this extensions are [auditSchema, conjure]
Despite not having any library publish plugins ([com.palantir.external-publish-jar, com.palantir.publish-jar]), this is conservatively regarded as a library for safety.

> Task :project-internal-api:audited-project-internal-api:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

> Task :project-store-api:audited-project-store-api:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

> Task :project-api:project-api-dialogue:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a library because it has the 'com.palantir.publish-jar' plugin applied

> Task :project-store-api:project-store-api-objects:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

> Task :extras:test-common:explainJavaVersions
target  = 17 (default value)
runtime = 21 (default value)
Reason: considered a distribution because it doesn't have any publishing extensions defined

Possible downsides?

@CRogers CRogers requested a review from felixdesouza March 21, 2025 17:04
@changelog-app
Copy link

changelog-app bot commented Mar 21, 2025

Generate changelog in changelog/@unreleased

What do the change types mean?
  • feature: A new feature of the service.
  • improvement: An incremental improvement in the functionality or operation of the service.
  • fix: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way.
  • break: Has the potential to break consumers of this service's API, inclusive of both Palantir services
    and external consumers of the service's API (e.g. customer-written software or integrations).
  • deprecation: Advertises the intention to remove service functionality without any change to the
    operation of the service itself.
  • manualTask: Requires the possibility of manual intervention (running a script, eyeballing configuration,
    performing database surgery, ...) at the time of upgrade for it to succeed.
  • migration: A fully automatic upgrade migration task with no engineer input required.

Note: only one type should be chosen.

How are new versions calculated?
  • ❗The break and manual task changelog types will result in a major release!
  • 🐛 The fix changelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease.
  • ✨ All others will result in a minor version release.

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

baseline-java-versions: Provide an explainJavaVersions task that makes it easier to work out which target and runtime java versions have been chosen by the plugin and why.

Check the box to generate changelog(s)

  • Generate changelog entry

Sorry, something went wrong.

svc-changelog and others added 3 commits March 21, 2025 17:05

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…radle-baseline into callumr/explain-java-versions
felixdesouza
felixdesouza previously approved these changes Mar 21, 2025
@policy-bot policy-bot bot dismissed felixdesouza’s stale review March 21, 2025 17:35

Invalidated by push of 44167b8

@felixdesouza
Copy link
Contributor

👍

@bulldozer-bot bulldozer-bot bot merged commit c749360 into develop Mar 21, 2025
5 checks passed
@bulldozer-bot bulldozer-bot bot deleted the callumr/explain-java-versions branch March 21, 2025 17:42
@autorelease3
Copy link

autorelease3 bot commented Mar 21, 2025

Released 6.22.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants