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

Add flags file to include experimental flags and test/usage flags #1864

Merged
merged 10 commits into from
Sep 16, 2021

Conversation

adchia
Copy link
Collaborator

@adchia adchia commented Sep 15, 2021

What this PR does / why we need it:
Adds a flags module + puts python feature server & on demand transform behind that flag (throwing errors if not enabled). This uses feature_store.yaml as the way for users to control features, but provides cli methods to enable/disable features. Features are off by default (but on for tests)

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

sdk/python/feast/flags.py Outdated Show resolved Hide resolved
class ExperimentalFeatureNotEnabled(Exception):
def __init__(self, feature_flag_name: str):
super().__init__(
f"Trying to use experimental feature. Please ensure to set environment variables {FLAG_ALPHA_FEATURES_NAME} and {feature_flag_name} to true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about

Suggested change
f"Trying to use experimental feature. Please ensure to set environment variables {FLAG_ALPHA_FEATURES_NAME} and {feature_flag_name} to true"
f"You are attempting to use an experimental feature. Please set the environment variables {FLAG_ALPHA_FEATURES_NAME} and {feature_flag_name} to true"

@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2021

Codecov Report

Merging #1864 (ca8707d) into master (57baf71) will decrease coverage by 0.76%.
The diff coverage is 46.95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1864      +/-   ##
==========================================
- Coverage   84.75%   83.99%   -0.77%     
==========================================
  Files          92       95       +3     
  Lines        7241     7383     +142     
==========================================
+ Hits         6137     6201      +64     
- Misses       1104     1182      +78     
Flag Coverage Δ
integrationtests 83.93% <45.21%> (-0.75%) ⬇️
unittests 62.12% <43.47%> (-0.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
sdk/python/feast/cli.py 39.27% <29.85%> (-3.32%) ⬇️
sdk/python/feast/feature_store.py 93.67% <40.00%> (-0.68%) ⬇️
sdk/python/feast/repo_config.py 78.85% <43.75%> (-3.54%) ⬇️
sdk/python/feast/errors.py 70.40% <66.66%> (-0.10%) ⬇️
sdk/python/feast/flags_helper.py 94.11% <94.11%> (ø)
sdk/python/feast/flags.py 100.00% <100.00%> (ø)
sdk/python/feast/infra/offline_stores/bigquery.py 78.52% <100.00%> (-0.15%) ⬇️
sdk/python/tests/conftest.py 100.00% <0.00%> (ø)
...ts/integration/feature_repos/repo_configuration.py 100.00% <0.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57baf71...ca8707d. Read the comment docs.

@adchia
Copy link
Collaborator Author

adchia commented Sep 16, 2021

/retest

Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
sdk/python/feast/cli.py Outdated Show resolved Hide resolved
sdk/python/feast/errors.py Outdated Show resolved Hide resolved
sdk/python/feast/flags.py Outdated Show resolved Hide resolved
Signed-off-by: Danny Chiao <danny@tecton.ai>
Copy link
Member

@achals achals left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Member

@achals achals left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: achals, adchia

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@feast-ci-bot feast-ci-bot merged commit e98d65a into feast-dev:master Sep 16, 2021
@adchia adchia deleted the experiment_flag branch October 27, 2021 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants