-
Notifications
You must be signed in to change notification settings - Fork 10
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
Prep the terrain for reports with label compression. #188
Conversation
4029223
to
1e257c1
Compare
Codecov Report
Changes have been made to critical files, which contain lines commonly executed in production. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #188 +/- ##
==========================================
+ Coverage 98.30% 98.31% +0.01%
==========================================
Files 380 382 +2
Lines 28366 28489 +123
==========================================
+ Hits 27886 28010 +124
+ Misses 480 479 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
This change has been scanned for critical changes. Learn more |
Codecov Report
@@ Coverage Diff @@
## main #188 +/- ##
==========================================
+ Coverage 98.34% 98.35% +0.01%
==========================================
Files 351 353 +2
Lines 27721 27844 +123
==========================================
+ Hits 27262 27386 +124
+ Misses 459 458 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #188 +/- ##
==========================================
+ Coverage 98.34% 98.35% +0.01%
==========================================
Files 351 353 +2
Lines 27721 27844 +123
==========================================
+ Hits 27262 27386 +124
+ Misses 459 458 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
context: codecov/engineering-team #768 Creates a rollout for label compression. This is gonna help us to test and safely release the feature in the wild. Notice that currently the label compression does nothing. There are comments similar to `TODO: needs shared update`. The update in question is codecov/shared#79 So these changes mostly prep the terrain for future changes that will actually do something, and add the guardrails to avoid issues when deploying. In particular it adds some helper methods to the `ArchiveService`, creates a kinda-stubbed `LabelsIndexService`, passes more data to the `_adjust_sessions` portion of `raw_upload_processor` where most changes will occur. If you're curious as to what the end result will probably look like see #180
1e257c1
to
bb537db
Compare
): | ||
label_index_service = LabelsIndexService(upload.report) | ||
# TODO: Needs shared upload | ||
# if original_report._labels_index is None: |
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.
If _labels_index
is meant to be accessed from the outside then maybe remove the leading _
(it's convention for private methods and attrs)
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.
That's fair... I'll change that in shared
and adjust in the PR that actually makes use of it
# if original_report._labels_index is None: | ||
# label_index_service.set_label_idx(original_report) | ||
# # Make sure that the labels in the reports are in a good state to merge them | ||
# make_sure_orginal_report_is_using_label_ids(original_report) |
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.
Where will these functions come from?
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.
they will be implemented in that file... check https://github.com/codecov/worker/pull/189/files#diff-a6e093dd207a55f7406f52e6aaaa6fc0533ac9b5cf965a0d8ffdffc257216f49
def unset_label_idx(self, report: Report, label_index: Dict[str, str]): | ||
# Write the updated index back into storage | ||
# TODO: Needs shared update | ||
# self._archive_client.write_label_index( | ||
# self.commit_sha, report._labels_index, self.commit_report.code | ||
# ) | ||
self._archive_client.write_label_index( | ||
self.commit_sha, label_index, self.commit_report.code | ||
) |
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.
why is unsetting tied to writing?
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.
Good question... In my mind you take the index from storage into memory, possibly modify it, and once you're done with it expect it to be re-written to storage to preserve changes.
I see that it's not obvious though...
* main: Only trigger AI PR review if pull is open Add log line when triggering AI PR review task fix: use original PR base to compute patch coverage (#199) Prepare release 23.12.4 Update workflows chore(deps): Update codecov-shared dependency (#194) Prep the terrain for reports with label compression. (#188) allow staging deploy when pushing to staging (#192)
context: codecov/engineering-team #768
Creates a rollout for label compression. This is gonna help us to test and safely release the feature in the wild.
Notice that currently the label compression does nothing.
There are comments similar to
TODO: needs shared update
.The update in question is codecov/shared#79
So these changes mostly prep the terrain for future changes that will actually do something,
and add the guardrails to avoid issues when deploying.
In particular it adds some helper methods to the
ArchiveService
, creates a kinda-stubbedLabelsIndexService
,passes more data to the
_adjust_sessions
portion ofraw_upload_processor
where most changes will occur.If you're curious as to what the end result will probably look like see #180
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.