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

Use set when parsing repos to prevent duplicates #1913

Merged
merged 6 commits into from
Sep 30, 2021

Conversation

achals
Copy link
Member

@achals achals commented Sep 29, 2021

Signed-off-by: Achal Shah achals@gmail.com

What this PR does / why we need it:

#1905 didn't solve the problem - so this is a simpler approach that is probably more robust.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

none

Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
@@ -78,7 +74,8 @@ def __init__(
self._created_timestamp: Optional[datetime] = None
self._last_updated_timestamp: Optional[datetime] = None

self.defined_in = get_calling_file_name(inspect.stack())
def __hash__(self) -> int:
return hash(self.name)
Copy link
Member

Choose a reason for hiding this comment

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

How would we detect and raise an exception when users provide two objects with the same name that are different?

Copy link
Member Author

Choose a reason for hiding this comment

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

My earlier comments completely misunderstood your point -fixing using id().

…the same name

Signed-off-by: Achal Shah <achals@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2021

Codecov Report

Merging #1913 (bcc0f3b) into master (ce5a130) will increase coverage by 0.10%.
The diff coverage is 61.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1913      +/-   ##
==========================================
+ Coverage   82.85%   82.95%   +0.10%     
==========================================
  Files          96       96              
  Lines        7360     7359       -1     
==========================================
+ Hits         6098     6105       +7     
+ Misses       1262     1254       -8     
Flag Coverage Δ
integrationtests 74.38% <19.35%> (-0.24%) ⬇️
unittests 60.76% <59.67%> (+0.11%) ⬆️

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

Impacted Files Coverage Δ
sdk/python/feast/feature_service.py 75.34% <0.00%> (-1.29%) ⬇️
sdk/python/feast/importer.py 64.28% <ø> (-9.40%) ⬇️
sdk/python/tests/unit/test_entity.py 100.00% <ø> (ø)
sdk/python/feast/repo_operations.py 44.21% <19.23%> (+1.75%) ⬆️
sdk/python/feast/entity.py 73.60% <50.00%> (-1.21%) ⬇️
sdk/python/feast/feature_table.py 44.89% <50.00%> (-0.38%) ⬇️
sdk/python/feast/feature_view.py 86.57% <100.00%> (-0.36%) ⬇️
sdk/python/feast/on_demand_feature_view.py 89.47% <100.00%> (-0.19%) ⬇️
...ion/test_cli_apply_duplicated_featureview_names.py 100.00% <100.00%> (ø)
sdk/python/feast/infra/utils/aws_utils.py 83.03% <0.00%> (-0.90%) ⬇️

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 ce5a130...bcc0f3b. Read the comment docs.

Signed-off-by: Achal Shah <achals@gmail.com>
Copy link
Collaborator

@MattDelac MattDelac left a comment

Choose a reason for hiding this comment

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

Looks good to me

Thanks for the test, this makes it safer

I can also confirm that based on the latest commit of this PR, it works on our side 🚀
image

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

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

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

Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
@achals achals added the lgtm label Sep 30, 2021
@feast-ci-bot feast-ci-bot merged commit 5d0f37b into feast-dev:master Sep 30, 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.

6 participants