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

resolve environment variables in repo config #1909

Merged
merged 1 commit into from
Sep 25, 2021
Merged

resolve environment variables in repo config #1909

merged 1 commit into from
Sep 25, 2021

Conversation

samuel100
Copy link
Contributor

What this PR does / why we need it:
The feature_store.yaml file allows Feast users to enter connection strings for offline and online stores. For example:

registry:
  path: ./registry.db
project: production
provider: local
online_store:
  type: redis
  connection_string: my-secret-connection-string

This means that a connection string can sit in a plain text file, which makes CI/CD impossible.

This PR allows Feast users to hide the connection string in the YAML file by using environment variables. For example:

registry:
  path: ./registry.db
project: production
provider: local
online_store:
  type: redis
  connection_string: ${CONN_STRING_ENV_VAR}

Here the environment variable CONN_STRING_ENV_VAR is resolved in repo_config.load_repo_config method. This aids CI/CD flows (e.g. using secrets in GitHub actions).

Does this PR introduce a user-facing change?:

NONE

@feast-ci-bot
Copy link
Collaborator

Hi @samuel100. Thanks for your PR.

I'm waiting for a feast-dev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@achals
Copy link
Member

achals commented Sep 25, 2021

/ok-to-test

Signed-off-by: Sam Kemp <samkemp@microsoft.com>
@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2021

Codecov Report

Merging #1909 (0433459) into master (dcae160) will increase coverage by 22.44%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1909       +/-   ##
===========================================
+ Coverage   60.60%   83.05%   +22.44%     
===========================================
  Files          96       96               
  Lines        7316     7317        +1     
===========================================
+ Hits         4434     6077     +1643     
+ Misses       2882     1240     -1642     
Flag Coverage Δ
integrationtests 74.80% <100.00%> (?)
unittests 60.61% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
sdk/python/feast/repo_config.py 78.97% <100.00%> (+4.12%) ⬆️
sdk/python/feast/online_response.py 86.79% <0.00%> (+1.88%) ⬆️
sdk/python/feast/infra/online_stores/sqlite.py 96.51% <0.00%> (+2.32%) ⬆️
sdk/python/feast/usage.py 66.66% <0.00%> (+2.77%) ⬆️
sdk/python/feast/feature.py 72.72% <0.00%> (+3.03%) ⬆️
sdk/python/feast/feature_view.py 86.57% <0.00%> (+5.36%) ⬆️
sdk/python/feast/errors.py 70.31% <0.00%> (+5.46%) ⬆️
sdk/python/feast/flags_helper.py 94.11% <0.00%> (+5.88%) ⬆️
sdk/python/feast/infra/provider.py 90.67% <0.00%> (+5.93%) ⬆️
... and 46 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 dcae160...0433459. Read the comment docs.

Copy link
Collaborator

@adchia adchia 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: adchia, samuel100

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 0342aa4 into feast-dev:master Sep 25, 2021
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.

5 participants