Bug: Job reattempt failed because artifact was published twice#69
Conversation
|
why is delete running on rerun? other successful stages don't rerun. this change is fine, but i think we are solving the wrong problem. i would suggest moving |
I agree this is a patch in the meanwhile. Not sure if the focus should be on the run condition as, for example, if the pipeline fails the related test (misc), it could be because of the produced image or because an unrelated issue (like connection issues). In the former we want to run the delete and in the latter we don't so we can rerun the test (and still access the image). It would be too difficult to know which of the two cases happened. In my opinion the solution would be to push and delete in the same job as the test, so everything is run and rerun together. I believe that @ayaegashi is working on a PR to remove the stage all together. |
* Fix dependencies * Remove publish directory to avoid publishing same artifact on reruns * Change artifact name based on Job attempt
🔍 Description
Change the artifact name on DeleteCosiFromAcr according to the number of job attempts.
🤔 Rationale
We can rerun the same job without worrying on the published artifact, as we can't publish to artifacts with the same name in the same pipeline run.
Note: Preferred solution would be to not publish anything at all here but seems one branch always attempts to publish an artifact if the job was successful.
📝 Checks
Multiple reruns of the stage: https://dev.azure.com/mariner-org/ECF/_build/results?buildId=885247&view=results