https://pantsbuild.org/ logo
#development
Title
# development
w

witty-crayon-22786

10/13/2022, 5:04 PM
@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

bitter-ability-32190

10/13/2022, 5:05 PM
I've been saying this and requesting a docs-like change to CI to skip the job 🙏
w

witty-crayon-22786

10/13/2022, 5:06 PM
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

bitter-ability-32190

10/13/2022, 5:07 PM
Really we should be skipping based on path, no? The paths are already defined in the pre-commit template-er
w

witty-crayon-22786

10/13/2022, 5:07 PM
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

bitter-ability-32190

10/13/2022, 5:08 PM
Right, that seems dangerous (removal when its necessary)
w

witty-crayon-22786

10/13/2022, 5:09 PM
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

happy-kitchen-89482

10/13/2022, 5:10 PM
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

witty-crayon-22786

10/13/2022, 5:11 PM
huzzah!
h

happy-kitchen-89482

10/13/2022, 5:11 PM
Not ready for review yet, but if you want a taste…
w

witty-crayon-22786

10/13/2022, 5:12 PM
no, that sounds great: but let me know as soon as you do want feedback. thanks a lot!
h

happy-kitchen-89482

10/13/2022, 5:23 PM
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

witty-crayon-22786

10/13/2022, 5:27 PM
thanks!
h

happy-kitchen-89482

10/14/2022, 3:34 PM
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

bitter-ability-32190

10/14/2022, 3:41 PM
Makes sense. And also 🤮
There's no good CI system. Only various levels of "bad" and "WTF"
h

happy-kitchen-89482

10/14/2022, 5:55 PM