-
Notifications
You must be signed in to change notification settings - Fork 38
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
🎨 Make the GHA log clean and colorized #66
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems
true
isn't allowed (mea culpa). I merged it, but amended in ad6091d.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's weird. I've been using it like this for a while, and it did work...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, wait, you changed it from
1
. That explains it. Some apps expect1
specifically.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's annoying and slightly horrible. I try to reserve literal numbers for quantities. The number is written in ascii, ported to an integer in yaml, written to the environment as a string, then loaded from the environment as a string and cast to an int before being cast to a bool (https://github.com/python/mypy/blob/0cab54432a1df91a9b71637b773bcbb9772a6b59/mypy/util.py#L523). Moreover, mypy's interpretation of FORCE_COLOR is a mismatch from the published expectation in other environments (where any non-empty value means true, even
0
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given all this complication, I'm inclined to back out this merge. The landscape is complicated enough that it probably deserves its own CI plugin. How do you feel about developing a plugin/action that would set these environment variables (and manage the complexity) so it doesn't have to happen here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've force-pushed b241226 back to main, backing out this change. I'd very much like to see it, but it's clearly fraught with micro-challenges.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did think about having an action. That would be pretty easy. But decided that it's not what I want because this action would have to be copied into every job and the original reason I moved these to the root level of the workflow was to reduce duplication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, good point. It would be annoying to have an action scattered across any number of jobs. That's an interesting tradeoff. Do you happen to know if Github has plans to support a "global" or "workspace" level action such that it could run at the beginning of all jobs? I searched and found people wanting such a thing, but they're all satisfied with environment variables or defaults.
Would you be willing to file a request with Github explaining this motivation?
In the meantime, I'd like to adopt your changes again, this time keeping the
1
s (holding my nose for the smell) but retaining the comments. I'll plan to do that soon, maybe tomorrow.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dunno, knowing how GHA workflows work and how they are isolated, I find it hard to imagine how such a feature could work. Also, I don't have a lot of energy this year to track so many efforts. So no, I won't be requesting this a feature atm.
Meanwhile, I've returned to working/experimenting on my old idea of autogeneration of a GHA job matrix for tox. Here's a PoC demo if you haven't seen it: https://github.com/webknjaz/tox-gha-test/actions/runs/3199728755.
I'm willing to bet that having reusable workflows could significantly reduce the number of places where this would have to be copy-pasted.