Skip to content
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

create Feature db record in constructor, not just in check_value() #363

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions shared/rollouts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ def __init__(
self.feature_flag = feature_flag
self.ff_variants = ff_variants

# Force the feature to be created in the database when it is initialized
# and not just when `check_value()` is called.
self._fetch_and_set_from_db()

# See if this environment has disabled feature flagging entirely.
# These environments will always get default values.
self.env_disable = os.getenv("CODECOV__FEATURE__DISABLE") is not None
Expand Down
Loading