Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Jump directly to failure in gotestfmt #13180

Closed
wants to merge 2 commits into from
Closed

Conversation

DMRobertson
Copy link
Contributor

@DMRobertson DMRobertson commented Jul 5, 2022

Now that we are seeing more complement failures (c.f. #13161) I'm more frequently encountering the following behaviour.

  1. Click on a complement run to investigate the logs, e.g. here.
  2. GitHub automatically scrolls to the first "error message", where "error message" means an error annotation of this form.
  3. Normally the only such error is " Error: Process completed with exit code 1." from calling complement.sh ... | gotestfmt. That error is automatically generated by github when we run a shell command and appears at the bottom of the output.
  4. This is infuritating because the log you want to see is the first test failure! That means we have to scroll up a load which is also infuriating, and means that Sort failing jobs in Complement CI to the top of the logs to make them easier to read. #13057 wasn't quite as useful as we'd hoped.

Fix this by tweaking go test fmt's outputter to output the special GHA error message.

To prove this works:

The annotations could probably be made more precise/better/descriptive. But this is a quick drive by and I've already spent enough time on this.

@DMRobertson DMRobertson force-pushed the dmr/gotestfmt-tweak branch from 45b7440 to f2de465 Compare July 5, 2022 13:34
@DMRobertson DMRobertson force-pushed the dmr/gotestfmt-tweak branch 2 times, most recently from 1d3360d to e89d2b7 Compare July 12, 2022 13:14
@DMRobertson DMRobertson force-pushed the dmr/gotestfmt-tweak branch from d218a4b to 4ecbaed Compare July 12, 2022 13:46
@DMRobertson DMRobertson marked this pull request as ready for review July 12, 2022 14:01
@DMRobertson DMRobertson requested a review from a team as a code owner July 12, 2022 14:01
@DMRobertson
Copy link
Contributor Author

Bugger. https://github.com/matrix-org/synapse/runs/7305162776?check_suite_focus=true demonstrates that this prints out what I expect but still scrolls to the bottom.

@DMRobertson DMRobertson marked this pull request as draft July 13, 2022 18:49
@DMRobertson
Copy link
Contributor Author

I'm going to drop this until I get sufficiently frustrated to take another look.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant