Skip to content
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

env upgrade --all may cause pipeline builds to fail #1805

Closed
huanjani opened this issue Jan 5, 2021 · 5 comments · Fixed by #1826
Closed

env upgrade --all may cause pipeline builds to fail #1805

huanjani opened this issue Jan 5, 2021 · 5 comments · Fixed by #1826
Labels
area/pipeline Issues about pipelines to release applications. type/bug Issues that are bugs.

Comments

@huanjani
Copy link
Contributor

huanjani commented Jan 5, 2021

We currently have the command env upgrade --all in the buildspec.
This may prevent the pipeline build stage from reaching completion if the user does not add all app envs as pipeline stages.

A possible solution may be doing something like:

...
for env in $envs; do
  ./copilot-linux env upgrade -n $env
...
@huanjani huanjani added the area/pipeline Issues about pipelines to release applications. label Jan 5, 2021
@anish-dcruz
Copy link

We are facing this issue right now.
The build is failing as its try to upgrade prod env which doesnt exisit.
We tried the for loop and still got error.
Thanks.

@efekarakus efekarakus added the type/bug Issues that are bugs. label Jan 13, 2021
@huanjani
Copy link
Contributor Author

huanjani commented Jan 13, 2021

Hi @anish-dcruz!

So sorry about this. For now, a workaround is to change ./copilot-linux env upgrade --all in the buildspec to ./copilot-linux env upgrade -n name-of-env-in-pipeline. Let me know how that works!

@efekarakus
Copy link
Contributor

+1 to @huanjani 's recommendation, for another way to mitigate you can also remove that line from the buildspec, commit and push it and that should get the pipeline unblocked.
Until we provide a fix for it, you can run the command copilot env upgrade --all whenever a new version of Copilot is released so that the latest templates are always synced to your environments. Apologies for the inconvenience 🙇

@huanjani
Copy link
Contributor Author

@anish-dcruz: We now have a fix for our buildspec forthcoming. Thanks for your feedback!

@mergify mergify bot closed this as completed in #1826 Jan 14, 2021
mergify bot pushed a commit that referenced this issue Jan 14, 2021
…ne (#1826)

Instead of trying to upgrade all envs in a workspace, now the buildspec reads the pipeline.yml file to find the envs to upgrade.

Fixes #1805

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
@tsingh2k15
Copy link

I am noticing a potentially related issue on copilot version: v1.11.0. Somehow copilot svc deploy triggers execute "env upgrade --app some-app--name some-name" which then fails with error - get template summary: AccessDenied: User: arn:aws:sts::accountnum:assumed-role/some-role/some-DI is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::some-account:role/somename-EnvManagerRole. Any thoughts?

thrau pushed a commit to localstack/copilot-cli-local that referenced this issue Dec 9, 2022
…ne (aws#1826)

Instead of trying to upgrade all envs in a workspace, now the buildspec reads the pipeline.yml file to find the envs to upgrade.

Fixes aws#1805

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/pipeline Issues about pipelines to release applications. type/bug Issues that are bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants