Skip to content

[release/10.0.1xx] [build] Recommend latest supported JDK in workload metadata - #12543

Merged
jonathanpeppers merged 1 commit into
release/10.0.1xxfrom
backport/pr-12500-to-release/10.0.1xx
Aug 28, 2026
Merged

jonathanpeppers merged 1 commit into
release/10.0.1xxfrom
backport/pr-12500-to-release/10.0.1xx

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Backport of #12500 to release/10.0.1xx

/cc @jonathanpeppers @Redth

## Summary

- select `jdk.recommendedVersion` from the newest non-preview, non-obsolete JDK in the Android installer feed within the workload's supported JDK range
- carry the normalized `Version` used for revision ordering into range filtering while preserving the original feed revision string for output
- continue accepting single-component feed revisions such as `revision="21"`
- preserve the existing compatibility range while allowing installer feed refreshes to advance the recommended Microsoft OpenJDK release

For the current stable inputs, this changes `recommendedVersion` from `17.0.14` to `21.0.9` while leaving `version` at `[17.0,22.0)`. This prevents setup tools that honor `recommendedVersion` from proposing JDK 17 when JDK 21 is supported and preferred.

## Testing

- `dotnet build tools/workload-dependencies/workload-dependencies.csproj -p:DotNetStableTargetFramework=net10.0 -p:MonoOptionsVersion=6.12.0.148 -p:NewtonsoftJsonPackageVersion=13.0.3 --no-restore --nologo`
- generated stable workload metadata with `JavaSdkVersion=17.0.14` and `LatestSupportedJavaVersion=21.0.99`; verified `version: "[17.0,22.0)"` and `recommendedVersion: "21.0.9"`
- ran `GenerateWorkloadDependencies` through `tools/workload-dependencies/WorkloadDependencies.proj`; verified packaged `data/WorkloadDependencies.json` contains the expected JDK metadata
- generated with a JDK 17 maximum and verified the range filter retains `recommendedVersion: "17.0.14"`

Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.

@jonathanpeppers jonathanpeppers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I reran some of the test lanes, to see if it would be slightly greener.

@jonathanpeppers

jonathanpeppers commented Aug 28, 2026 •

Copy link
Copy Markdown
Member

Checked the build artifacts from Azure DevOps build 15122095. The generated and packaged WorkloadDependencies.json now contains jdk.version: [17.0,22.0) and jdk.recommendedVersion: 21.0.6. This looks fixed for the release branch's feed inputs.

@jonathanpeppers
jonathanpeppers merged commit c67ff29 into release/10.0.1xx Aug 28, 2026
2 checks passed
@jonathanpeppers
jonathanpeppers deleted the backport/pr-12500-to-release/10.0.1xx branch August 28, 2026 15:11
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants