8000 skip task not finished error when taskWaitUntilStopped is true by simllll · Pull Request #3 · simllll/github-action-aws-ecs-run-task · GitHub
[go: up one dir, main page]

Skip to content

skip task not finished error when taskWaitUntilStopped is true #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8 changes: 6 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56621,6 +56621,7 @@ const main = async () => {
}));

await handleCWResponseAsync(response);
core.debug(`LogGroupARN finished.`);
} catch (err) {
core.error(err.message);
}
Expand All @@ -56641,8 +56642,11 @@ const main = async () => {
}, {cluster, tasks: [taskArn]});
core.debug(`waitECSTaskResult: ${waitECSTaskResult.state} / ${JSON.stringify(waitECSTaskResult)}`);
} catch (error) {
core.setFailed(`Task did not start successfully. Error: ${error.message}.`);
process.exit(1);
// if taskWaitUntilStopped is true, the exit code is validated, and therefore we can skip this step
if (!taskWaitUntilStopped) {
core.setFailed(`Task did not start successfully. Error: ${error.message}.`);
process.exit(1);
}
}

// If taskWaitUntilStopped is false, we can bail out here because we can not tail logs or have any
Expand Down
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ const main = async () => {
}));

await handleCWResponseAsync(response);
core.debug(`LogGroupARN finished.`);
} catch (err) {
core.error(err.message);
}
Expand All @@ -177,8 +178,11 @@ const main = async () => {
}, {cluster, tasks: [taskArn]});
core.debug(`waitECSTaskResult: ${waitECSTaskResult.state} / ${JSON.stringify(waitECSTaskResult)}`);
} catch (error) {
core.setFailed(`Task did not start successfully. Error: ${error.message}.`);
process.exit(1);
// if taskWaitUntilStopped is true, the exit code is validated, and therefore we can skip this step
if (!taskWaitUntilStopped) {
core.setFailed(`Task did not start successfully. Error: ${error.message}.`);
process.exit(1);
}
}

// If taskWaitUntilStopped is false, we can bail out here because we can not tail logs or have any
Expand Down
Loading
0