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

PR seems to fail intermittently in GH #683

Closed
DavidGOrtega opened this issue Jul 30, 2021 · 9 comments
Closed

PR seems to fail intermittently in GH #683

DavidGOrtega opened this issue Jul 30, 2021 · 9 comments
Assignees
Labels
blocked Dependent on something else cml-pr Subcommand p1-important High priority question User requesting support

Comments

@DavidGOrtega
Copy link
Contributor

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 DavidGOrtega added bug Something isn't working cml-pr Subcommand p1-important High priority labels Jul 30, 2021
@DavidGOrtega DavidGOrtega changed the title PR seems to fail intermittently PR seems to fail intermittently in GH Jul 30, 2021
@0x2b3bfa0
Copy link
Member

0x2b3bfa0 commented Aug 5, 2021

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 0x2b3bfa0 self-assigned this Aug 5, 2021
@0x2b3bfa0 0x2b3bfa0 added question User requesting support and removed bug Something isn't working labels Aug 5, 2021
@DavidGOrtega
Copy link
Contributor Author

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

@0x2b3bfa0
Copy link
Member

0x2b3bfa0 commented Aug 9, 2021

[...] 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 (?)

@DavidGOrtega
Copy link
Contributor Author

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

@0x2b3bfa0
Copy link
Member

@0x2b3bfa0
Copy link
Member

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
Copy link
Member

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

@DavidGOrtega
Copy link
Contributor Author

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

@dacbd
Copy link
Contributor

dacbd commented Feb 17, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Dependent on something else cml-pr Subcommand p1-important High priority question User requesting support
Projects
None yet
Development

No branches or pull requests

3 participants