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

Remove registry conflict warning #13155

Merged
merged 4 commits into from
May 4, 2024
Merged

Remove registry conflict warning #13155

merged 4 commits into from
May 4, 2024

Conversation

jlowin
Copy link
Member

@jlowin jlowin commented Apr 29, 2024

When developing interactively or building a framework that dynamically generates tasks, my terminal is full of warnings about name conflicts in the Prefect registry. In most situations this has no consequence, but the warnings pollute my output. This introduces a setting to disable the warning, but the default is to leave it enabled (current behavior).

After talking with the team, the warning is removed entirely.

@jlowin jlowin requested a review from a team as a code owner April 29, 2024 17:44
Copy link

netlify bot commented Apr 29, 2024

Deploy Preview for prefect-docs-preview ready!

Name Link
🔨 Latest commit 204d9f6
🔍 Latest deploy log https://app.netlify.com/sites/prefect-docs-preview/deploys/663529f7bcf11f0008003d79
😎 Deploy Preview https://deploy-preview-13155--prefect-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@zzstoatzz zzstoatzz left a comment

Choose a reason for hiding this comment

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

🙌

@zzstoatzz zzstoatzz added development Tech debt, refactors, CI, tests, and other related work. enhancement An improvement of an existing feature and removed development Tech debt, refactors, CI, tests, and other related work. labels Apr 29, 2024
Copy link
Member

@desertaxle desertaxle left a comment

Choose a reason for hiding this comment

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

LGTM!

for other in registry.get_instances(Flow)
if other.name == self.name and id(other.fn) != id(self.fn)
)
and PREFECT_WARN_OBJECT_REGISTRY_CONFLICT.value()
Copy link
Member

Choose a reason for hiding this comment

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

nit: The .value isn't needed.

Suggested change
and PREFECT_WARN_OBJECT_REGISTRY_CONFLICT.value()
and PREFECT_WARN_OBJECT_REGISTRY_CONFLICT

for other in registry.get_instances(Task)
if other.name == self.name and id(other.fn) != id(self.fn)
)
and PREFECT_WARN_OBJECT_REGISTRY_CONFLICT.value()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
and PREFECT_WARN_OBJECT_REGISTRY_CONFLICT.value()
and PREFECT_WARN_OBJECT_REGISTRY_CONFLICT

@aaazzam
Copy link
Collaborator

aaazzam commented Apr 29, 2024

why not default = True 😂

@jlowin jlowin marked this pull request as draft April 29, 2024 23:23
@jlowin jlowin marked this pull request as ready for review April 29, 2024 23:33
@jlowin jlowin merged commit fb2d3d8 into main May 4, 2024
58 checks passed
@jlowin jlowin deleted the registry-warning branch May 4, 2024 02:27
@jlowin jlowin changed the title Allow the registry conflict warning to be disabled Remove registry conflict warning May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants