-
Notifications
You must be signed in to change notification settings - Fork 1k
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: Make contrib test pluggable #2654
Conversation
Signed-off-by: Oleksii Moskalenko <[email protected]>
Signed-off-by: Oleksii Moskalenko <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #2654 +/- ##
==========================================
+ Coverage 80.54% 80.58% +0.04%
==========================================
Files 163 165 +2
Lines 13815 13727 -88
==========================================
- Hits 11127 11062 -65
+ Misses 2688 2665 -23
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: Oleksii Moskalenko <[email protected]>
Signed-off-by: Oleksii Moskalenko <[email protected]>
Signed-off-by: Oleksii Moskalenko <[email protected]>
Signed-off-by: Oleksii Moskalenko <[email protected]>
Signed-off-by: Oleksii Moskalenko <[email protected]>
|
||
test-python-universal-postgres: | ||
PYTHONPATH='.' \ | ||
FULL_REPO_CONFIGS_MODULE=sdk.python.feast.infra.offline_stores.contrib.postgres_repo_configuration \ | ||
PYTEST_PLUGINS=sdk.python.feast.infra.offline_stores.contrib.postgres_offline_store.tests \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you remove the PYTHONPATH
, this can be updated to feast.infra.offline_stores.contrib.postgres_offline_store.tests
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the import logic is the same as in FULL_REPO_CONFIGS_MODULE
. Since our working dir is repo root we're probably need sdk.python
prefix.
sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/tests/data_source.py
Outdated
Show resolved
Hide resolved
sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/tests/data_source.py
Outdated
Show resolved
Hide resolved
@@ -164,110 +161,13 @@ def start_test_local_server(repo_path: str, port: int): | |||
fs.serve("localhost", port, no_access_log=True) | |||
|
|||
|
|||
class TrinoContainerSingleton: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for deleting this crap 🙏🏽
Signed-off-by: Oleksii Moskalenko <[email protected]>
@contextlib.contextmanager | ||
def setup_python_fs_client(): | ||
@pytest.fixture | ||
def python_fs_client(request): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I'm dumb I see this now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: achals, 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 |
Signed-off-by: Oleksii Moskalenko [email protected]
What this PR does / why we need it:
This decouples contrib tests from our main tests.
Instead of adding each new docker container to main
conftest.py
this PR proposes to use PYTEST_PLUGIN environment.Thus all contrib related code (including data source creator) moved to
feast.infra.offline_stores.contrib
.Which issue(s) this PR fixes:
Fixes #