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

[TT-1016] Swtich from gotestfmt to gotestloghelper #12633

Merged
merged 10 commits into from
Apr 10, 2024

Conversation

tateexon
Copy link
Contributor

@tateexon tateexon commented Mar 28, 2024

Makes go test log output less noisy when used. Cleans up things like testing.T.Log prefix, only shows errors, highlights errors in red, copies error messages to the top if there are lots of logs before the error to save you time from having to scroll to the bottom, adds drop downs in CI for individual tests so you can look at specific logs more easily without having to scroll through others. An example of some of the logs on errors: https://github.com/smartcontractkit/chainlink/actions/runs/8605875051/job/23583096855?pr=12633

@tateexon tateexon force-pushed the TT-1016-Use-GoTestLogHelper branch from 31a1d05 to b86a7e6 Compare March 29, 2024 21:18
@tateexon tateexon force-pushed the TT-1016-Use-GoTestLogHelper branch from ebc6bc1 to 5be1948 Compare April 8, 2024 20:26
@tateexon tateexon marked this pull request as ready for review April 8, 2024 20:31
@tateexon tateexon requested review from a team as code owners April 8, 2024 20:31
AnieeG
AnieeG previously approved these changes Apr 9, 2024
Copy link
Contributor

@AnieeG AnieeG left a comment

Choose a reason for hiding this comment

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

approved with some nits

with:
test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestfmt
test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage
Copy link
Contributor

Choose a reason for hiding this comment

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

how about merging tee /tmp/gotest.log | gotestloghelper -ci -singlepackage to test_command_to_run if opted for gotestloghelper in run-test? Might help in maintenance and updating all run-tests. Can take an input to denote if gotesthelper is preferred.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is a good idea. I will be ripping out the run-tests from chainlink-github-actions and moving it to .github soon so I will add this to the changes that would improve the flow there!

artifacts_location: ./integration-tests/migration/logs
artifacts_location: |
./integration-tests/migration/logs
/tmp/gotest.log
Copy link
Contributor

Choose a reason for hiding this comment

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

similar as before if gotesthelper is opted /tmp/gotest.log can be added to artifacts_location

@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@tateexon tateexon added this pull request to the merge queue Apr 10, 2024
Merged via the queue into develop with commit 134ebf7 Apr 10, 2024
105 checks passed
@tateexon tateexon deleted the TT-1016-Use-GoTestLogHelper branch April 10, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants