Repository navigation
[build] Recommend latest supported JDK in workload metadata - #12500
Conversation
Select the newest non-preview JDK from the installer feed within the workload's supported range instead of reusing the build JDK version. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4b3f9f46-be20-4288-af69-a4f32ef172a1
There was a problem hiding this comment.
Pull request overview
Updates workload metadata to recommend the newest supported, non-preview JDK release while preserving the compatibility range.
Changes:
- Filters JDK revisions to the supported range.
- Selects the latest eligible release.
- Preserves the existing compatibility range.
|
I don't think we even support the 17, where is the 17 coming from? See also: So, we might recommend 21 in .NET 11 and allow up to 25 -- still need to get it working, though. |
|
I traced the Specifically,
{
"version": "[17.0,22.0)",
"recommendedVersion": "17.0.14"
}The NuGet package identifies source commit Current |
|
/review |
|
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
❌ Reject
Findings: 1 error, 0 warnings, 0 suggestions.
The supported-range selection fixes the stale JDK recommendation and all 45 reported checks are green. However, the new filter bypasses existing revision normalization and can fail on a previously accepted feed value; address the inline finding before merge.
Generated by Android PR Reviewer for #12500 · gpt56 · 97.8 AIC · ⌖ 8.79 AIC · ⊞ 25.7K
Comment /review to run again
Carry the normalized Version through revision selection so single-component feed revisions remain supported, and add CI regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove the dedicated test project and CI wiring while retaining the normalized revision fix. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 70004bfe-9b49-444e-b9be-f15d14383473
|
/backport to release/10.0.1xx |
|
Started backporting to |
…12543) ## 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 Dick <jondick@gmail.com> Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Summary
jdk.recommendedVersionfrom the newest non-preview, non-obsolete JDK in the Android installer feed within the workload's supported JDK rangeVersionused for revision ordering into range filtering while preserving the original feed revision string for outputrevision="21"For the current stable inputs, this changes
recommendedVersionfrom17.0.14to21.0.9while leavingversionat[17.0,22.0). This prevents setup tools that honorrecommendedVersionfrom 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 --nologoJavaSdkVersion=17.0.14andLatestSupportedJavaVersion=21.0.99; verifiedversion: "[17.0,22.0)"andrecommendedVersion: "21.0.9"GenerateWorkloadDependenciesthroughtools/workload-dependencies/WorkloadDependencies.proj; verified packageddata/WorkloadDependencies.jsoncontains the expected JDK metadatarecommendedVersion: "17.0.14"