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

Always have coloured output and then strip later for pytest, helm unittest, shunit2 #19923

Merged
merged 10 commits into from
Sep 27, 2023

Conversation

huonw
Copy link
Contributor

@huonw huonw commented Sep 22, 2023

This tries to increase cache hit rates by having Pytest, Helm unittest and shUnit2 have more consistent command line args/env vars, that don't depend on the value of [GLOBAL].color (or other color setting): in particular, these processes will now always output with colours under the hood, and Pants post-processes the output based on the flag.

The hope is that this allows more cache hits, particularly remote, where someone might be running locally with colours but a remote tester runs without.

This does a bunch of refactoring to pull out the adhoc colour stripping applied in CheckResult etc, and make it more reusable. This will breaks plugins that set the args (maybe we should deprecate them rather than just straight remove?).

Fixes #16526

Verified

This commit was signed with the committer’s verified signature.
huonw Huon Wilson

Verified

This commit was signed with the committer’s verified signature.
huonw Huon Wilson

Verified

This commit was signed with the committer’s verified signature.
huonw Huon Wilson

Verified

This commit was signed with the committer’s verified signature.
huonw Huon Wilson

Verified

This commit was signed with the committer’s verified signature.
huonw Huon Wilson

Verified

This commit was signed with the committer’s verified signature.
huonw Huon Wilson
@huonw huonw marked this pull request as draft September 22, 2023 23:08
@huonw

This comment was marked as resolved.

@huonw

This comment was marked as resolved.

Verified

This commit was signed with the committer’s verified signature.
huonw Huon Wilson

Verified

This commit was signed with the committer’s verified signature.
huonw Huon Wilson

Verified

This commit was signed with the committer’s verified signature.
huonw Huon Wilson
@huonw huonw marked this pull request as ready for review September 25, 2023 10:37
Copy link
Contributor

@benjyw benjyw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nifty!

Verified

This commit was signed with the committer’s verified signature.
huonw Huon Wilson
@huonw huonw merged commit 5702dad into main Sep 27, 2023
@huonw huonw deleted the huonw/16526-colors branch September 27, 2023 00:04
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.

Fix Pytest caching being dependent on --colors option
2 participants