-
Notifications
You must be signed in to change notification settings - Fork 319
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
Raise error if enum not provided for a value we're trying to encode #2587
Conversation
This pull request was exported from Phabricator. Differential Revision: D59925061 |
86d03b0
to
12c2d39
Compare
This pull request was exported from Phabricator. Differential Revision: D59925061 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2587 +/- ##
=======================================
Coverage 95.22% 95.22%
=======================================
Files 489 489
Lines 47683 47703 +20
=======================================
+ Hits 45406 45426 +20
Misses 2277 2277 ☔ View full report in Codecov by Sentry. |
This pull request was exported from Phabricator. Differential Revision: D59925061 |
…acebook#2587) Summary: Pull Request resolved: facebook#2587 We probably want to let the user know if they're trying to encode/save a value we're going to drop. It turns out prior to this diff, a `None` for the enum that would be used to encode the value is treated differently than an actual enum that just happens to be missing the value. So a missing enum for experiment type would not raise an error if experiment type was passed. This should debatably only be done in test mode though. Silent failures are generally bad though and we could cause more problems down the road by not saving data we need to. Reviewed By: Cesar-Cardoso Differential Revision: D59925061
12c2d39
to
a3628cb
Compare
This pull request was exported from Phabricator. Differential Revision: D59925061 |
…acebook#2587) Summary: Pull Request resolved: facebook#2587 We probably want to let the user know if they're trying to encode/save a value we're going to drop. It turns out prior to this diff, a `None` for the enum that would be used to encode the value is treated differently than an actual enum that just happens to be missing the value. So a missing enum for experiment type would not raise an error if experiment type was passed. This should debatably only be done in test mode though. Silent failures are generally bad though and we could cause more problems down the road by not saving data we need to. Reviewed By: Cesar-Cardoso Differential Revision: D59925061
a3628cb
to
643e0c1
Compare
…acebook#2587) Summary: Pull Request resolved: facebook#2587 We probably want to let the user know if they're trying to encode/save a value we're going to drop. It turns out prior to this diff, a `None` for the enum that would be used to encode the value is treated differently than an actual enum that just happens to be missing the value. So a missing enum for experiment type would not raise an error if experiment type was passed. This should debatably only be done in test mode though. Silent failures are generally bad though and we could cause more problems down the road by not saving data we need to. Reviewed By: Cesar-Cardoso Differential Revision: D59925061
This pull request was exported from Phabricator. Differential Revision: D59925061 |
643e0c1
to
53b9d66
Compare
This pull request has been merged in be8e1f7. |
Summary:
We probably want to let the user know if they're trying to encode/save a value we're going to drop. It turns out prior to this diff, a
None
for the enum that would be used to encode the value is treated differently than an actual enum that just happens to be missing the value. So a missing enum for experiment type would not raise an error if experiment type was passed.This should debatably only be done in test mode though. Silent failures are generally bad though and we could cause more problems down the road by not saving data we need to.
Differential Revision: D59925061