Repository navigation
Description
Description:
SapMachine release filtering is one-sided. SapMachineDistribution.parseVersions() excludes EA entries when a stable version is requested, but it does not exclude GA entries when an EA version is requested. The base installer normalizes <major>-ea to <major> and records stable = false, so both release classes remain eligible for the same SemVer range. Descending SemVer/build sorting can then place a GA release first.
The one-sided predicate is at installer.ts lines 177-180, after EA normalization sets the stability flag at base-installer.ts lines 509-515. The remaining candidates are sorted newest-first at installer.ts lines 225-234.
Task version:
v6 (current main at ab597f914a6894678251803485c09f413263b889)
Platform:
- Ubuntu
- macOS
- Windows
The defect is platform-independent because it occurs while filtering the SapMachine manifest.
Runner type:
- Hosted
- Self-hosted
Repro steps:
Use a deterministic SapMachine manifest fixture with two matching Linux x64 JDK entries under major 25:
{
"25": {
"lts": "false",
"updates": {
"25.0.1": {
"sapmachine-25.0.1": { "ea": "false", "assets": { "jdk": { "linux-x64": { "tar.gz": { "name": "ga", "checksum": "ga", "url": "https://example.test/ga.tar.gz" } } } } }
},
"25": {
"sapmachine-25+10": { "ea": "true", "assets": { "jdk": { "linux-x64": { "tar.gz": { "name": "ea", "checksum": "ea", "url": "https://example.test/ea.tar.gz" } } } } }
}
}
}
}Construct SapMachineDistribution with version: "25-ea", architecture: "x64", and packageType: "jdk"; mock the manifest response and Linux platform; then call findPackageForDownload("25"). Both 25.0.1 (GA) and 25.0.0+10 (EA) pass the current filter and satisfy the normalized range. sortParsedVersions() orders 25.0.1 first, so the GA URL is selected.
Expected behavior:
An EA request selects only entries marked as early access and resolves https://example.test/ea.tar.gz. Stable requests continue to select only GA entries. Exact-version matching, package/platform filtering, and sorting within the selected release class remain unchanged.
Actual behavior:
The EA request keeps both GA and EA entries and resolves https://example.test/ga.tar.gz.
Acceptance criteria:
- Stable and EA SapMachine requests filter to mutually exclusive release classes.
java-version: <major>-eacannot resolve a stable SapMachine build.- String and boolean forms of SapMachine EA metadata are classified consistently.
- Exact-version behavior, package/platform filtering, sorting, and existing stable resolution remain unchanged.
- A regression fixture contains competing GA and EA candidates that fails under the current implementation and selects the EA candidate after the fix.
Activity