Skip to content

CI: lower trigger events for .github/workflows/circleci.yml workflow #177

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

Closed
bsipocz opened this issue Apr 20, 2023 · 12 comments
Closed

CI: lower trigger events for .github/workflows/circleci.yml workflow #177

bsipocz opened this issue Apr 20, 2023 · 12 comments
Labels
infrastructure Issues relevant to infrasructure, rather than content upstream Issues not directly relevant to the tutorial content but upstream

Comments

@bsipocz
Copy link
Member

bsipocz commented Apr 20, 2023

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

@bsipocz bsipocz added the infrastructure Issues relevant to infrasructure, rather than content label Apr 20, 2023
@rossbar
Copy link
Collaborator

rossbar commented Apr 20, 2023

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.

@bsipocz
Copy link
Member Author

bsipocz commented Apr 20, 2023

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!

@rossbar
Copy link
Collaborator

rossbar commented Apr 20, 2023

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?

@bsipocz
Copy link
Member Author

bsipocz commented Apr 20, 2023

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 😢

@bsipocz
Copy link
Member Author

bsipocz commented Apr 20, 2023

OTOH, there are still a lot of these for numpy (but there a lot more workflows there, too)

@rossbar
Copy link
Collaborator

rossbar commented Apr 20, 2023

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.

@bsipocz
Copy link
Member Author

bsipocz commented Apr 20, 2023

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.

@bsipocz
Copy link
Member Author

bsipocz commented Apr 20, 2023

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.

@rgommers
Copy link
Member

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.

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.

@bsipocz
Copy link
Member Author

bsipocz commented Apr 20, 2023

I've tried to add it following Eric's steps, not sure if it will work or not.

@bsipocz bsipocz added the upstream Issues not directly relevant to the tutorial content but upstream label Apr 20, 2023
@rossbar
Copy link
Collaborator

rossbar commented Apr 27, 2023

Thanks @bsipocz - AFAICT this worked so I will close it. We can re-open if that turns out not to be the case.

@rossbar rossbar closed this as completed Apr 27, 2023
@bsipocz
Copy link
Member Author

bsipocz commented Apr 27, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Issues relevant to infrasructure, rather than content upstream Issues not directly relevant to the tutorial content but upstream
Projects
None yet
Development

No branches or pull requests

3 participants