aws / aws-toolkit-azure-devops

AWS Toolkit for Azure DevOps
Other
249 stars 106 forks source link

Problem ECRPushImage and pushTag: variable value #572

Closed diegomarquessilva closed 1 month ago

diegomarquessilva commented 1 month ago

Describe the bug

When I perform ECRPushImage, the pushTag always defaults to the tag "latest".

image

placy2 commented 1 month ago

Confirmed and isolated to this push, released in the new version 1.16.0 an hour or so ago: https://github.com/aws/aws-toolkit-azure-devops/commit/7c033fc9ea6f287fd5352098bdd59cddaf125c5f

@hayemaxi please ensure if you are changing a parameter name that it is treated properly as a breaking change, as fixing this has now caused a delay in building of images we are trying to release to production.

Release 1.16.0 should be considered breaking from 1.15.0 and no longer behaves the same at all, meaning anyone utilizing ECRPushImageTag@1 and the pushTag parameter will instantly see differing behavior (often defaulting to an unwanted latest tag as seen above)

telb99 commented 1 month ago

1.16.0 has broken all of our pipelines :(

BradyKoehler commented 1 month ago

To fix the ECRPushImage@1 tasks, change the pushTag parameter to targetTag

placy2 commented 1 month ago

@telb99 Same, absolutely massive headache caused by this happening as we were wrapping up prep for a production release.

Locking the task to ECRPushImage@1.15.0 is a solution as well but either that or changing to targetTag still has to be applied to all the pipelines and/or templates using it.

It's unacceptable for this to be released as a minor version (non-breaking by convention) within a day of merging the code - where is the testing, and what was the plan for communicating said change to consumers of this task? I would guess 95% of all pipeline tasks in ADO are set to the @Major version tag only, including in AWS's very own docs on this toolkit.

jayrafolsperez-mb commented 1 month ago

This broke our pipelines as well on pushing up ECR images and tagging them. This should be a tagged a major change due to it's breaking nature.

v4de commented 1 month ago

Same this broke all our pipelines, we are updating them now as we speak to the latest version parameters. Is there a place where breaking changes are communicated out to customers/consumers? Scratching our head for an hour trying to find why no new images had build tags.

diegomarquessilva commented 1 month ago

I am using this approach as a temporary solution. image

saurabhajmera commented 1 month ago

Sorry for the inconvenience this might have caused, we are looking into this issue and will post an update soon.

telb99 commented 1 month ago

Thanks @BradyKoehler, changing to targetTag works.

We have made a change to use targetTag in our pipelines to unstick our deployments, fortunately we were using it in one template so it was an easy change to unstick all pipelines.

I hope that if another change is made, that it doesn't break us again!

saurabhajmera commented 1 month ago

We have decided to rollback this change, we will be releasing a fix very soon. This change will restore the pushTag parameter to the ECR Push Image Task, removing the targetTag parameter.

For those users who have already updated targetTag parameter to mitigate this issue, this rollback in v1.17.0 may cause breakages again. To fix this, please specify the desired tag in the pushTag parameter. targetTag should be pushTag in yaml templates, or if you are using UI then please verify the Target Repository Tag Field, see the screen shot below:

image (8)

Our sincere apologies for the inconvenience this has caused. Thanks for your patience.

boatmisser commented 1 month ago

Sorry, but can I get clarification on whether or not its going to be pushTag or targetTag in future? If I change it back to pushTag (yes I already updated to targetTag) is it going to break again later?

hayemaxi commented 1 month ago

Sorry, but can I get clarification on whether or not its going to be pushTag or targetTag in future? If I change it back to pushTag (yes I already updated to targetTag) is it going to break again later?

In future releases we plan to keep pushTag for backwards compatibility.

heidemn-faro commented 1 month ago

"pushTag" works again for me, using ECRPushImage@1. 🎉

FabianoMoreno commented 1 month ago

Good afternoon everyone, even after announcing the rollback I'm still having problems with the tags in my classic pipelines. Please adjust the error as quickly as possible, we have more than 200 pipelines and if the error continues we will have to adjust everything manually :(

aurelienecoto commented 1 month ago

Good afternoon everyone, even after announcing the rollback I'm still having problems with the tags in my classic pipelines. Please adjust the error as quickly as possible, we have more than 200 pipelines and if the error continues we will have to adjust everything manually :(

1.17 has the rollback so just make sure the task is using the latest version.