Jobs used in multiple workflows get a number suffix

I’ve found this topic Getting "-number" suffix appended to job names when converting to 2.1 config .
And I think I’m experiencing this behavior as well after switching to config version 2.1.
We have required PR checks in github, ones that match jobs by name, and this is causing those checks to remain pending indefinitely.

Hi Marko. It’s my understanding, from that thread, that this is caused by having jobs with the same name in a Workflow. Can you share your config.yml so we can take a look?


It’s actually the other way around: having multiple workflows with the same job (but only once per workflow), like this:

      - first_step:

      - my_job

      - my_job

Interesting. Let me look into this and get back to you.

Edit: Can I ask you to share the whole config? You can open a ticket and share there, if you feel it contains sensitive information.

Please share the ticket number if you do so I can locate it easier.

The feedback I got was you should use the name: key when calling the job in your workflow.

so something like

      - unit_tests:
            - build_java
          name: "Build and Test - Unit Tests"

You will need the names to be unique, or you will trigger the numbers again when the config is compiled.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.