Comments (14)
Like @erikahansen pointed out, we also ended up adding an extra step doing a post deployment check to verify this. Here's how we did it:
...
- name: Deploy to ECS
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
id: ecs-deploy
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: ${{ matrix.service }}
cluster: ${{ env.CLUSTER_NAME }}
- name: Check if deployment was successful
id: check-deployment
run: |
CURRENT_TASK_DEF_ARN=$(aws ecs describe-services --cluster ${{ env.CLUSTER_NAME }} --services ${{ matrix.service }} --query services[0].deployments[0].taskDefinition | jq -r ".")
NEW_TASK_DEF_ARN=${{ steps.ecs-deploy.outputs.task-definition-arn }}
echo "Current task arn: $CURRENT_TASK_DEF_ARN"
echo "New task arn: $NEW_TASK_DEF_ARN"
if [ "$CURRENT_TASK_DEF_ARN" != "$NEW_TASK_DEF_ARN" ]; then
echo "Deployment failed."
exit 1
fi
...
However, it would be good to have this action checking that already... I will try to find the time to work on it.
from amazon-ecs-deploy-task-definition.
We built into our pipeline a post-deployment check that verifies that the new registered revision is the current task definition in ECS.
from amazon-ecs-deploy-task-definition.
+1 critically important feature
from amazon-ecs-deploy-task-definition.
How is the deployment circuit breaker enabled? I do not see the option being submitted to ecs.updateService. https://github.com/aws-actions/amazon-ecs-deploy-task-definition/blob/master/index.js#L26
from amazon-ecs-deploy-task-definition.
@CalebC-RW the circuit breaker is an ECS service feature. You can see it referenced in the link above or in the AWS CLI ECS update-service documentation for example.
from amazon-ecs-deploy-task-definition.
@spyoungtech, thanks for replying! I see that the circuit breaker feature can be enabled on the service (using the old ECS experience on the console or when creating the service). We have tried to enable it on the service and then run this action, but it seems to not be taking effect (failing deployments are being retried repeatedly and not being rolled back). Does it need to be enabled with the "updateService" call (during deployment) as well as be enabled for the service? If it does, this action does not seem to enable the flag when it calls updateService.
Or, am I completely misunderstanding this feature.
from amazon-ecs-deploy-task-definition.
I believe I have addressed my questions. The rollback process does seem to work (without specifying it on the update-service instruction), though it does take time. I have not determined how many attempts that the deployment makes before the circuit breaker kicks in and performs the rollback. My services are such that if the deployment fails, they will almost certainly fail after the first deployment attempt and consistently thereafter. After many tests, we have determined that setting the wait-time to a little longer than a successful deployment but shorter than a few failures lets the action fail when the deployment fails and succeed when it succeeds.
I wish that this action/deployment process let us more explicitly specify the number of deployment attempts before rollback and to let the action fail when a rollback occurs (as @spyoungtech originally requested).
from amazon-ecs-deploy-task-definition.
+1 for this, please make this workaround part of the core functionality of this Action.
from amazon-ecs-deploy-task-definition.
+1 we need this feature too, currently failures in prod are hidden without this workaround
from amazon-ecs-deploy-task-definition.
+1 for this. I need this workaround to be a part of the core functionality.
from amazon-ecs-deploy-task-definition.
Very important to fix
from amazon-ecs-deploy-task-definition.
+1 really should be part of core functionality now
from amazon-ecs-deploy-task-definition.
+1 for this feature
from amazon-ecs-deploy-task-definition.
Hi,
Is there any update on this?
from amazon-ecs-deploy-task-definition.
Related Issues (20)
- Deployment fails immediately without waiting, and CodeDeploy console shows nothing HOT 1
- Support adding docker labels to the rendered task HOT 1
- Add support for DesiredCount HOT 3
- Feature Request: retry upon Rate exceeded error
- Runner connect error: The HTTP request timed out after 00:01:00. . Retrying until reconnected HOT 1
- Unable to cancel workflow
- Create a new task revision with deploying the service HOT 3
- Service reports Error: Resource is not in the state servicesStable after 60 min even with wait-for-minutes set to greater than 60 HOT 1
- Deployment URLs for CodeDeploy always redirect to us-east-2
- Is it possible to register a task definition without deploying the service? HOT 1
- Node 16 Deprecation Warning HOT 8
- Add support for tagging my ECS service
- "arn:aws:ecs:ap-northeast-1:***:service/*******task is MISSING" when deploy dotnet8 to aws ecs HOT 1
- How to define task_definition_task_role_name and task_definition_task_execution_role_name?
- AWS SDK deprecation HOT 1
- Upgrade to newer version of AWS Javascript SDK HOT 6
- Unmasking the URL of ALB HOT 2
- Support passing deployment configuration HOT 1
- Broken Examples with ECS Updates HOT 1
- v1.6.0: STRING_VALUE cannot be converted to Integer HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-ecs-deploy-task-definition.