-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: bundle analysis comment threshold #271
Conversation
These changes improve documentation (and add unit tests) to `comment.require_bundle_changes` and adds a new config key `bundle_change_threshold`. The new key is a threshold size for the bundle in bytes. The input value is preferably a string that accepts certain size extensions (kb, mb, gb, ...) and is coerced into a size in bytes (as an integer)
4ef3dfb
to
68ecee0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #271 +/- ##
==========================================
- Coverage 90.17% 89.44% -0.73%
==========================================
Files 351 324 -27
Lines 11079 10184 -895
Branches 1969 1841 -128
==========================================
- Hits 9990 9109 -881
+ Misses 1015 1005 -10
+ Partials 74 70 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Updates the comment requirements for bundle_analysis. Respects the `comment.bundle_change_threshold` defined in the YAML and only notifies if changes are bigger than the threshold. (threshold is expected to be an int. So technically [this PR](codecov/shared#271) is a dependency of the present changes, because it does the coercion into an integer, as expected) Also adds the `"bundle_increase"` as a possible requirements. In this case on top of the threshold the change also needs to cause the bundle to _increase_ in size for a comment to be sent. closes: codecov/engineering-team#2021
@@ -147,6 +147,38 @@ def validate_str(self, data: str) -> CoverageCommentRequiredChangesANDGroup: | |||
raise Invalid("Failed to parse required_changes") | |||
|
|||
|
|||
class ByteSizeSchemaField(object): |
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.
Nice class! Very well organized, documented, easy to read
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.
PR looks good to me! Good job
Updates the comment requirements for bundle_analysis. Respects the `comment.bundle_change_threshold` defined in the YAML and only notifies if changes are bigger than the threshold. (threshold is expected to be an int. So technically [this PR](codecov/shared#271) is a dependency of the present changes, because it does the coercion into an integer, as expected) Also adds the `"bundle_increase"` as a possible requirements. In this case on top of the threshold the change also needs to cause the bundle to _increase_ in size for a comment to be sent. closes: codecov/engineering-team#2021
These changes improve documentation (and add unit tests) to
comment.require_bundle_changes
and adds a new config key
bundle_change_threshold
.The new key is a threshold size for the bundle in bytes. The input value
is preferably a string that accepts certain size extensions (kb, mb, gb, ...) and is
coerced into a size in bytes (as an integer)
closes: codecov/engineering-team#2018
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.