more debug logs

This commit is contained in:
Rob Herley 2023-11-30 22:06:26 -05:00
parent db146faf7b
commit ed25d4d912
No known key found for this signature in database
GPG key ID: D1602042C3543B06
2 changed files with 11 additions and 7 deletions

10
dist/index.js vendored
View file

@ -8331,7 +8331,7 @@ class ArtifactHttpClient {
request(service, method, contentType, data) {
return __awaiter(this, void 0, void 0, function* () {
const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href;
(0, core_1.debug)(`Requesting: ${url}`);
(0, core_1.debug)(`[Request] ${method} ${url}`);
const headers = {
'Content-Type': contentType
};
@ -8354,6 +8354,8 @@ class ArtifactHttpClient {
try {
const response = yield operation();
const statusCode = response.message.statusCode;
(0, core_1.debug)(`[Response] ${response.message.statusCode}`);
(0, core_1.debug)(JSON.stringify(response.message.headers, null, 2));
if (this.isSuccessStatusCode(statusCode)) {
return response;
}
@ -119373,7 +119375,8 @@ function run() {
if (!targetArtifact) {
throw new Error(`Artifact '${inputs.name}' not found`);
}
core.debug(`Found named artifact '${inputs.name}' (ID: ${targetArtifact.id}, Size: ${targetArtifact.size})`);
core.debug('Found named artifact:');
core.debug(JSON.stringify(targetArtifact, null, 2));
artifacts = [targetArtifact];
}
else {
@ -119381,7 +119384,8 @@ function run() {
if (listArtifactResponse.artifacts.length === 0) {
throw new Error(`No artifacts found for run '${inputs.runID}' in '${inputs.repository}'`);
}
core.debug(`Found ${listArtifactResponse.artifacts.length} artifacts`);
core.debug(`Found ${listArtifactResponse.artifacts.length} artifacts:`);
core.debug(JSON.stringify(listArtifactResponse, null, 2));
artifacts = listArtifactResponse.artifacts;
}
const downloadPromises = artifacts.map(artifact => artifactClient.downloadArtifact(artifact.id, Object.assign(Object.assign({}, options), { path: path.join(resolvedPath, artifact.name) })));

View file

@ -63,9 +63,8 @@ async function run(): Promise<void> {
throw new Error(`Artifact '${inputs.name}' not found`)
}
core.debug(
`Found named artifact '${inputs.name}' (ID: ${targetArtifact.id}, Size: ${targetArtifact.size})`
)
core.debug('Found named artifact:')
core.debug(JSON.stringify(targetArtifact, null, 2))
artifacts = [targetArtifact]
} else {
@ -77,7 +76,8 @@ async function run(): Promise<void> {
)
}
core.debug(`Found ${listArtifactResponse.artifacts.length} artifacts`)
core.debug(`Found ${listArtifactResponse.artifacts.length} artifacts:`)
core.debug(JSON.stringify(listArtifactResponse, null, 2))
artifacts = listArtifactResponse.artifacts
}