-
Notifications
You must be signed in to change notification settings - Fork 538
Suppress raw JSON logs in Complement CI when debug disabled. #19745
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
Open
reivilibre
wants to merge
3
commits into
develop
Choose a base branch
from
rei/cpl_less_unwieldy
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,6 +98,7 @@ jobs: | |
| # real-time. | ||
| run: | | ||
| set -o pipefail | ||
|
|
||
| COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh --in-repo -p 1 -json -run 'TestSynapseVersion/Synapse_version_matches_current_git_checkout' 2>&1 | tee /tmp/gotest-sanity-check-complement.log | ||
| shell: bash | ||
| env: | ||
|
|
@@ -122,12 +123,26 @@ jobs: | |
| # -json: Output JSON format so that gotestfmt can parse it. | ||
| # | ||
| # tee /tmp/gotest-complement.log: We tee the output to a file so that we can re-process it | ||
| # later on for better formatting with gotestfmt. But we still want the command | ||
| # later on for better formatting with gotestfmt. | ||
| # But we still want the ability for the command | ||
| # to output to the terminal as it runs so we can see what's happening in | ||
| # real-time. | ||
| # When not running in pipeline debug mode, we only show the last 50 lines | ||
| # of the JSON output from the build log because it is not human-readable, | ||
| # the extreme volume makes it very unwieldy to access in the web UI | ||
| # and the resultant log download extremely large. | ||
| run: | | ||
| set -o pipefail | ||
| COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -p 1 -json 2>&1 | tee /tmp/gotest-complement.log | ||
|
|
||
| # To see the full build log, start a re-run with | ||
| # the debug mode enabled in the GitHub UI. | ||
|
Comment on lines
+137
to
+138
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To make this more clear, to accomplish this, when viewing a CI job, Re-run all jobs -> Scroll down to Enable debug logging and check it -> Re-run jobs |
||
| if [ "$RUNNER_DEBUG" = "1" ]; then | ||
| debug_pipe="cat" | ||
| else | ||
| debug_pipe="tail -n 50" | ||
| fi | ||
|
|
||
| COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -p 1 -json 2>&1 | tee /tmp/gotest-complement.log | $debug_pipe | ||
| shell: bash | ||
| env: | ||
| POSTGRES: ${{ (matrix.database == 'Postgres') && 1 || '' }} | ||
|
|
@@ -151,12 +166,26 @@ jobs: | |
| # are underpowered and don't like running tons of Synapse instances at once. | ||
| # -json: Output JSON format so that gotestfmt can parse it. | ||
| # | ||
| # tee /tmp/gotest-in-repo-complement.log: We tee the output to a file so that we can re-process it | ||
| # later on for better formatting with gotestfmt. But we still want the command | ||
| # tee /tmp/gotest-complement.log: We tee the output to a file so that we can re-process it | ||
| # later on for better formatting with gotestfmt. | ||
| # But we still want the ability for the command | ||
| # to output to the terminal as it runs so we can see what's happening in | ||
| # real-time. | ||
| # When not running in pipeline debug mode, we only show the last 50 lines | ||
| # of the JSON output from the build log because it is not human-readable, | ||
| # the extreme volume makes it very unwieldy to access in the web UI | ||
| # and the resultant log download extremely large. | ||
| run: | | ||
| set -o pipefail | ||
|
|
||
| # To see the full build log, start a re-run with | ||
| # the debug mode enabled in the GitHub UI. | ||
| if [ "$RUNNER_DEBUG" = "1" ]; then | ||
| debug_pipe="cat" | ||
| else | ||
| debug_pipe="tail -n 50" | ||
| fi | ||
|
|
||
| COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh --in-repo -p 1 -json 2>&1 | tee /tmp/gotest-in-repo-complement.log | ||
| shell: bash | ||
| env: | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Suppress raw JSON logs in Complement CI when debug disabled. |
Oops, something went wrong.
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.
My vote would be to leave it as-is.
Although, I don't run into problems when viewing the logs now that the formatted view only shows failures.
And re-running with debug logging is another step when I want to see the output which I've wanted to multiple times recently:
gotestfmtwas failingOn top of it generally being useful of the CI job making progress.
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.
Yep, happy to leave it in if this is something you rely on, by all means this PR was just a convenient place to put that question.
Would be curious if there are other ideas to make this less unbearable.
Suppose we could upload the formatted fail-only logs as a downloadable artifact? Feels like 'a workaround' but one I'm happy to take. Thoughts?
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.
Viewing this page is laggy? (with only the
Formatted Complement test logs (only failing are shown)section expanded) https://github.com/element-hq/synapse/actions/runs/25128863747/job/73673674666You can expand the ❌ section to see the logs for the test.
GitHub's fake scroll doesn't help with being able to copy-paste everything easily but I don't experience any problems outside of that. The failed section is 19k lines by itself (55k lines total for the entire raw log of the CI job) which is a lot to manage regardless of what we do.
Perhaps some GitHub extension you're using is making it worse than usual?
The raw logs also download fine for me. It's only 16.5MB. You can see that I also did that when figuring out why
gotestfmtwas failing to archive the logsAdditionally having GitHub workflow artifacts of whatever logs sounds fine to me.