Skip to content

Conversation

@felixwang9817
Copy link
Collaborator

What this PR does / why we need it: This PR changes the scope of several pytest fixtures, including environment to function-scoped instead of session-scoped. This will ensure that each test environment is separate. It also adds a test to confirm that each test environment is separate.

Which issue(s) this PR fixes:

Fixes #

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: felixwang9817

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

The pull request process is described here

Details 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

@codecov-commenter
Copy link

codecov-commenter commented Jul 1, 2022

Codecov Report

Merging #2899 (69b5352) into master (8abc2ef) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2899      +/-   ##
==========================================
- Coverage   80.65%   80.58%   -0.07%     
==========================================
  Files         176      177       +1     
  Lines       15663    15679      +16     
==========================================
+ Hits        12633    12635       +2     
- Misses       3030     3044      +14     
Flag Coverage Δ
integrationtests 70.70% <100.00%> (-0.18%) ⬇️
unittests 59.32% <52.38%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
...s/integration/registration/test_universal_types.py 100.00% <ø> (ø)
sdk/python/tests/conftest.py 78.47% <100.00%> (ø)
...on/tests/integration/e2e/test_go_feature_server.py 99.27% <100.00%> (ø)
sdk/python/tests/unit/test_registry_conflict.py 100.00% <100.00%> (ø)
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%) ⬇️
sdk/python/feast/infra/online_stores/datastore.py 87.96% <0.00%> (-1.39%) ⬇️
...ython/feast/embedded_go/online_features_service.py 89.39% <0.00%> (-0.76%) ⬇️
sdk/python/feast/stream_feature_view.py 94.11% <0.00%> (-0.74%) ⬇️
sdk/python/feast/registry.py 82.72% <0.00%> (-0.73%) ⬇️

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 8abc2ef...69b5352. Read the comment docs.

@kevjumba
Copy link
Collaborator

kevjumba commented Jul 1, 2022

look sgood btw

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
@felixwang9817 felixwang9817 changed the title chore: Pytest scoping chore: Change pytest fixtures to be function-scoped instead of session-scoped Jul 1, 2022
@kevjumba
Copy link
Collaborator

kevjumba commented Jul 1, 2022

/lgtm



@pytest.mark.integration
def test_apply_first_entity(environment):
Copy link
Member

Choose a reason for hiding this comment

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

If the Scopes have been changed i don't see a huge point to these tests - even if there's a race condition in the future it seems like the repro for that will need it's own test. Wdyt?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah this is fair; I'll remove this in some future PR when I clean up test suite

@feast-ci-bot feast-ci-bot merged commit 8828240 into feast-dev:master Jul 5, 2022
adchia pushed a commit that referenced this pull request Jul 14, 2022
…n-scoped (#2899)

* Test to trigger registry conflicts

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Switch environment and associated fixtures to being function scoped

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Format

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Switch type tests to function-scoped fixtures

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Format

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
kevjumba pushed a commit that referenced this pull request Jul 19, 2022
…n-scoped (#2899)

* Test to trigger registry conflicts

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Switch environment and associated fixtures to being function scoped

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Format

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Switch type tests to function-scoped fixtures

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Format

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
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