-
Notifications
You must be signed in to change notification settings - Fork 2
feat(schemas): Support partially gzip-compressed environment documents #157
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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #157 +/- ##
==========================================
+ Coverage 95.67% 95.76% +0.08%
==========================================
Files 85 86 +1
Lines 2891 2949 +58
==========================================
+ Hits 2766 2824 +58
Misses 125 125 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
emyller
left a comment
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.
Approved with non-blocking comments.
Co-authored-by: Evandro Myller <[email protected]>
Co-authored-by: Evandro Myller <[email protected]>
Contributes to Flagsmith/flagsmith#6394, https://github.com/Flagsmith/edge-api/issues/508
In this PR, we update the DynamoDB schemas with
Compressedvariants of the environment document.A generic
JsonGzippedtype is introduced that, when used via a Pydantic type adapter, validates the inner type, then JSON-encodes and gzip-compresses it. On the consuming side, the type informs the data shape after decompression.Gzip is used with
mtime=0and JSON encoding withsort_keys=Trueto support repeatable results.simplejsonlibrary is used so validated decimals are encoded natively.