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

[CI] Running /fix:cmd over a PR rebuilds but skips GH action checks #4339

Open
chalin opened this issue Apr 22, 2024 · 8 comments · Fixed by #4345
Open

[CI] Running /fix:cmd over a PR rebuilds but skips GH action checks #4339

chalin opened this issue Apr 22, 2024 · 8 comments · Fixed by #4345
Assignees
Labels
CI/infra CI & infrastructure e0-minutes Effort: < 60 min e1-hours Effort: < 8 hrs p2-medium p3-low
Milestone

Comments

@chalin
Copy link
Contributor

chalin commented Apr 22, 2024

For context, see:

Unless we get a separate bot to handle /fix:* commands, we're stuck with this behavior: GH doesn't rerun actions if a workflow over the same repo committed a change to a PR. I usually work around this by forcing a change (via rebase, or by making a trivial edit) over the PR, but that isn't always practical.

Other possible solutions:

  • Create a separate bot to handle /fix:* commands so that GH runs the full action checks. (This would be a lot of work but might be worth it in the long run.)
  • Run a cron job that rebuilds the site after changes are made to the main branch. (This is easier to setup, and will at least notify us if build checks are broken).

Thoughts @open-telemetry/docs-maintainers?

@chalin chalin added CI/infra CI & infrastructure e0-minutes Effort: < 60 min e1-hours Effort: < 8 hrs p3-low p2-medium labels Apr 22, 2024
@chalin chalin added this to the 24Q2 milestone Apr 22, 2024
@svrnm
Copy link
Member

svrnm commented Apr 23, 2024

This discussion links to the official GH documentation about the topic:

When you use the repository's GITHUB_TOKEN to perform tasks, events triggered by the GITHUB_TOKEN, with the exception of workflow_dispatch and repository_dispatch, will not create a new workflow run. This prevents you from accidentally creating recursive workflow runs.

And:

If you do want to trigger a workflow from within a workflow run, you can use a GitHub App installation access token or a personal access token instead of GITHUB_TOKEN to trigger events that require a token.

Using a PAT seems to be a reasonable solution for me.

@svrnm
Copy link
Member

svrnm commented Apr 23, 2024

Using a PAT seems to be a reasonable solution for me.

We have one already, and maybe using it consistently will help. Let me raise a PR for that.

svrnm added a commit that referenced this issue Apr 23, 2024
chalin pushed a commit that referenced this issue Apr 23, 2024
@chalin chalin reopened this Apr 23, 2024
@svrnm
Copy link
Member

svrnm commented Apr 24, 2024

looks like #4345 did not solve it. I tested it with #4349 and now checks were run afterwards.

@svrnm
Copy link
Member

svrnm commented Apr 24, 2024

So the "good" news is that we are not the only ones running in those issues, so there is some info out there that is helpful, but this is a rabbit hole, looks like the checkout action adds additional trouble:

https://github.com/orgs/community/discussions/26220

@chalin
Copy link
Contributor Author

chalin commented Apr 24, 2024

@svrnm
Copy link
Member

svrnm commented Apr 25, 2024

@chalin
Copy link
Contributor Author

chalin commented Apr 25, 2024

Reverting the last change, as you did was what I had in mind too. Thanks for doing that and investigating further 🙏

@svrnm
Copy link
Member

svrnm commented Apr 25, 2024

Reverting the last change, as you did was what I had in mind too. Thanks for doing that and investigating further 🙏

I am worried we are in a position where neither token gives us all the things we need, as it looks like the PAT is not allowed to push to forks. In my research I came across a page that listed solutions to this problem but I closed it so I have to find it once again will keep you posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/infra CI & infrastructure e0-minutes Effort: < 60 min e1-hours Effort: < 8 hrs p2-medium p3-low
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants