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

chore: List of avaliable online and offline stores exposed in test configuration #2625

Merged
merged 2 commits into from
Apr 29, 2022

Conversation

pyalex
Copy link
Collaborator

@pyalex pyalex commented Apr 28, 2022

Signed-off-by: pyalex moskalenko.alexey@gmail.com

What this PR does / why we need it:

This will allow generating custom repo configs in specific test modules based on available online and offline stores.

Which issue(s) this PR fixes:

Fixes #

Signed-off-by: pyalex <moskalenko.alexey@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Apr 28, 2022

Codecov Report

Merging #2625 (b0e8d90) into master (5200fde) will decrease coverage by 0.29%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2625      +/-   ##
==========================================
- Coverage   81.66%   81.37%   -0.30%     
==========================================
  Files         161      161              
  Lines       13307    13314       +7     
==========================================
- Hits        10867    10834      -33     
- Misses       2440     2480      +40     
Flag Coverage Δ
integrationtests 71.84% <100.00%> (-1.08%) ⬇️
unittests 59.81% <100.00%> (+0.42%) ⬆️

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

Impacted Files Coverage Δ
...ts/integration/feature_repos/repo_configuration.py 89.44% <100.00%> (+0.30%) ⬆️
sdk/python/feast/infra/online_stores/datastore.py 50.23% <0.00%> (-40.47%) ⬇️
sdk/python/tests/utils/online_read_write_test.py 93.54% <0.00%> (-6.46%) ⬇️
.../integration/online_store/test_online_retrieval.py 96.84% <0.00%> (-3.16%) ⬇️
...python/tests/integration/e2e/test_universal_e2e.py 86.53% <0.00%> (-1.47%) ⬇️
...ython/feast/embedded_go/online_features_service.py 95.04% <0.00%> (-1.00%) ⬇️
...thon/feast/infra/offline_stores/bigquery_source.py 85.71% <0.00%> (-0.90%) ⬇️
.../online_stores/contrib/hbase_online_store/hbase.py 34.69% <0.00%> (+29.59%) ⬆️
sdk/python/feast/infra/utils/hbase_utils.py 41.17% <0.00%> (+38.23%) ⬆️

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 5200fde...b0e8d90. Read the comment docs.

Copy link
Collaborator

@felixwang9817 felixwang9817 left a comment

Choose a reason for hiding this comment

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

I'm a bit confused by what this PR accomplishes - how does it make it easier to specify a set of configs for a test?

@pyalex
Copy link
Collaborator Author

pyalex commented Apr 28, 2022

@felixwang9817
so usage could be like this

# test_logged_features.py

from tests.integration.feature_repos import AVAILABLE_OFFLINE_STORES

LOCAL_REPO_CONFIGS = [
   IntegrationTestRepoConfig(
        provider="gcp",
        offline_store_creator=BigQueryDataSourceCreator,
        online_store=REDIS_CONFIG,
        go_feature_retrieval=True,
    ),
   IntegrationTestRepoConfig(
        provider="aws",
        offline_store_creator=RedshiftDataSourceCreator,
        online_store=REDIS_CONFIG,
        go_feature_retrieval=True,
    ),

]

@pytest.fixture(params=[
    c for c in LOCAL_REPO_CONFIGS if c.offline_store_creator in AVAILABLE_OFFLINE_STORES and c.online_store...
])
def local_environment():
     ...


def test_go_features_logging(local_environment):
    ...

Signed-off-by: pyalex <moskalenko.alexey@gmail.com>
@felixwang9817
Copy link
Collaborator

@pyalex got it, I think this is fine for now so I'll stamp. In the long run it still feels quite awkward to set up a LOCAL_REPO_CONFIGS in each test file (let alone per test); I like the decorators approach more.

Copy link
Collaborator

@felixwang9817 felixwang9817 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: felixwang9817, pyalex

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 2b2a76b into feast-dev:master Apr 29, 2022
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.

4 participants