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

The requested check was never run against this ref, exiting... #7

Closed
ayozemr opened this issue Dec 7, 2020 · 21 comments
Closed

The requested check was never run against this ref, exiting... #7

ayozemr opened this issue Dec 7, 2020 · 21 comments

Comments

@ayozemr
Copy link

ayozemr commented Dec 7, 2020

Hello!

I am using your action to solve a problem I have:

  • Workflow builds api on every push
  • We want e2e workflow to run on PRs to master -> Runs using build artifact

So I set up a new workflow with your action, I used github.sha as ref because it runs in pushes to the PR.

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- master

name: Wait until build is complete
uses: lewagon/wait-on-check-action@v0.1
with:
ref: ${{ github.sha }} # can be commit SHA or tag too
check-name: build # name of the existing check - omit to wait for all checks
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 15 # seconds

I got this error. Maybe they triggered at the same time and e2e run before build job was started? I dont know if the correct way to implement it is to place some "sleep 15" before your wait on check 🤔
The requested check was never run against this ref, exiting...

Thank you for your time!

@YonatanKra
Copy link

I get the same thing....

@rrijkse
Copy link

rrijkse commented Dec 10, 2020

I solved this by running with uses: lewagon/wait-on-check-action@master haven't done a deep dive to figure out what's changed since the release but in my case it I was trying to use the feature from PR #6 which doesn't seem to be released yet.

@ayozemr
Copy link
Author

ayozemr commented Dec 17, 2020

I solved this by running with uses: lewagon/wait-on-check-action@master haven't done a deep dive to figure out what's changed since the release but in my case it I was trying to use the feature from PR #6 which doesn't seem to be released yet.

Thanks @rrijkse , will try

@progapandist
Copy link
Collaborator

Let me know if it worked! I think I have to get serious about it and start a Changelog and regular release shedule, will be on it right after the New Year! For now using master is the best bet

@owen2345
Copy link

owen2345 commented Jan 7, 2021

Hey here, I am having the same problem.
I have 3 testing workflows + 1 continuous deployment workflow.
After the first 3 workflows successfully completed, CD workflow "CD" is still stuck:
Screen Shot 2021-01-07 at 6 06 13 AM

Hints:
Maybe the checker is expecting for empty pending workflows but my CD workflow is still in progress, then it will never be processed.

@progapandist
Copy link
Collaborator

hi @owen2345 — can you please send me the example code from your workflow that uses the wait-on-check?

@owen2345
Copy link

owen2345 commented Jan 7, 2021

Sure @progapandist

name: Continous deployment

on:
  push:
    branches:
      - master
      - staging

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      # This step will retry until required check passes
      # and will fail the whole workflow if the check conclusion is not a success
      - name: Wait on tests
        uses: lewagon/wait-on-check-action@master
        with:
          ref: ${{ github.event.pull_request.head.sha || github.sha }}
          # check-name: test # name of the existing check - omit to wait for all checks
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          wait-interval: 30 # seconds

      - name: Continuos deployment
        run: "..."

Please let me know if you need anything else to find the problem.
Thank you!

@progapandist
Copy link
Collaborator

Thank you! Try passing ref: ${{ github.sha }} instead of ref: ${{ github.event.pull_request.head.sha || github.sha }}. Frankly, I don't understand the use case for having a conditional between SHAs

@progapandist
Copy link
Collaborator

Maybe omitting check name for all checks doesn't work as expected. Can you try waiting for all three testing checks explicitly one after another and see if that works?

@owen2345
Copy link

owen2345 commented Jan 7, 2021

Unfortunately it did not work (the same problem "it still stuck").
Additionally I noticed that when one of the workflows failed, my CD workflow is still stuck. I think it should fail/cancel too.

@progapandist
Copy link
Collaborator

Unfortunately I don’t see an immediate answer. Try referring to wait-on-check-action@v0.1, do one test at a time, and pass check names explicitly. If it works, then it must be a regression in master but I have no time to investigate urgently.

@matiasalbarello
Copy link
Collaborator

The problem seems to be that the workflow is waiting for itself to finish in order to continue. When the check-name is specified, this is not a problem.

@progapandist
Copy link
Collaborator

Yes, that means #6 probably messed it up. Sorry for the oversight. I will try to investigate, but haven’t got a lot of free time on my hands rn. If someone can see the problem clearly and make a quick PR - that will be much appreciated!

@progapandist
Copy link
Collaborator

For now the solution would be to wait on check name explicitly, don’t omit it, as @matiasalbarello mentioned (thanks!)

@progapandist
Copy link
Collaborator

Should be fixed thanks to #10 (🙌 @matiasalbarello), please check and confirm so I can close this issue

@codetheweb
Copy link

@progapandist
Copy link
Collaborator

Thanks for letting me know, will fix tonight

@progapandist
Copy link
Collaborator

bafe56a — this should fix it, please check @codetheweb 🙏

@codetheweb
Copy link

Looks like it's working now, thank you!

Could you tag it too please so I can pin the version?

@progapandist
Copy link
Collaborator

Sure, will do it now, it's a long time coming...

@progapandist
Copy link
Collaborator

https://github.com/lewagon/wait-on-check-action/releases/tag/v0.2 🎉 big thanks to everyone involved! I will close the issue, feel free to reopen if any more corner cases surface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants