CI: lower trigger events for .github/workflows/circleci.yml workflow
bsipocz opened this issue Β· 12 comments
There is an unreasonably large number of action triggers, we should look into how to lower it while keeping the same CI matrix coverage.
https://github.com/numpy/numpy-tutorials/actions/workflows/circleci.yml
Edit: here is the discussion of why triggering on status
is currently the best option: scientific-python/circleci-artifacts-redirector-action#27
I wonder if this is related to the circleci artifact redirector (maybe automatic retries after failures?). I've noticed this in NetworkX's CI as well lately and IIRC it started around the same time as the redirector failures.
So - the first thing I'd try is fixing the artifact redirector (which we have to do anyway!). I'll try copying numpy/numpy#23578 here, which should Just Workβ’ if the circle CI token is an org-level secret, else we'll have to generate a new token specifically for numpy-tutorials
.
Ahh, I knew I was seeing this issue popping up in discussions elsewhere, but just couldn't find it (was about to mention it on the discord, too).
Thanks for the fix Ross!
Thanks for the fix Ross!
Well we'll see if it works π from the discussion in numpy/numpy#23578 it looks like we won't know until after merge - do you want to give it a try?
well, it didn't work. Seemed to be working for the PR you made, with only two triggers, but now there a lot more for the windows PR π’
OTOH, there are still a lot of these for numpy (but there a lot more workflows there, too)
Yup, I rebased #169 and force-pushed and that's still failing, so more investigation required. I'd propose to see if someone with the appropriate permissions can check whether the CIRCLE_TOKEN
is an org-level secret, and if not, then see if it can be made org-level (to avoid duplication). If that ends up not being possible then we can create a separate token just for numpy-tutorials
.
I was playing with this a bit on main
. Unfortunately, I could not make a conditional work on status
, but could at least cancel all jobs where the status was not circleCI related. This would result in cancelled actions in the list, but would not make fewer of them.
All the things I've tried are here: https://github.com/bsipocz/numpy-tutorials/tree/CI_fewer_redirect_triggers, main
is now rolled back to where it was, and all branch protections are back in place, too.
I think I like the canceled approach a bit better, but it's only marginally better, so I would only open a PR for it if you would also prefer it.
I'd propose to see if someone with the appropriate permissions can check whether the
CIRCLE_TOKEN
is an org-level secret, and if not, then see if it can be made org-level (to avoid duplication). If that ends up not being possible then we can create a separate token just fornumpy-tutorials
.
It's not org-level, on purpose. It takes only a minute to generate a new token and add it to a repo. I think you have admin permissions? Let me know if you want me to do it - it worked first-time on the main repo.
I've tried to add it following Eric's steps, not sure if it will work or not.
Thanks @bsipocz - AFAICT this worked so I will close it. We can re-open if that turns out not to be the case.
Well, the issue was mostly for the large number of events that trigger the workflow rather than their failing nature.
But I tried to lower it, and couldn't really (could only cancel the irrelevant ones, but couldn't not trigger them at all (they are in the list, but don't run), so I agree that it can be closed as an upstream issue. Hopefully GHA will provide conditionals for status
sometimes in the future.