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

fix: type casting #656

Merged
merged 1 commit into from
Aug 29, 2024
Merged

fix: type casting #656

merged 1 commit into from
Aug 29, 2024

Conversation

giovanni-guidini
Copy link
Contributor

I was expecting that returning a certain type from yaml validation would keep the type.
Maybe there's some to-from dict transformation happening but the type is being lost,
and then re-casting it is not giving the expected results.

So I'm improving the function to make sure that ["percentage",["absolute",1000.0]] won't be returned anymore.

Fixes Sentry issue 5767825563

@giovanni-guidini giovanni-guidini requested a review from a team August 29, 2024 12:36
@codecov-staging
Copy link

codecov-staging bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #656   +/-   ##
=======================================
  Coverage   98.05%   98.05%           
=======================================
  Files         437      437           
  Lines       36808    36814    +6     
=======================================
+ Hits        36093    36099    +6     
  Misses        715      715           
Flag Coverage Δ
integration 98.05% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.05% <100.00%> (+<0.01%) ⬆️
unit 98.05% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.91% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.06% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/bundle_analysis/new_notify/helpers.py 100.00% <100.00%> (ø)
...s/bundle_analysis/new_notify/tests/test_helpers.py 100.00% <100.00%> (ø)

@codecov-qa
Copy link

codecov-qa bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.05%. Comparing base (b67b75e) to head (15db225).
Report is 4 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #656   +/-   ##
=======================================
  Coverage   98.05%   98.05%           
=======================================
  Files         437      437           
  Lines       36808    36814    +6     
=======================================
+ Hits        36093    36099    +6     
  Misses        715      715           
Flag Coverage Δ
integration 98.05% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.05% <100.00%> (+<0.01%) ⬆️
unit 98.05% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.91% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.06% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
services/bundle_analysis/new_notify/helpers.py 100.00% <100.00%> (ø)
...s/bundle_analysis/new_notify/tests/test_helpers.py 100.00% <100.00%> (ø)

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.10%. Comparing base (b67b75e) to head (15db225).
Report is 4 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #656   +/-   ##
=======================================
  Coverage   98.10%   98.10%           
=======================================
  Files         476      476           
  Lines       38129    38135    +6     
=======================================
+ Hits        37406    37412    +6     
  Misses        723      723           
Flag Coverage Δ
integration 98.05% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.05% <100.00%> (+<0.01%) ⬆️
unit 98.05% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 96.02% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.06% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
services/bundle_analysis/new_notify/helpers.py 100.00% <100.00%> (ø)
...s/bundle_analysis/new_notify/tests/test_helpers.py 100.00% <100.00%> (ø)

This change has been scanned for critical changes. Learn more

Copy link

codecov-public-qa bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.05%. Comparing base (b67b75e) to head (15db225).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #656   +/-   ##
=======================================
  Coverage   98.05%   98.05%           
=======================================
  Files         437      437           
  Lines       36808    36814    +6     
=======================================
+ Hits        36093    36099    +6     
  Misses        715      715           
Flag Coverage Δ
integration 98.05% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.05% <100.00%> (+<0.01%) ⬆️
unit 98.05% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.91% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.06% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/bundle_analysis/new_notify/helpers.py 100.00% <100.00%> (ø)
...s/bundle_analysis/new_notify/tests/test_helpers.py 100.00% <100.00%> (ø)

I was expecting that returning a certain type from yaml validation would keep the type.
Maybe there's some to-from dict transformation happening but the type is being lost,
and then re-casting it is not giving the expected results.

So I'm improving the function to make sure that `["percentage",["absolute",1000.0]]` won't be returned anymore.

Fixes Sentry issue 5767825563
@giovanni-guidini giovanni-guidini added this pull request to the merge queue Aug 29, 2024
Merged via the queue into main with commit 2059386 Aug 29, 2024
25 of 26 checks passed
@giovanni-guidini giovanni-guidini deleted the gio/fix-type-casting branch August 29, 2024 15:30
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