-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ffs] - Allow setting initial feature flag values (#1319)
* remove timestamps from FeatureFlag message Signed-off-by: Pierre Tessier <pierre@pierretessier.com> * remove timestamps from FeatureFlag message Signed-off-by: Pierre Tessier <pierre@pierretessier.com> * init feature flags using sql Signed-off-by: Pierre Tessier <pierre@pierretessier.com> * allows initial feature flags values Signed-off-by: Pierre Tessier <pierre@pierretessier.com> * Update src/ffs_postgres/20-ffs_data.sql Co-authored-by: Juliano Costa <julianocosta89@outlook.com> * Remove sporadically from cartServiceFailure --------- Signed-off-by: Pierre Tessier <pierre@pierretessier.com> Co-authored-by: Juliano Costa <julianocosta89@outlook.com>
- Loading branch information
1 parent
3895edc
commit f25b46f
Showing
18 changed files
with
1,147 additions
and
1,276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
50 changes: 0 additions & 50 deletions
50
src/featureflagservice/priv/repo/migrations/20220524172636_create_featureflags.exs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-- Copyright The OpenTelemetry Authors | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
CREATE TABLE public.featureflags ( | ||
name character varying(255), | ||
description character varying(255), | ||
enabled double precision DEFAULT 0.0 NOT NULL | ||
); | ||
|
||
ALTER TABLE ONLY public.featureflags ADD CONSTRAINT featureflags_pkey PRIMARY KEY (name); | ||
|
||
CREATE UNIQUE INDEX featureflags_name_index ON public.featureflags USING btree (name); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- Copyright The OpenTelemetry Authors | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
-- Feature Flags created and initialized on startup | ||
-- 'enabled' is a decimal value between 0 and 1 (inclusive) | ||
-- 0.0 is always disabled | ||
-- 1.0 is always enabled | ||
-- All values between set a percentage chance on each request | ||
-- example: 0.55 is enabled 55% of the time | ||
INSERT INTO public.featureflags (name, description, enabled) | ||
VALUES | ||
('productCatalogFailure', 'Fail product catalog service on a specific product', 0), | ||
('recommendationCache', 'Cache recommendations', 0), | ||
('adServiceFailure', 'Fail ad service requests', 0), | ||
('cartServiceFailure', 'Fail cart service requests', 0); |
Oops, something went wrong.