-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Conversation
✅ Deploy Preview for prefect-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
src/prefect/flows.py
Outdated
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() |
There was a problem hiding this comment.
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.
and PREFECT_WARN_OBJECT_REGISTRY_CONFLICT.value() | |
and PREFECT_WARN_OBJECT_REGISTRY_CONFLICT |
src/prefect/tasks.py
Outdated
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and PREFECT_WARN_OBJECT_REGISTRY_CONFLICT.value() | |
and PREFECT_WARN_OBJECT_REGISTRY_CONFLICT |
why not default = True 😂 |
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.