Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

circleci config validate misses invalid job name in workflow if workflow is skipped by default #844

Open
danxmoran opened this issue Feb 15, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@danxmoran
Copy link

danxmoran commented Feb 15, 2023

Meta:

CircleCI CLI Version:

0.1.23391+5cbf90e (homebrew) (Mac) and 0.1.23241 (Linux)

Operating System:

MacOS and Linux


Current behavior:

If you have config like this:

version: 2.1

jobs:
  job1:
    docker:
      - image: cimg/base
    steps:
      - run: echo hello
  job2:
    docker:
      - image: cimg/base
    steps:
      - run: echo world
 
parameters:
  run_invalid:
    type: boolean
    default: false

workflows:
  invalid:
    when: << pipeline.parameters.run_invalid >>
    jobs:
      - job1:
          name: job_renamed
      - job2:
          requires:
            - job1 # Error is here, should be `job_renamed`

circleci config validate says the config is valid, even though it's not.

A real-world failure: https://app.circleci.com/pipelines/github/color/color/275733

Expected behavior:

circleci config validate should flag the invalid job name in the requires.

When did this begin / Was this previously working?:

Unsure

Additional Information:

The config is properly flagged as invalid if I flip the default value of run_invalid from false to true

@danxmoran danxmoran added the bug Something isn't working label Feb 15, 2023
@JulesFaucherre JulesFaucherre self-assigned this May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants