I’m trying to convert an existing 2.0 config to 2.1, taking advantage of the commands feature. When doing this, jobs that I use in multiple workflows end up being renamed and duplicated. As an example, my test step is duplicated and shows up as test-1, test-2, and test-3.
CircleCI then reports job status of test-1 to GitHub, which breaks our existing branch protection check, ensuring that the test job is successful before allowing merge.
How can I get CircleCI to continue to report test in the dashboard and to GitHub?
EDIT: PLEASE IGNORE. I made this response without fully understanding the details of the original post. I apologize!
If you are calling a job named test three times, and 2/3 of them fail how else would you know which test is the problem?
In addition, if you’re overriding the GitHub check for the same tests then it provides you with little value because if test-1 passes then test passes, if test-2 fails then test fails, if test-3 passes then test passes. This would lead you to think that it’s safe to merge when in fact you have a failure.
I would circle back and recheck your assumptions on how you want to protect this branch if you’re going to be calling the same job more than once.
Lastly, I don’t have an example config, but the name key should go in the workflow itself. Could you share a snippet of your workflows config?
Also seeing this; our configuration has not changed today, but these numbers are being append as of this afternoon. My guess is this is a regression from today.
Sorry I misread the original post, the issue that I thought you were having is quite similar to a common issue that folks have due to a misunderstanding with how multiple jobs in the same workflow works.
However since are using the same job in different workflows, then this should not be happening.
Thanks for reporting this @chrisleck and I apologize for jumping to conclusions.
Following up here – this was not a “bug” in that it behaved the way we intended. However, based on this feedback we’re going to change the behavior to only rename jobs if they are invoked multiple times in the same workflow (rather than invoked multiple times within the same config but across different workflows).
I wanted to clarify when invoking the same job multiple times with parameters across any number of workflows, the build name will be changed (i.e. sayhello-1 , sayhello-2 , etc.). To ensure build numbers are not appended, utilize the name key. The name you assign needs to be unique, otherwise the numbers will still be appended to the job name. More info in our docs here