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

Better highlight failures in case a job is skipped but is required to succeed #31

Open
tomasr8 opened this issue Feb 15, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@tomasr8
Copy link

tomasr8 commented Feb 15, 2025

Here's an example from the CPython repo:
https://github.com/python/cpython/actions/runs/13328394772

With this many checks, it's hard to see at a first glance what went wrong (hint: it's the cross-build-linux job):

📝 Job statuses:
📝 build-context → ✓ success [required to succeed]
📝 check-docs → ✓ success [required to succeed]
📝 check_autoconf_regen → ⬜ skipped [required to succeed or be skipped]
📝 check_generated_files → ⬜ skipped [required to succeed or be skipped]
📝 build_macos → ⬜ skipped [required to succeed or be skipped]
📝 build_ubuntu → ⬜ skipped [required to succeed or be skipped]
📝 build_ubuntu_ssltests → ⬜ skipped [allowed to fail]
📝 build_wasi → ⬜ skipped [required to succeed or be skipped]
📝 build_windows → ⬜ skipped [required to succeed or be skipped]
📝 build_windows_msi → ⬜ skipped [allowed to fail]
📝 cross-build-linux → ⬜ skipped [required to succeed]
📝 test_hypothesis → ⬜ skipped [allowed to fail]
📝 build_asan → ⬜ skipped [required to succeed or be skipped]
📝 build_tsan → ⬜ skipped [required to succeed or be skipped]
📝 cifuzz → ⬜ skipped [allowed to fail]

I think we can highlight this type of failure so that it's easier to spot among all the other jobs. Thoughts?

@hugovk
Copy link

hugovk commented Feb 15, 2025

Yes, it'd be useful to highlight it.

I don't know if we can add colour? If so maybe something like this?

Image

Although regular "yellow" is not so good in light mode:

Image

So perhaps a GitHub theme class could be used?

Otherwise leave out yellow (and maybe even green):

Image Image

In fact, even just sticking a ❌ next to the failing check would help.

@tomasr8
Copy link
Author

tomasr8 commented Feb 15, 2025

Otherwise leave out yellow (and maybe even green):

Yeah, even just red would be enough. Normally, you only look at the output (at least in my case) when the check fails, so you only care about the failed jobs.

If we go with just ❌, I'd suggest to put it somewhere at the start though, so that it is in the same position on every line which then helps your eyes more easily scan the jobs and find the offending one.

@webknjaz webknjaz added the enhancement New feature or request label Feb 16, 2025
@webknjaz
Copy link
Member

webknjaz commented Feb 16, 2025

@tomasr8 thanks for documenting this! I've been meaning to do something about it. I think @pradyunsg was the first one to give the same feedback, but I never got around to actually doing anything about it…

@hugovk GitHub Job Summaries allow markdown, which has the same limitation as any comments on the platform (like this one). They don't allow arbitrary HTML, so coloring anything there would not be possible.

But for the job logs, it should be possible to use regular ANSI escape codes. We'd just need to separate these outputs and format them differently. And perhaps respect ${NO_COLOR} on top of that.
AFAIK, GH job logs are only rendered on black background, so dual dark+light compat shouldn't be necessary. Although, it might be important in some other contexts. Does anything else render these logs? GH CLI, perhaps? I know that it's possible to download them as text files, but would somebody even be inspecting this action's logs in such a mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants