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

in Definitions.merge, don't error on duplicate resource and logger values #22945

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

sryza
Copy link
Contributor

@sryza sryza commented Jul 10, 2024

Summary & Motivation

After this PR, the following no longer errors:

defs1 = Definitions(resources={"resource1": 4})
defs2 = Definitions(resources={"resource1": 4})

merged = Definitions.merge(defs1, defs2)

How I Tested These Changes

@petehunt
Copy link
Contributor

Love it. is instead of == is probably a little more conservative and has stronger performance guarantees, so I would favor that but either is fine IMO.

@sryza sryza force-pushed the definitions-merge-allow-duplicates branch from 2155aff to 5cbcddf Compare July 11, 2024 20:08
@sryza
Copy link
Contributor Author

sryza commented Jul 11, 2024

@petehunt switched to is because it's easy to go the other direction in the future.

@sryza sryza requested review from schrockn and dpeng817 July 18, 2024 21:13
Copy link
Member

@schrockn schrockn left a comment

Choose a reason for hiding this comment

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

Makes sense 👍🏻

@sryza sryza force-pushed the definitions-merge-allow-duplicates branch from 5cbcddf to 1b99422 Compare July 23, 2024 16:18
@sryza sryza merged commit e3faf83 into master Jul 23, 2024
1 check failed
@sryza sryza deleted the definitions-merge-allow-duplicates branch July 23, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants