Skip to content

ci: Use testcontainers to spin up DynamoDB instances for local integration tests#2531

Merged
feast-ci-bot merged 2 commits into
feast-dev:masterfrom
TremaMiguel:feat/test-containers-dynamod
Apr 13, 2022
Merged

ci: Use testcontainers to spin up DynamoDB instances for local integration tests#2531
feast-ci-bot merged 2 commits into
feast-dev:masterfrom
TremaMiguel:feat/test-containers-dynamod

Conversation

@TremaMiguel

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #2505

Context:

Use testcontainers to spin up a local Docker Container with DynamoDB. Integrate the DynamoDBOnlineStoreCreator for testing to replace any standard DynamoDB Online store with an ephemeral container emulating DynamoDB.

@TremaMiguel
TremaMiguel requested a review from a team as a code owner April 13, 2022 03:03
@TremaMiguel
TremaMiguel requested review from pyalex and removed request for a team April 13, 2022 03:03
@achals

achals commented Apr 13, 2022

Copy link
Copy Markdown
Member

Thanks for the PR! Did this work locally for you?

@achals achals assigned achals and unassigned felixwang9817 Apr 13, 2022
@codecov-commenter

codecov-commenter commented Apr 13, 2022

Copy link
Copy Markdown

Codecov Report

Merging #2531 (41a0cfc) into master (90db1d1) will decrease coverage by 24.16%.
The diff coverage is 50.00%.

@@             Coverage Diff             @@
##           master    #2531       +/-   ##
===========================================
- Coverage   81.85%   57.68%   -24.17%     
===========================================
  Files         140      140               
  Lines       11695    11751       +56     
===========================================
- Hits         9573     6779     -2794     
- Misses       2122     4972     +2850     
Flag Coverage Δ
integrationtests ?
unittests 57.68% <50.00%> (+0.20%) ⬆️

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 54.06% <50.00%> (-35.41%) ⬇️
...n/feature_repos/universal/online_store/dynamodb.py 50.00% <50.00%> (ø)
.../integration/online_store/test_online_retrieval.py 16.84% <0.00%> (-83.16%) ⬇️
sdk/python/tests/utils/online_read_write_test.py 19.35% <0.00%> (-80.65%) ⬇️
.../integration/online_store/test_universal_online.py 14.85% <0.00%> (-78.00%) ⬇️
...fline_store/test_universal_historical_retrieval.py 24.12% <0.00%> (-75.88%) ⬇️
...gration/registration/test_feature_service_apply.py 31.25% <0.00%> (-68.75%) ⬇️
sdk/python/feast/infra/online_stores/redis.py 28.39% <0.00%> (-67.84%) ⬇️
sdk/python/tests/integration/e2e/test_usage_e2e.py 33.87% <0.00%> (-66.13%) ⬇️
sdk/python/tests/data/data_creator.py 34.78% <0.00%> (-65.22%) ⬇️
... and 74 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 90db1d1...41a0cfc. Read the comment docs.

@TremaMiguel

TremaMiguel commented Apr 13, 2022

Copy link
Copy Markdown
Member Author

@achals thanks for the quick response.

Actually, I've made some changes inside repo_configuration.py, just testing the DynamoDB as online store to check that it works locally.

DEFAULT_REPO_CONFIGS.extend(
    [
        IntegrationTestRepoConfig(online_store=DYNAMO_CONFIG)
    ]
)

@achals achals left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@feast-ci-bot
feast-ci-bot merged commit 695f5dd into feast-dev:master Apr 13, 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.

ci: Test-containers spin up DynamoDB for local integration tests.

5 participants