Open mikolajpabiszczak opened 2 years ago
:wave: @mikolajpabiszczak the reason is because the runner has been marked to do just one job with the parameter --single
the option that you might be looking for is --reuse
@DavidGOrtega: I do know that. So let me emphasise this again:
the problem is not about single
vs. reusable
(I know and understand the difference between those). In both cases the workflow does not work (and it worked 3 months ago). I used reusable
only to collect the logs provided and to see whether GitHub sees the runner (it does not: it marks it as offline). In fact all the workflows (using CML) that I tested do not work (but worked 3 months ago)
Moreover, if I use the reusable
runner, and I try to run the failed job again it does not pick up the already existing runner (bc. GitHub sees it as offline).
In case I use single
the instance does not get cancelled after the failure, I have to terminate it manually.
(I added some clarifications in the opening message)
@mikolajpabiszczak You have in your logs
Jul 22 11:37:30 ip-172-31-32-70 cml.sh[2440]: {"level":"error","message":"HttpError: Resource not accessible by integration","stack":"Error: HttpError: Resource not accessible by integration\n at process.<anonymous> (/snapshot/cml/bin/cml/runner.js:333:32)\n at process.emit (node:events:539:35)\n at emit (node:internal/process/promises:140:20)\n at processPromiseRejections (node:internal/process/promises:274:27)\n at processTicksAndRejections (node:internal/process/task_queues:97:32)","status":"terminated"}
There must be something that you do not have permissions to do with your token? Then the unregistering can not happen yet because there is still a job in play
Just to be sure and move one step forward can you please your REPO_TOKEN
? Does it have all all the permissions?
These were not changed since the working runs, but I checked it again. We are using a company application, so checking up wrt. this list
Repository level:
cml send-github-check
)Organisation level:
Additionally, in the repository settings:
It looks like that app needs an additional scope it might not have? https://docs.github.com/en/rest/actions/workflow-runs#list-workflow-runs-for-a-repository
@mikolajpabiszczak to confirm is an issue with app generated token can you try and curl the endpoint with one of the generated tokens?
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token <TOKEN>" \
https://api.github.com/repos/OWNER/REPO/actions/runs
we might need to update our guide for using a github app?
Did some tests, indeed the culprit was the lack of sufficient permissions: after adding Read and write
permissions for Actions
the workflows work again.
Thx for your time and help! And yes, the guide needs an update in this case. ;D
@mikolajpabiszczak thanks for the report and help, we'll keep this open until we update the docs
I am frankly not sure if this is the issue on CML side, but let me describe it.
CML versions tested: 0.11.0 and 0.17.0 Cloud provider: AWS
Remark: the very same workflow worked when I last used it (3 months ago)
Deploy self-hosted runner:
this deployment job finishes successfully, but when it finishes the instance (as checked in AWS console) has not yet performed status checks (this was not the case when the workflow worked 3 last time) / is still in the
Initialisation
stage.The next job (which runs on self-hosted runner) gets closed basically immediately (in 4s):
The runner has received a shutdown signal
although the instance itself is not getting cancelled: it goes through AWS status checks and remains running (to clarify: instance deployed assingle
),One more thing: if I deploy the worker as
reusable
it will be marked as offline in the list of workers after the job fails and will not be accessible…I deployed the reusable instance and got logs after failure: