-
Notifications
You must be signed in to change notification settings - Fork 429
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: allow feature value size to be configured per installation #4446
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
Docker builds report
|
Uffizzi Preview |
6ef8575
to
f441dd2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4446 +/- ##
==========================================
+ Coverage 97.16% 97.17% +0.01%
==========================================
Files 1160 1164 +4
Lines 40123 40280 +157
==========================================
+ Hits 38986 39143 +157
Misses 1137 1137 ☔ View full report in Codecov by Sentry. |
This reverts commit e5679de.
|
||
dependencies = [ | ||
('features', '0064_fix_feature_help_text_typo'), | ||
] |
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.
Can we add the sqlmigrate for this and the other migration
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.
Here they are without setting the environment variable:
❯ python manage.py sqlmigrate features 0065
BEGIN;
--
-- Alter field initial_value on feature
--
-- (no-op)
--
-- Alter field initial_value on historicalfeature
--
-- (no-op)
--
-- Alter field string_value on featurestatevalue
--
-- (no-op)
--
-- Alter field string_value on historicalfeaturestatevalue
--
-- (no-op)
COMMIT;
❯ python manage.py sqlmigrate multivariate 0008
BEGIN;
--
-- Alter field string_value on historicalmultivariatefeatureoption
--
-- (no-op)
--
-- Alter field string_value on multivariatefeatureoption
--
-- (no-op)
COMMIT;
... and with the environment variable
❯ export FEATURE_VALUE_LIMIT=2000000
❯ python manage.py sqlmigrate features 0065
BEGIN;
--
-- Alter field initial_value on feature
--
ALTER TABLE "features_feature" ALTER COLUMN "initial_value" TYPE varchar(2000000);
--
-- Alter field initial_value on historicalfeature
--
ALTER TABLE "features_historicalfeature" ALTER COLUMN "initial_value" TYPE varchar(2000000);
--
-- Alter field string_value on featurestatevalue
--
ALTER TABLE "features_featurestatevalue" ALTER COLUMN "string_value" TYPE varchar(2000000);
--
-- Alter field string_value on historicalfeaturestatevalue
--
ALTER TABLE "features_historicalfeaturestatevalue" ALTER COLUMN "string_value" TYPE varchar(2000000);
COMMIT;
❯ python manage.py sqlmigrate multivariate 0008
BEGIN;
--
-- Alter field string_value on historicalmultivariatefeatureoption
--
ALTER TABLE "multivariate_historicalmultivariatefeatureoption" ALTER COLUMN "string_value" TYPE varchar(2000000);
--
-- Alter field string_value on multivariatefeatureoption
--
ALTER TABLE "multivariate_multivariatefeatureoption" ALTER COLUMN "string_value" TYPE varchar(2000000);
COMMIT;
Based on a customer request, this PR allows the limit on the size of feature values to be configurable per installation using the
FEATURE_VALUE_LIMIT
environment variable.