Compare commits
3 Commits
a9d4b30201
...
cbf9b8df1b
| Author | SHA1 | Date |
|---|---|---|
|
|
cbf9b8df1b | |
|
|
bf96286433 | |
|
|
07e4e83111 |
|
|
@ -21,7 +21,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
|
@ -46,7 +46,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
needs: gradle-save
|
needs: gradle-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -70,7 +70,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
|
@ -93,7 +93,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
needs: maven-save
|
needs: maven-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -121,7 +121,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-22.04]
|
os: [macos-15-intel, windows-latest, ubuntu-22.04]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
|
@ -133,7 +133,7 @@ jobs:
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
cache: sbt
|
cache: sbt
|
||||||
- name: Setup SBT
|
- name: Setup SBT
|
||||||
if: matrix.os == 'macos-13'
|
if: matrix.os == 'macos-15-intel'
|
||||||
run: |
|
run: |
|
||||||
echo ""Installing SBT...""
|
echo ""Installing SBT...""
|
||||||
brew install sbt
|
brew install sbt
|
||||||
|
|
@ -141,7 +141,7 @@ jobs:
|
||||||
run: sbt update
|
run: sbt update
|
||||||
|
|
||||||
- name: Check files to cache on macos-latest
|
- name: Check files to cache on macos-latest
|
||||||
if: matrix.os == 'macos-13'
|
if: matrix.os == 'macos-15-intel'
|
||||||
run: |
|
run: |
|
||||||
if [ ! -d ~/Library/Caches/Coursier ]; then
|
if [ ! -d ~/Library/Caches/Coursier ]; then
|
||||||
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
||||||
|
|
@ -170,7 +170,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-22.04]
|
os: [macos-15-intel, windows-latest, ubuntu-22.04]
|
||||||
needs: sbt-save
|
needs: sbt-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -184,7 +184,7 @@ jobs:
|
||||||
cache: sbt
|
cache: sbt
|
||||||
|
|
||||||
- name: Confirm that ~/Library/Caches/Coursier directory has been made
|
- name: Confirm that ~/Library/Caches/Coursier directory has been made
|
||||||
if: matrix.os == 'macos-13'
|
if: matrix.os == 'macos-15-intel'
|
||||||
run: |
|
run: |
|
||||||
if [ ! -d ~/Library/Caches/Coursier ]; then
|
if [ ! -d ~/Library/Caches/Coursier ]; then
|
||||||
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
distribution: [
|
distribution: [
|
||||||
'temurin',
|
'temurin',
|
||||||
'adopt',
|
'adopt',
|
||||||
|
|
@ -39,7 +39,7 @@ jobs:
|
||||||
- distribution: microsoft
|
- distribution: microsoft
|
||||||
version: 8
|
version: 8
|
||||||
- distribution: dragonwell
|
- distribution: dragonwell
|
||||||
os: macos-13
|
os: macos-15-intel
|
||||||
include:
|
include:
|
||||||
- distribution: microsoft
|
- distribution: microsoft
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
@ -51,7 +51,7 @@ jobs:
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
version: 25
|
version: 25
|
||||||
- distribution: oracle
|
- distribution: oracle
|
||||||
os: macos-13
|
os: macos-15-intel
|
||||||
version: 17
|
version: 17
|
||||||
- distribution: oracle
|
- distribution: oracle
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
@ -229,7 +229,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
version: ['17-ea', '15.0.0-ea.14']
|
version: ['17-ea', '15.0.0-ea.14']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -295,7 +295,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
distribution:
|
distribution:
|
||||||
['temurin', 'zulu', 'liberica', 'semeru', 'sapmachine', 'jetbrains']
|
['temurin', 'zulu', 'liberica', 'semeru', 'sapmachine', 'jetbrains']
|
||||||
java-package: ['jre']
|
java-package: ['jre']
|
||||||
|
|
|
||||||
|
|
@ -129864,17 +129864,19 @@ class JavaBase {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.info('Trying to resolve the latest version from remote');
|
core.info('Trying to resolve the latest version from remote');
|
||||||
let retries = 4;
|
const MAX_RETRIES = 4;
|
||||||
|
const RETRY_DELAY_MS = 2000;
|
||||||
const retryableCodes = [
|
const retryableCodes = [
|
||||||
'ETIMEDOUT',
|
'ETIMEDOUT',
|
||||||
'ECONNRESET',
|
'ECONNRESET',
|
||||||
'ENOTFOUND',
|
'ENOTFOUND',
|
||||||
'ECONNREFUSED'
|
'ECONNREFUSED'
|
||||||
];
|
];
|
||||||
|
let retries = MAX_RETRIES;
|
||||||
while (retries > 0) {
|
while (retries > 0) {
|
||||||
try {
|
try {
|
||||||
// Clear console timers before each attempt to prevent conflicts
|
// Clear console timers before each attempt to prevent conflicts
|
||||||
if (retries < 4 && core.isDebug()) {
|
if (retries < MAX_RETRIES && core.isDebug()) {
|
||||||
const consoleAny = console;
|
const consoleAny = console;
|
||||||
(_b = (_a = consoleAny._times) === null || _a === void 0 ? void 0 : _a.clear) === null || _b === void 0 ? void 0 : _b.call(_a);
|
(_b = (_a = consoleAny._times) === null || _a === void 0 ? void 0 : _a.clear) === null || _b === void 0 ? void 0 : _b.call(_a);
|
||||||
}
|
}
|
||||||
|
|
@ -129902,7 +129904,7 @@ class JavaBase {
|
||||||
error.errors.some((err) => retryableCodes.includes(err === null || err === void 0 ? void 0 : err.code)));
|
error.errors.some((err) => retryableCodes.includes(err === null || err === void 0 ? void 0 : err.code)));
|
||||||
if (retries > 0 && isRetryable) {
|
if (retries > 0 && isRetryable) {
|
||||||
core.debug(`Attempt failed due to network or timeout issues, initiating retry... (${retries} attempts left)`);
|
core.debug(`Attempt failed due to network or timeout issues, initiating retry... (${retries} attempts left)`);
|
||||||
yield new Promise(r => setTimeout(r, 2000));
|
yield new Promise(r => setTimeout(r, RETRY_DELAY_MS));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (error instanceof tc.HTTPError) {
|
if (error instanceof tc.HTTPError) {
|
||||||
|
|
@ -129925,7 +129927,13 @@ class JavaBase {
|
||||||
const endpoint = (err === null || err === void 0 ? void 0 : err.address) || (err === null || err === void 0 ? void 0 : err.hostname) || '';
|
const endpoint = (err === null || err === void 0 ? void 0 : err.address) || (err === null || err === void 0 ? void 0 : err.hostname) || '';
|
||||||
const port = (err === null || err === void 0 ? void 0 : err.port) ? `:${err.port}` : '';
|
const port = (err === null || err === void 0 ? void 0 : err.port) ? `:${err.port}` : '';
|
||||||
const message = (err === null || err === void 0 ? void 0 : err.message) || 'Aggregate error';
|
const message = (err === null || err === void 0 ? void 0 : err.message) || 'Aggregate error';
|
||||||
const logMessage = `${message}${!message.includes(endpoint) ? ` ${endpoint}${port}` : ''}${err.localAddress && err.localPort ? ` - Local (${err.localAddress}:${err.localPort})` : ''}`;
|
const endpointInfo = !message.includes(endpoint)
|
||||||
|
? ` ${endpoint}${port}`
|
||||||
|
: '';
|
||||||
|
const localInfo = err.localAddress && err.localPort
|
||||||
|
? ` - Local (${err.localAddress}:${err.localPort})`
|
||||||
|
: '';
|
||||||
|
const logMessage = `${message}${endpointInfo}${localInfo}`;
|
||||||
core.error(logMessage);
|
core.error(logMessage);
|
||||||
core.debug(`${err.stack || err.message}`);
|
core.debug(`${err.stack || err.message}`);
|
||||||
Object.entries(err).forEach(([key, value]) => {
|
Object.entries(err).forEach(([key, value]) => {
|
||||||
|
|
@ -129941,7 +129949,10 @@ class JavaBase {
|
||||||
}
|
}
|
||||||
const errorDetails = Object.assign({ name: error.name, message: error.message }, Object.getOwnPropertyNames(error)
|
const errorDetails = Object.assign({ name: error.name, message: error.message }, Object.getOwnPropertyNames(error)
|
||||||
.filter(prop => !['name', 'message', 'stack'].includes(prop))
|
.filter(prop => !['name', 'message', 'stack'].includes(prop))
|
||||||
.reduce((acc, prop) => (Object.assign(Object.assign({}, acc), { [prop]: error[prop] })), {}));
|
.reduce((acc, prop) => {
|
||||||
|
acc[prop] = error[prop];
|
||||||
|
return acc;
|
||||||
|
}, {}));
|
||||||
Object.entries(errorDetails).forEach(([key, value]) => {
|
Object.entries(errorDetails).forEach(([key, value]) => {
|
||||||
core.debug(`"${key}": ${JSON.stringify(value)}`);
|
core.debug(`"${key}": ${JSON.stringify(value)}`);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -51,17 +51,19 @@ export abstract class JavaBase {
|
||||||
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
|
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
|
||||||
} else {
|
} else {
|
||||||
core.info('Trying to resolve the latest version from remote');
|
core.info('Trying to resolve the latest version from remote');
|
||||||
let retries = 4;
|
const MAX_RETRIES = 4;
|
||||||
|
const RETRY_DELAY_MS = 2000;
|
||||||
const retryableCodes = [
|
const retryableCodes = [
|
||||||
'ETIMEDOUT',
|
'ETIMEDOUT',
|
||||||
'ECONNRESET',
|
'ECONNRESET',
|
||||||
'ENOTFOUND',
|
'ENOTFOUND',
|
||||||
'ECONNREFUSED'
|
'ECONNREFUSED'
|
||||||
];
|
];
|
||||||
|
let retries = MAX_RETRIES;
|
||||||
while (retries > 0) {
|
while (retries > 0) {
|
||||||
try {
|
try {
|
||||||
// Clear console timers before each attempt to prevent conflicts
|
// Clear console timers before each attempt to prevent conflicts
|
||||||
if (retries < 4 && core.isDebug()) {
|
if (retries < MAX_RETRIES && core.isDebug()) {
|
||||||
const consoleAny = console as any;
|
const consoleAny = console as any;
|
||||||
consoleAny._times?.clear?.();
|
consoleAny._times?.clear?.();
|
||||||
}
|
}
|
||||||
|
|
@ -92,7 +94,7 @@ export abstract class JavaBase {
|
||||||
core.debug(
|
core.debug(
|
||||||
`Attempt failed due to network or timeout issues, initiating retry... (${retries} attempts left)`
|
`Attempt failed due to network or timeout issues, initiating retry... (${retries} attempts left)`
|
||||||
);
|
);
|
||||||
await new Promise(r => setTimeout(r, 2000));
|
await new Promise(r => setTimeout(r, RETRY_DELAY_MS));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (error instanceof tc.HTTPError) {
|
if (error instanceof tc.HTTPError) {
|
||||||
|
|
@ -116,7 +118,14 @@ export abstract class JavaBase {
|
||||||
const endpoint = err?.address || err?.hostname || '';
|
const endpoint = err?.address || err?.hostname || '';
|
||||||
const port = err?.port ? `:${err.port}` : '';
|
const port = err?.port ? `:${err.port}` : '';
|
||||||
const message = err?.message || 'Aggregate error';
|
const message = err?.message || 'Aggregate error';
|
||||||
const logMessage = `${message}${!message.includes(endpoint) ? ` ${endpoint}${port}` : ''}${err.localAddress && err.localPort ? ` - Local (${err.localAddress}:${err.localPort})` : ''}`;
|
const endpointInfo = !message.includes(endpoint)
|
||||||
|
? ` ${endpoint}${port}`
|
||||||
|
: '';
|
||||||
|
const localInfo =
|
||||||
|
err.localAddress && err.localPort
|
||||||
|
? ` - Local (${err.localAddress}:${err.localPort})`
|
||||||
|
: '';
|
||||||
|
const logMessage = `${message}${endpointInfo}${localInfo}`;
|
||||||
core.error(logMessage);
|
core.error(logMessage);
|
||||||
core.debug(`${err.stack || err.message}`);
|
core.debug(`${err.stack || err.message}`);
|
||||||
Object.entries(err).forEach(([key, value]) => {
|
Object.entries(err).forEach(([key, value]) => {
|
||||||
|
|
@ -135,7 +144,10 @@ export abstract class JavaBase {
|
||||||
message: error.message,
|
message: error.message,
|
||||||
...Object.getOwnPropertyNames(error)
|
...Object.getOwnPropertyNames(error)
|
||||||
.filter(prop => !['name', 'message', 'stack'].includes(prop))
|
.filter(prop => !['name', 'message', 'stack'].includes(prop))
|
||||||
.reduce((acc, prop) => ({...acc, [prop]: error[prop]}), {})
|
.reduce<{[key: string]: any}>((acc, prop) => {
|
||||||
|
acc[prop] = error[prop];
|
||||||
|
return acc;
|
||||||
|
}, {})
|
||||||
};
|
};
|
||||||
Object.entries(errorDetails).forEach(([key, value]) => {
|
Object.entries(errorDetails).forEach(([key, value]) => {
|
||||||
core.debug(`"${key}": ${JSON.stringify(value)}`);
|
core.debug(`"${key}": ${JSON.stringify(value)}`);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue