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

Dont run (mobile) github actions (for required checks) if there is no need #24437

Closed
phlax opened this issue Dec 8, 2022 · 4 comments · Fixed by #27404
Closed

Dont run (mobile) github actions (for required checks) if there is no need #24437

phlax opened this issue Dec 8, 2022 · 4 comments · Fixed by #27404
Labels
area/ci mobile no stalebot Disables stalebot from closing an issue

Comments

@phlax
Copy link
Member

phlax commented Dec 8, 2022

In #24407 a change was made to not use the paths feature in github actions to exclude checks

this was done to ensure that the checks could be required for PRs to pass

the problem with this approach is that it pulls a full copy of the repo and is much slower than using githubs paths (which afaict uses its own diff algorithm against the target branch, and perhaps pre-checksout the repo - not sure about this exactly)

in more recent version of the github actions/checkout action the default is to pull the repo with a depth of 1, so the current mobile/should_run_ci.sh script, where it assumes that the full repo is checked out, breaks (this is easy enough to workaround but just hightlights the issue)

i think we can speed this up and reduce the load on CI considerably by reverting to using the paths selector and adding the github way of allowing a required check to pass when skipped (https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks)

like the azp way its a bit kludgy but it think it would be quite a bit faster/more efficient

@phlax phlax added triage Issue requires triage area/ci mobile and removed triage Issue requires triage labels Dec 8, 2022
@phlax
Copy link
Member Author

phlax commented Dec 8, 2022

cc @jpsim @alyssawilk

i was going to comment something similar on the PR but it landed before i had gotten round to reviewing it

@phlax phlax changed the title Dont run github actions (for required checks) if there is no need Dont run (mobile) github actions (for required checks) if there is no need Dec 8, 2022
@jpsim
Copy link
Contributor

jpsim commented Dec 8, 2022

i think we can speed this up and reduce the load on CI considerably by reverting to using the paths selector and adding the github way of allowing a required check to pass when skipped (https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks)

Oh nice, I wasn't aware that this was possible.

@github-actions
Copy link

github-actions bot commented Jan 7, 2023

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Jan 7, 2023
@phlax phlax removed the stale stalebot believes this issue/PR has not been touched recently label Jan 7, 2023
@github-actions
Copy link

github-actions bot commented Feb 7, 2023

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Feb 7, 2023
@phlax phlax added no stalebot Disables stalebot from closing an issue and removed stale stalebot believes this issue/PR has not been touched recently labels Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci mobile no stalebot Disables stalebot from closing an issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants