<@U051221NF>: while you’re CI’ing: one thing i not...
# development
w
@happy-kitchen-89482: while you’re CI’ing: one thing i noticed yesterday (and then experimented with a bit) is that our commit-message based skipping skips Steps, but not Jobs
that means that if we skip a wheelbuilder Job, the Job actually has to queue, start on a worker, check out the code, etc in order to determine that there is nothing to do in the Step
b
I've been saying this and requesting a docs-like change to CI to skip the job 🙏
w
i tried to trivially move the
if:
statement of the Step up to the relevant Job, but the challenge is that the Job doesn’t have a workspace or checkout
only the
push
event actually has the commit message _attached_: the
pull_request
does not (it should have the PR body attached, but i wasn’t able to get that working: can post a draft if helpful)
b
Really we should be skipping based on path, no? The paths are already defined in the pre-commit template-er
w
so it feels like this would require a pre-work job that set booleans similar to “skip rust” “skip wheels”
1
@bitter-ability-32190: that’s what sets the label, but a user can remove or add the label.
b
Right, that seems dangerous (removal when its necessary)
w
maybe. but this is not Pants’ change detection code… we don’t have a precise understanding, and so users being able to adjust it is helpful. but how the skip booleans are computed is probably orthogonal to where
h
I am completely revamping all this
so it feels like this would require a pre-work job that set booleans similar to “skip rust” “skip wheels”
This is already happening
w
huzzah!
h
Not ready for review yet, but if you want a taste…
w
no, that sounds great: but let me know as soon as you do want feedback. thanks a lot!
h
I think it is ready for a look, since it seems to work in CI: https://github.com/pantsbuild/pants/pull/17218
👍 1
Note that this is just part one - refactoring and generalizing the classification
part two will actually apply the new classifications
To keep changes smaller and easier to review
w
thanks!
h
OK, want to be really annoyed? GitHub Actions treats jobs skipped due to an “if” condition as successful for the purpose of branch protection rules, but apparently not for the purpose of running their dependee jobs…
We could schedule the job but skip all its steps, or always run the next step and have it check for success of its dependency jobs
Probably the latter
b
Makes sense. And also 🤮
There's no good CI system. Only various levels of "bad" and "WTF"
h