-
Notifications
You must be signed in to change notification settings - Fork 249
Run init task before updateing service #273
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
Run init task before updateing service #273
Conversation
7264b76
to
708d38e
Compare
708d38e
to
6ae0b08
Compare
6ae0b08
to
87805ba
Compare
bce0b50
to
840e0d5
Compare
840e0d5
to
632654e
Compare
632654e
to
41d6767
Compare
* add desired count * add desired count * add desired count * fix test for desired count * small change * update dist/index.js * address feedback @iamhopaul123 * update dist/index.js --------- Co-authored-by: Adithya Kolla <[email protected]>
41d6767
to
1381c77
Compare
1381c77
to
99ebbbe
Compare
Hi @chiragrajk, Thank you for your contribution, apologies on the delay. We will be working to review the changes in the Pull Request. In the meantime please ensure that below steps, if not already completed, are taken care of in your Pull Request:
Thank you! |
|
||
mockRunTasks.mockImplementation(() => { | ||
return { | ||
promise() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mock needs to be updated as the action is now using JS SDK v3
Refer: #529
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provided diff for transforming JS SDK v2 APIs to v3.
Refs: #529
const runTaskResponse = await ecs.runTask({ | ||
startedBy: startedBy, | ||
cluster: clusterName, | ||
taskDefinition: taskDefArn, | ||
enableExecuteCommand: true, | ||
overrides: { | ||
containerOverrides: [ | ||
{ | ||
name: containerName, | ||
command: initTaskCommand.split(' ') | ||
} | ||
] | ||
}, | ||
launchType: 'FARGATE', | ||
networkConfiguration: networkConfiguration | ||
}).promise(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const runTaskResponse = await ecs.runTask({ | |
startedBy: startedBy, | |
cluster: clusterName, | |
taskDefinition: taskDefArn, | |
enableExecuteCommand: true, | |
overrides: { | |
containerOverrides: [ | |
{ | |
name: containerName, | |
command: initTaskCommand.split(' ') | |
} | |
] | |
}, | |
launchType: 'FARGATE', | |
networkConfiguration: networkConfiguration | |
}).promise(); | |
const runTaskResponse = await ecs.runTask({ | |
startedBy: startedBy, | |
cluster: clusterName, | |
taskDefinition: taskDefArn, | |
enableExecuteCommand: true, | |
overrides: { | |
containerOverrides: [ | |
{ | |
name: containerName, | |
command: initTaskCommand.split(' ') | |
} | |
] | |
}, | |
launchType: 'FARGATE', | |
networkConfiguration: networkConfiguration | |
}); |
const maxAttempts = (waitForMinutes * 60) / WAIT_DEFAULT_DELAY_SEC; | ||
|
||
core.info('Waiting for tasks to stop'); | ||
|
||
const waitTaskResponse = await ecs.waitFor('tasksStopped', { | ||
cluster: clusterName, | ||
tasks: taskArns, | ||
$waiter: { | ||
delay: WAIT_DEFAULT_DELAY_SEC, | ||
maxAttempts: maxAttempts | ||
} | ||
}).promise(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const maxAttempts = (waitForMinutes * 60) / WAIT_DEFAULT_DELAY_SEC; | |
core.info('Waiting for tasks to stop'); | |
const waitTaskResponse = await ecs.waitFor('tasksStopped', { | |
cluster: clusterName, | |
tasks: taskArns, | |
$waiter: { | |
delay: WAIT_DEFAULT_DELAY_SEC, | |
maxAttempts: maxAttempts | |
} | |
}).promise(); | |
core.info('Waiting for tasks to stop'); | |
const waitTaskResponse = await waitUntilTasksStopped({ | |
client: ecs, | |
minDelay: WAIT_DEFAULT_DELAY_SEC, | |
maxWaitTime: waitForMinutes * 60, | |
}, { | |
cluster: clusterName, | |
tasks: taskArns, | |
}); |
const describeResponse = await ecs.describeTasks({ | ||
cluster: clusterName, | ||
tasks: taskArns | ||
}).promise(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const describeResponse = await ecs.describeTasks({ | |
cluster: clusterName, | |
tasks: taskArns | |
}).promise(); | |
const describeResponse = await ecs.describeTasks({ | |
cluster: clusterName, | |
tasks: taskArns | |
}); |
Bumps [eslint](https://github.com/eslint/eslint) from 8.50.0 to 8.51.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](eslint/eslint@v8.50.0...v8.51.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Changes to run init task has been merged via PR #340. Closing out this PR. |
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.