Skip to content
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

Cherrypicks of recent CI improvements to 2.14.x #17222

Merged
merged 6 commits into from
Oct 14, 2022

Conversation

benjyw
Copy link
Contributor

@benjyw benjyw commented Oct 13, 2022

Cherrypicks of #17218, #17169, #17194, #17172, #16806, #16796.

Since this branch is still being released from, we want it to benefit from recent and upcoming CI improvements.

Cherry-picking them all in one PR saves on CI resources and time. And since no Pants source code is modified, only CI config, it seems fine to not cherry-pick separately.

benjyw and others added 6 commits October 13, 2022 15:03
…antsbuild#16806)

Now that Github Actions supports a "Re-run only failed jobs" option, the `check_labels` job no longer needs to block all other jobs, and can instead just block the "Merge OK" job.

This will give non-`Contributor`-contributors quicker feedback on their PRs (since they can't add labels themselves).

[ci skip-rust]
We were previously using ${{ expr }} in f-strings, which
caused them to emit ${ expr } into the YAML, which is incorrect.

Correctly quoting this in an f-string would require 4 braces,
which is unwieldy. Plus, it's common while editing to turn a
regular string into an f-string or vice versa, and it would be
very easy to neglect to change the quoting as needed.

Instead, we introduce a helper function and use it exclusively.

Note that this bug caused us to generate useless, constant keys
for the GHA cache - in fact I noticed something was awry when
I saw CI builds re-building rust code after a successful cache
restore. Good thing our rust bootstrapping script is defensive.
I'd say we were pretty lucky if the only impact was performance;
This could potentially have lead us to actively step on our own
toes in bad ways.
…nged-files actions (pantsbuild#17194)

Since the older version use a deprecated NodeJS version.
It will automatically use correct keys and take care of trimming the cache entries.

However, we first had to patch that action to not wipe ~/.cargo/bin, see
Swatinem/rust-cache@master...benjyw:rust-cache:master

I will send that patch, or similar, upstream for consideration, so that in the future we can
use the standard action instead of the forked one.
Generalizes our "docs_only" mechanism to other categories of affected things: 
- "rust"
- "release"
- "ci_config"
- "docs_only"
- "docs"

Currently sets, but does not act on, any of these except docs_only. 
Future changes will apply the other categories in useful ways.
@benjyw benjyw added the category:internal CI, fixes for not-yet-released features, etc. label Oct 13, 2022
@benjyw benjyw requested a review from stuhood October 13, 2022 22:21
@benjyw
Copy link
Contributor Author

benjyw commented Oct 13, 2022

Each individual commit is one cherry-pick, if that makes this easier to review.

@benjyw benjyw merged commit c978ab7 into pantsbuild:2.14.x Oct 14, 2022
@benjyw benjyw deleted the ci_cherrypicks branch October 14, 2022 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:internal CI, fixes for not-yet-released features, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants