Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CI Move label removal to a separate workflow #29456

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

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

betatim
Copy link
Member

@betatim betatim commented Jul 10, 2024

To remove a label from a PR we need write access to the PR which is not possible with workflows executed for a PR from a fork.

The new separate workflow uses the pull_request_target trigger like our other labelling workflows. With this trigger the workflow runs in the context of the parent repository and as a result can have write access to the pull request. It does not checkout the code of the PR though, so you can't smuggle changes into the workflow without review.

If we rename to cuda-ci.yml we need to update the list of allowed workflows in https://github.com/organizations/scikit-learn/settings/actions/runner-groups/4

Follow up for #29376

betatim added 2 commits July 10, 2024 15:13
To remove a label from a PR we need write access to the PR which is not
possible with workflows executed for a PR from a fork.
CUDA GPU seems redundant
Copy link

βœ”οΈ Linting Passed

All linting checks passed. Your pull request is in excellent shape! β˜€οΈ

Generated for commit: 07fa4bd. Link to the linter CI: here

@betatim
Copy link
Member Author

betatim commented Jul 12, 2024

Do you have an opinion @lesteve ?

@lesteve
Copy link
Member

lesteve commented Jul 12, 2024

Do I understand correctly that basically when you add the "CUDA CI" label it gets automatically removed?

This is slightly weird (wait I just added this label why does it get removed) and also I am wondering like @thomasjpfan about possible race conditions. Have you tested it on your fork by any chance?

And yes, renaming the CI workflow will need adaptation in https://github.com/organizations/scikit-learn/settings/actions/runner-groups/4 otherwise we will be back again to "why does the job not find any GPU runner" 😱.

@betatim
Copy link
Member Author

betatim commented Jul 12, 2024

Do I understand correctly that basically when you add the "CUDA CI" label it gets automatically removed?

Yes. We don't need to remove the label but then the next time you want the PR tested you have to remove it and add it again. Instead of just adding it.

My hope is that further into the future when we feel more comfortable with everything

This is slightly weird (wait I just added this label why does it get removed) and also I am wondering like @thomasjpfan about possible race conditions. Have you tested it on your fork by any chance?

Been testing it on betatim/scikit-learn-ci#2. In the last few instances yesterday the label didn't get removed. This is because I was experimenting with the alternative Thomas proposed in his comment.

And yes, renaming the CI workflow will need adaptation in github.com/organizations/scikit-learn/settings/actions/runner-groups/4 otherwise we will be back again to "why does the job not find any GPU runner" 😱.

Right now it is configured to allow all workflows, so we don't need to change anything right? It is only if we find a way to restrict things right?

@lesteve
Copy link
Member

lesteve commented Jul 12, 2024

OK let's merge and see what happens!

Right now it is configured to allow all workflows, so we don't need to change anything right? It is only if we find a way to restrict things right?

Yes you are right indeed. Nothing to do now, since we have Workflow access : all workflows.

@lesteve lesteve merged commit 409d187 into scikit-learn:main Jul 12, 2024
37 checks passed
@lesteve
Copy link
Member

lesteve commented Jul 12, 2024

I tested it in #29300, looks like this is working fine.

@betatim betatim deleted the cuda-ci-label-remover branch July 12, 2024 12:08
@betatim
Copy link
Member Author

betatim commented Jul 12, 2024

I tested it in #29300, looks like this is working fine.

I don't know why, but somehow I am surprised ;)

@lesteve
Copy link
Member

lesteve commented Jul 12, 2024

Well I guess if you miss broken stuff, you can always look at why the GPU tests are broken even when updating the lock-files: #29373

Of course, you can also decide to work on more meaningful stuff, which would be perfectly understandable πŸ˜‰.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants