PR comment not triggering due to manual pending optional CI step

Description

Our CI build workflow for every PR has the optional manual step of pushing that build to a “showcase” deployment:

However due to this manual approval step Codecov will never post PR comments even though all the tests have passed. Is there a way to exclude codecov from waiting for optional steps?

workflows:
  version: 2
  build_and_test:
    jobs:
      - browser-tests
      - jest-tests
      - approve-showcase:
          requires:
            - jest-tests
          type: approval
          filters:
            branches:
              ignore:
                - master
      - deploy-showcase:
          requires:
            - approve-showcase
      - deploy-staging:
          requires:
            - jest-tests
          filters:
            branches:
              only:
                - master
      - manual-approval:
          type: approval
          requires:
            - deploy-staging
      - deploy-production:
          requires:
            - manual-approval

Imgur
Imgur

Repository

Private repo

Versions

version: 2.1
orbs:
  codecov: codecov/codecov@1.0.5

Would really appreciate any help in getting the PR comments to enable for our usecase as this is an awesome tool!

Hi @amaidah

I thinbk the only way around this would be to disable waiting on all checks with the following code in you codecov.yml

codecov:
  require_ci_to_pass: no

Let me know if that works for you.

Hi @drazisil, thanks for the quick response.

Unfortunately I have that setting already enabled:

Is there no other way?

I am looking at this: Merging Reports

If the CI status is "pending", please wait until the CI is complete.

and it looks like codecov is going to wait until the CI status is completely finished.

Yes. Codecov doesn’t have a way to know if a status is CI or not, so it treats all non-Codecov statues as CI.

Even if that were not the case, the status that’s gated behind the approval step would still be a CI status, and we do not have a means to indicate to only ignore certain ones.

Even if that were not the case, the status that’s gated behind the approval step would still be a CI status, and we do not have a means to indicate to only ignore certain ones.

I see, thanks for the response. Our setup isn’t uncommon though. I’m wondering if support for this feature is on the roadmap for near term release?

I’m not sure about the roadmap for this feature. I have surfaced it to our product team for them to review. Thanks for suggesting it!

I just stumbled upon this. We have exactly the same problem. A few workflow steps with manual approval which keep the job status on “pending”.

If there’s no way in codecov to work around this (i was looking for an option in the config as well as a flag which i could pass to codecov-bash to indicate that it shouldnt wait on completion or the ci jobs) it would render codecov not a viable option for us :frowning:

Hi @flipace, you can try setting this to false in your codecov.yml

For notifications, you can also use this.

@tom thanks a lot for the fast response! Setting notify.wait_for_ci to false did the trick.

This may be worth mentioning in the documentation somewhere so that others don’t have to search through the community for this (“When using CircleCI workflows with a manual approval step, you have to set this to false to trigger PR comments”…)

1 Like

Thanks @flipace, I have added it as an item here

1 Like