-
Notifications
You must be signed in to change notification settings - Fork 440
feat(storage): add support for bucket ip filter #15250
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #15250 +/- ##
========================================
Coverage 92.95% 92.95%
========================================
Files 2448 2450 +2
Lines 226468 226930 +462
========================================
+ Hits 210514 210949 +435
- Misses 15954 15981 +27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| return Status{}; | ||
| } | ||
|
|
||
| Status ParseIpFilter(BucketMetadata& meta, nlohmann::json const& json) { |
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.
This code can be made more readable by using from_json semantics.
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.
Going to leave this for the time being as it follows the coding patterns in the rest of the file. Longer term we may want to refactor to use to/from_json.
| json["iamConfiguration"] = std::move(value); | ||
| } | ||
|
|
||
| void ToJsonIpFilter(nlohmann::json& json, BucketMetadata const& meta) { |
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.
Ditto, to_json semantics seems to be potential candidate here.
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.
Going to leave this for the time being as it follows the coding patterns in the rest of the file. Longer term we may want to refactor to use to/from_json.
| } | ||
|
|
||
| Status PatchIpFilter(Bucket& b, nlohmann::json const& p) { | ||
| if (p.is_null()) { |
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.
from_json seems more suitable
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.
Going to leave this for the time being as it follows the coding patterns in the rest of the file. Longer term we may want to refactor to use to/from_json.
1d58a67 to
20e6563
Compare
20e6563 to
8c3d624
Compare
8c3d624 to
7b8b0e3
Compare
This change is