mirror of
https://github.com/actions/setup-java.git
synced 2026-04-07 06:48:53 +00:00
Fix codex P1 issues: Remove TCK filter for EA and use aarch64 for ARM64
- Conditional TCK certification filter: only apply certifications=tck to GA releases, not EA - Change ARM 64-bit arch parameter from arm64 to aarch64 to match API expectations - Update tests to reflect these changes (EA URLs no longer have certifications=tck, ARM64 uses aarch64) Agent-Logs-Url: https://github.com/nbauma109/setup-java/sessions/fd061273-f16e-4ec7-9790-3b46d7823528 Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com>
This commit is contained in:
parent
48d05a6851
commit
bb2f571838
@ -49,7 +49,7 @@ describe('getAvailableVersions', () => {
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
'?os=linux-glibc&arch=x86&archive_type=zip&java_package_type=jdk&javafx_bundled=false&crac_supported=false&release_status=ea&availability_types=ca&certifications=tck&page=1&page_size=100'
|
||||
'?os=linux-glibc&arch=x86&archive_type=zip&java_package_type=jdk&javafx_bundled=false&crac_supported=false&release_status=ea&availability_types=ca&page=1&page_size=100'
|
||||
],
|
||||
[
|
||||
{
|
||||
@ -94,7 +94,7 @@ describe('getAvailableVersions', () => {
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
'?os=linux-glibc&arch=arm64&archive_type=zip&java_package_type=jdk&javafx_bundled=false&crac_supported=false&release_status=ga&availability_types=ca&certifications=tck&page=1&page_size=100'
|
||||
'?os=linux-glibc&arch=aarch64&archive_type=zip&java_package_type=jdk&javafx_bundled=false&crac_supported=false&release_status=ga&availability_types=ca&certifications=tck&page=1&page_size=100'
|
||||
],
|
||||
[
|
||||
{
|
||||
@ -139,7 +139,7 @@ describe('getAvailableVersions', () => {
|
||||
distribution['getPlatformOption'] = () => 'linux';
|
||||
// Override extension for linux default arch case to match util behavior
|
||||
spyUtilGetDownloadArchiveExtension.mockReturnValue('tar.gz');
|
||||
const expectedArch = distroArch.bitness === '64' && distroArch.arch === 'x86' ? 'x64' : distroArch.bitness === '64' && distroArch.arch === 'arm' ? 'arm64' : distroArch.arch;
|
||||
const expectedArch = distroArch.bitness === '64' && distroArch.arch === 'x86' ? 'x64' : distroArch.bitness === '64' && distroArch.arch === 'arm' ? 'aarch64' : distroArch.arch;
|
||||
const buildUrl = `https://api.azul.com/metadata/v1/zulu/packages/?os=linux-glibc&arch=${expectedArch}&archive_type=tar.gz&java_package_type=jdk&javafx_bundled=false&crac_supported=false&release_status=ga&availability_types=ca&certifications=tck&page=1&page_size=100`;
|
||||
|
||||
await distribution['getAvailableVersions']();
|
||||
|
||||
@ -49,7 +49,7 @@ describe('getAvailableVersions', () => {
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
'?os=windows&arch=x86&archive_type=zip&java_package_type=jdk&javafx_bundled=false&crac_supported=false&release_status=ea&availability_types=ca&certifications=tck&page=1&page_size=100'
|
||||
'?os=windows&arch=x86&archive_type=zip&java_package_type=jdk&javafx_bundled=false&crac_supported=false&release_status=ea&availability_types=ca&page=1&page_size=100'
|
||||
],
|
||||
[
|
||||
{
|
||||
@ -94,7 +94,7 @@ describe('getAvailableVersions', () => {
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
'?os=windows&arch=arm64&archive_type=zip&java_package_type=jdk&javafx_bundled=false&crac_supported=false&release_status=ga&availability_types=ca&certifications=tck&page=1&page_size=100'
|
||||
'?os=windows&arch=aarch64&archive_type=zip&java_package_type=jdk&javafx_bundled=false&crac_supported=false&release_status=ga&availability_types=ca&certifications=tck&page=1&page_size=100'
|
||||
],
|
||||
[
|
||||
{
|
||||
@ -137,7 +137,7 @@ describe('getAvailableVersions', () => {
|
||||
checkLatest: false
|
||||
});
|
||||
distribution['getPlatformOption'] = () => 'windows';
|
||||
const expectedArch = distroArch.bitness === '64' && distroArch.arch === 'x86' ? 'x64' : distroArch.bitness === '64' && distroArch.arch === 'arm' ? 'arm64' : distroArch.arch;
|
||||
const expectedArch = distroArch.bitness === '64' && distroArch.arch === 'x86' ? 'x64' : distroArch.bitness === '64' && distroArch.arch === 'arm' ? 'aarch64' : distroArch.arch;
|
||||
const buildUrl = `https://api.azul.com/metadata/v1/zulu/packages/?os=windows&arch=${expectedArch}&archive_type=zip&java_package_type=jdk&javafx_bundled=false&crac_supported=false&release_status=ga&availability_types=ca&certifications=tck&page=1&page_size=100`;
|
||||
|
||||
await distribution['getAvailableVersions']();
|
||||
|
||||
8
dist/setup/index.js
vendored
8
dist/setup/index.js
vendored
@ -114805,7 +114805,9 @@ class ZuluDistribution extends base_installer_1.JavaBase {
|
||||
`crac_supported=${crac}`,
|
||||
`release_status=${releaseStatus}`,
|
||||
`availability_types=ca`,
|
||||
`certifications=tck`,
|
||||
// Only filter by TCK certification for GA releases
|
||||
// EA releases typically don't have TCK certification
|
||||
releaseStatus === 'ga' ? `certifications=tck` : '',
|
||||
`page=${page}`,
|
||||
`page_size=${pageSize}`
|
||||
]
|
||||
@ -114871,7 +114873,7 @@ class ZuluDistribution extends base_installer_1.JavaBase {
|
||||
}
|
||||
getArchParam(arch, hw_bitness) {
|
||||
// Map architecture to new metadata API arch parameter
|
||||
// The new API uses x64, x86, arm64, arm (not the legacy x86 + hw_bitness pattern)
|
||||
// The new API uses x64, x86, aarch64, arm
|
||||
if (arch === 'x86' && hw_bitness === '64') {
|
||||
return 'x64';
|
||||
}
|
||||
@ -114879,7 +114881,7 @@ class ZuluDistribution extends base_installer_1.JavaBase {
|
||||
return 'x86';
|
||||
}
|
||||
else if (arch === 'arm' && hw_bitness === '64') {
|
||||
return 'arm64';
|
||||
return 'aarch64';
|
||||
}
|
||||
else if (arch === 'arm' && hw_bitness === '') {
|
||||
return 'arm';
|
||||
|
||||
@ -133,7 +133,9 @@ export class ZuluDistribution extends JavaBase {
|
||||
`crac_supported=${crac}`,
|
||||
`release_status=${releaseStatus}`,
|
||||
`availability_types=ca`,
|
||||
`certifications=tck`,
|
||||
// Only filter by TCK certification for GA releases
|
||||
// EA releases typically don't have TCK certification
|
||||
releaseStatus === 'ga' ? `certifications=tck` : '',
|
||||
`page=${page}`,
|
||||
`page_size=${pageSize}`
|
||||
]
|
||||
@ -216,13 +218,13 @@ export class ZuluDistribution extends JavaBase {
|
||||
|
||||
private getArchParam(arch: string, hw_bitness: string): string {
|
||||
// Map architecture to new metadata API arch parameter
|
||||
// The new API uses x64, x86, arm64, arm (not the legacy x86 + hw_bitness pattern)
|
||||
// The new API uses x64, x86, aarch64, arm
|
||||
if (arch === 'x86' && hw_bitness === '64') {
|
||||
return 'x64';
|
||||
} else if (arch === 'x86' && hw_bitness === '32') {
|
||||
return 'x86';
|
||||
} else if (arch === 'arm' && hw_bitness === '64') {
|
||||
return 'arm64';
|
||||
return 'aarch64';
|
||||
} else if (arch === 'arm' && hw_bitness === '') {
|
||||
return 'arm';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user