'Dash number' being appended to job

Issue is referenced at Getting "-number" suffix appended to job names when converting to 2.1 config.

My workflows look like the following. The ui-tests job keeps running as ‘ui-test-1’. Job definitely isn’t repeated in any workflow.

workflows:
  version: 2.1
  build-test-deploy:
    jobs:
      - unit-tests
      - ui-tests:
          test_set: 'smoke'
      - deploy-firebase:
          filters:
            branches:
              only: develop
          requires:
            - unit-tests
      - deploy-testflight:
          filters:
            branches:
              only: testflight
          requires:
            - unit-tests
  nightly-ui-tests:
    triggers:
      - schedule:
          cron: "0 8 * * *"
          filters:
            branches:
              only: develop
    jobs:
      - ui-tests:
          test_set: 'all'

Hello @iammikec - Welcome to our CircleCI Community!

For this build, it appears ui-tests has a parameter as a subkey test_set: 'smoke'

For parameterized jobs, despite if the jobs are in the same workflow or not, our config compilation will expand this job to a version 2 non-parameterized since further running of the job needs to know the job contents with the parameters merged in. When the content of those compiled jobs is different, we can’t give them the same name in the resulting config file so our config compilation appends the job name with a number.

To avoid this, you can utilize the name key in your job and the config compilation will not append the number to your job.

If you continue to see the number being appended to your jobs (or I am completely off the mark here) please do update this thread or submit a support ticket, reference this Discuss post and I will investigate further! Thanks!

- ui-tests:
    name: testing-smoke
    test_set: 'smoke'
1 Like

That did the trick! Thank you!

1 Like

Hi @iammikec - I’m glad to hear that! Thanks for the update here and happy building!

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