-
Notifications
You must be signed in to change notification settings - Fork 417
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
fix(ecs): filter out non-active ECS services #5125
Conversation
🍕 Here are the new binary sizes!
|
Codecov Report
@@ Coverage Diff @@
## mainline #5125 +/- ##
============================================
- Coverage 69.65% 69.65% -0.01%
============================================
Files 295 295
Lines 43243 43331 +88
Branches 285 285
============================================
+ Hits 30122 30183 +61
- Misses 11646 11675 +29
+ Partials 1475 1473 -2
|
Good call i think i added some extra logic to catch this. |
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.
lgtm just one tiny nit
return nil, err | ||
} | ||
if prevSvcArn != nil && prevSvcArn.clusterName != svcArn.clusterName { | ||
return nil, fmt.Errorf("service %q and service %q should be in the same cluster", prevSvcArn.String(), svcArn.String()) |
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.
Hi! I keep getting this error when doing copilot service show
, and it's referencing old (deleted) clusters and services. Is it possible that this cluster check should be done after inactive services are filtered out?
Hey @joanniclaborde ! Which version of Copilot are you using. Fix for this is released in Copilot version |
I'm using the latest version, v1.29.1. |
Can you please paste the error message to help us debug the issue? |
I still get that same error message when I delete the whole app and recreate it (with the same names, of course). Thanks! |
Thanks for reporting the bug. I am able to reproduce it locally. We will work on the fix for this! |
address #5125 (comment) This PR fixes below **Scenario** App: demo Env: test Svc: frontend 1. And the svc is successfully deployed , `copilot svc show` and `copilot task run —--generate-cmd demo/test/frontend` works ✅ ``` Cluster - demo-test-Cluster-ABC(Active Service - demo-test-Cluster-ABC/demo-test-frontend-Service-ABC(Active) ``` 2. After this if i delete the test environment and frontend service. ``` Cluster - demo-test-Cluster-ABC (InActive) Service - demo-test-Cluster-ABC/demo-test-frontend-Service-ABC(InActive) ``` 3. Deploying service and Environment with the same names. ``` Cluster - demo-test-Cluster-ABC(InActive) Service - demo-test-Cluster-ABC/demo-test-frontend-Service-ABC(InActive) Cluster - demo-test-Cluster-DEF(Active) Service - demo-test-Cluster-DEF/demo-test-frontend-Service-DEF(Active) ``` 4. `copilot svc show` and `copilot task run —--generate-cmd demo/test/frontend` will generate the below errors. ``` copilot task run --generate-cmd demo/test/frontend ✘ generate task run command from service frontend of application demo deployed in environment test: retrieve network configuration for service frontend: check if services are active: service "arn:aws:ecs:us-west-2:197732814171:service/demo-test-Cluster-Bus8o0uclnAW/demo-test-frontend-Service-E0rKy3e2S78t" and service "arn:aws:ecs:us-west-2:197732814171:service/demo-test-Cluster-TJyweayOGepM/demo-test-frontend-Service-4Se9IVA2878D" should be in the same cluster copilot svc show Application: demo Only found one service, defaulting to: frontend ✘ describe service frontend: retrieve rollback alarm names: get service frontend: check if services are active: service "arn:aws:ecs:us-west-2:197732814171:service/demo-test-Cluster-Bus8o0uclnAW/demo-test-frontend-Service-E0rKy3e2S78t" and service "arn:aws:ecs:us-west-2:197732814171:service/demo-test-Cluster-TJyweayOGepM/demo-test-frontend-Service-4Se9IVA2878D" should be in the same cluster ``` By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.
Hey @joanniclaborde! We just released this fix v1.30.0!🚀🎉 Thanks for reporting the issue! |
Applies similar fix as #5062 to ecs service.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.