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

[CIVIS-9606] reduce ITR-induced code coverage overhead for default branch #157

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

anmarchenko
Copy link
Member

@anmarchenko anmarchenko commented Apr 11, 2024

What does this PR do?
Implements default branch code coverage overhead optimization: when server adds with require_git: true to the library settings payload, we wait for git upload to be done and then request settings again. The ITR Runner is configured with the second settings payload.

The reason for this is that if default branch does not have many relevant code changes, running per test code coverage won't give us a lot of new information and can be skipped: thus, tests in default branch will run faster without per test code coverage overhead.

How to test the change?
Unit tests are provided

@anmarchenko anmarchenko changed the title add #require_git? method to RemoteSettingsApi::Response [CIVIS-9606] reduce ITR-induced code coverage overhead for default branch Apr 11, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.04%. Comparing base (9fab5aa) to head (c564bbf).

Additional details and impacted files
@@           Coverage Diff           @@
##              1.0     #157   +/-   ##
=======================================
  Coverage   99.04%   99.04%           
=======================================
  Files         192      193    +1     
  Lines        8786     8824   +38     
  Branches      379      381    +2     
=======================================
+ Hits         8702     8740   +38     
  Misses         84       84           

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

Base automatically changed from anmarchenko/git_tree_upload_worker to 1.0 April 11, 2024 12:44
@anmarchenko anmarchenko marked this pull request as ready for review April 11, 2024 16:44
@anmarchenko anmarchenko requested review from a team as code owners April 11, 2024 16:44
Copy link

@romainkomorndatadog romainkomorndatadog left a comment

Choose a reason for hiding this comment

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

Love how clean this all is. Very nice. :)

In the Python tracer, I have some extra bits of logging and tests for the case where require_git is still true (eg: could happen if the metadata upload doesn't finish in time or the backend misses it for some reason), which I think is a nice-to-have, but not a blocker for approval.

@anmarchenko
Copy link
Member Author

@romainkomorndatadog thanks for the heads up!

@anmarchenko anmarchenko merged commit 3513b8c into 1.0 Apr 12, 2024
23 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/require_git_config_support branch April 12, 2024 10:03
@anmarchenko anmarchenko added this to the 1.0 milestone Apr 23, 2024
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.

3 participants