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

Reduce excessing logging in CI #15462

Merged
merged 18 commits into from
Mar 23, 2024

Conversation

rohit-nayak-ps
Copy link
Contributor

@rohit-nayak-ps rohit-nayak-ps commented Mar 12, 2024

Description

The CI output is pretty large for some workflows, especially the unit test ones which log 16MB and 150K lines. This PR reduces it to mainly make it easier to find failing logs . Also, it takes a while for the logs to load online, to cut/paste and IDE complains because of the large size.

Results of wc on the raw logs of the 8.0 unit test before and after the PR:

Lines Size .
Before 47173 16053906
Muting tools 78981 9606538
With all changes 38943 4195909 reverted

Following changes have been made:

  • Muted package managers/downloaders: this reduced sizes by about 50%
    • apt-get: apt-get -qq
    • curl: curl -s
    • wget: wget-retry -q

So totally about 50% reduction in unit test logs. The first set of improvements should apply across the board since all tests will get dependencies.

Reverted changes to test output filtering

I originally did this and reverted because I was not able to navigate the launchable UI to check any impact.

  • Filter specific (passing) test-related logs from the output for an ad-hoc list of tests: this reduces sizes further by about 25%.

Reverted change: cat output.txt | grep -ivE '(PASS|RUN).*(Collation|Test.*Valid|TestRemoteWildcardMatches|Fuzz|tpcc|TestParse|PITR|cases|TestPlan|Super.*long)|DBClient'

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported to release branches
  • If this change is to be back-ported to previous releases, a justification is included in the PR description
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on CI?
  • Documentation was added or is not required

Deployment Notes

Copy link
Contributor

vitess-bot bot commented Mar 12, 2024

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has a descriptive title.
  • Ensure there is a link to an issue (except for internal cleanup and flaky test fixes), new features should have an RFC that documents use cases and test cases.

Tests

  • Bug fixes should have at least one unit or end-to-end test, enhancement and new features should have a sufficient number of tests.

Documentation

  • Apply the release notes (needs details) label if users need to know about this change.
  • New features should be documented.
  • There should be some code comments as to why things are implemented the way they are.
  • There should be a comment at the top of each new or modified test to explain what the test does.

New flags

  • Is this flag really necessary?
  • Flag names must be clear and intuitive, use dashes (-), and have a clear help text.

If a workflow is added or modified:

  • Each item in Jobs should be named in order to mark it as required.
  • If the workflow needs to be marked as required, the maintainer team must be notified.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • RPC changes should be compatible with vitess-operator
  • If a flag is removed, then it should also be removed from vitess-operator and arewefastyet, if used there.
  • vtctl command output order should be stable and awk-able.

@vitess-bot vitess-bot bot added NeedsBackportReason If backport labels have been applied to a PR, a justification is required NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsIssue A linked issue is missing for this Pull Request NeedsWebsiteDocsUpdate What it says labels Mar 12, 2024
@github-actions github-actions bot added this to the v20.0.0 milestone Mar 12, 2024
Signed-off-by: Rohit Nayak <[email protected]>
Signed-off-by: Rohit Nayak <[email protected]>
Signed-off-by: Rohit Nayak <[email protected]>
Signed-off-by: Rohit Nayak <[email protected]>
Signed-off-by: Rohit Nayak <[email protected]>
… original file back with just apt-get and curl muted

Signed-off-by: Rohit Nayak <[email protected]>
Signed-off-by: Rohit Nayak <[email protected]>
Signed-off-by: Rohit Nayak <[email protected]>
Signed-off-by: Rohit Nayak <[email protected]>
Signed-off-by: Rohit Nayak <[email protected]>
@rohit-nayak-ps rohit-nayak-ps removed NeedsWebsiteDocsUpdate What it says NeedsIssue A linked issue is missing for this Pull Request NeedsBackportReason If backport labels have been applied to a PR, a justification is required labels Mar 13, 2024
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.73%. Comparing base (ad7bdd9) to head (2c5e62b).
Report is 39 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15462      +/-   ##
==========================================
+ Coverage   65.63%   65.73%   +0.09%     
==========================================
  Files        1563     1560       -3     
  Lines      194395   194595     +200     
==========================================
+ Hits       127594   127916     +322     
+ Misses      66801    66679     -122     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rohit-nayak-ps rohit-nayak-ps removed Do Not Merge NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work labels Mar 13, 2024
@rohit-nayak-ps rohit-nayak-ps changed the title Do Not Merge: Experiments to reduce excessing logging in CI Reduce excessing logging in CI Mar 15, 2024
@rohit-nayak-ps rohit-nayak-ps marked this pull request as ready for review March 15, 2024 10:16
@@ -164,4 +164,4 @@ jobs:
fi

# print test output
cat output.txt
cat output.txt | grep -ivE '(PASS|RUN).*(Collation|Test.*Valid|TestRemoteWildcardMatches|Fuzz|tpcc|TestParse|PITR|cases|TestPlan|Super.*long)|DBClient'
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about this part, but the rest looks good. Do you see the expected behavior in launchable for the PR branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have reverted this change so that we can merge this PR without needing additional checks. I was not sure, looking at launchable's UI, how to go about checking. So rather than make a breaking change it is best to merge the other changes, which give us a significant benefit and look at more filtering later.

Copy link
Member

Choose a reason for hiding this comment

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

I see now launchable output in the CI

one of the CI output

Launchable recorded tests for build 8400631701 (test session 2749801) to workspace vitess/vitess-app from 1 files:

|   Files found |   Tests found |   Tests passed |   Tests failed |   Total duration (min) |
|---------------|---------------|----------------|----------------|------------------------|
|             1 |            16 |             16 |              0 |                   3.15 |

Signed-off-by: Rohit Nayak <[email protected]>
@rohit-nayak-ps rohit-nayak-ps merged commit 3eb6743 into vitessio:main Mar 23, 2024
102 checks passed
@rohit-nayak-ps rohit-nayak-ps deleted the rohit/fewer-ci-logs branch March 23, 2024 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants