cml icon indicating copy to clipboard operation
cml copied to clipboard

PR seems to fail intermittently in GH

Open DavidGOrtega opened this issue 4 years ago • 8 comments

After lots of successful runs suddenly cml-pr was denied by Github

Error: git push --set-upstream origin master-cml-pr-c0b511b4
	
	To https://github.com/DavidGOrtega/fashion_mnist
 ! [remote rejected] master-cml-pr-c0b511b4 -> master-cml-pr-c0b511b4 (refusing to allow a GitHub App to create or update workflow `.github/workflows/cml.yaml` without `workflows` permission)
error: failed to push some refs to 'https://github.com/DavidGOrtega/fashion_mnist'

    at /usr/lib/node_modules/@dvcorg/cml/src/utils.js:14:27
    at ChildProcess.exithandler (child_process.js:315:5)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1022:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)

DavidGOrtega avatar Jul 30 '21 08:07 DavidGOrtega

This only happens when you include files from .github/workflows in your desired changes. You can try to avoid including modified workflow files in your cml-pr pull requests ~or, perhaps, granting additional permissions to the temporary token~.

0x2b3bfa0 avatar Aug 05 '21 10:08 0x2b3bfa0

Why do you think thats the case? In the workflow I just see cml-pr pushing the content of output

cml-pr --md output/* >> report.md

DavidGOrtega avatar Aug 09 '21 14:08 DavidGOrtega

[...] refusing to allow a GitHub App to create or update workflow .github/workflows/cml.yaml without workflows permission (from your error above)

It looks like .github/workflows/cml.yaml is getting somehow added and committed to the pull request branch before pushing (?)

0x2b3bfa0 avatar Aug 09 '21 15:08 0x2b3bfa0

I would say no. Here is the original error:

https://github.com/DavidGOrtega/fashion_mnist/runs/3199847730?check_suite_focus=true

It happened when the original branch committed a workflow file. however cml-pr should just only add output folder files

DavidGOrtega avatar Aug 09 '21 16:08 DavidGOrtega

The only case where this could happen is when you modify a workflow in the target branch after the checkout but before cml-pr 🤔

0x2b3bfa0 avatar Aug 11 '21 15:08 0x2b3bfa0

@DavidGOrtega, can you update your tokens and run again 3199847730? It looks like they've expired.

0x2b3bfa0 avatar Aug 31 '21 14:08 0x2b3bfa0

Im hitting this error in my fashion_mnist repo in two times in the last three commits:

  • 3/3 modifying the workflow file
  • 3/3 using the same api token
  • 2 that failed shares fetch-depth: 0 in the checkout step

DavidGOrtega avatar Oct 18 '21 07:10 DavidGOrtega

When workflows are modified certain actions are not allowed when using action provided tokens for operations

dacbd avatar Feb 17 '23 15:02 dacbd