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

Refactor State types into prefect.states #7108

Merged
merged 9 commits into from
Oct 11, 2022

Conversation

zanieb
Copy link
Contributor

@zanieb zanieb commented Oct 7, 2022

Requires #7106

I was uncomfortable with the implementation details present in prefect.client.schemas as well as the lack of clarity on where state types should be imported from. This moves implementation details of the State type and related utilities into prefect.states. prefect.client.schemas now contains schemas with no logic. A bit of shuffling was required to resolve circular imports here. I've moved inject_client to a dedicated module as we use it in nearly every client module and it is a constant source of circular import issues.

@zanieb zanieb marked this pull request as ready for review October 7, 2022 22:16
@zanieb zanieb requested review from bunchesofdonald and peytonrunyan and removed request for cicdw October 7, 2022 22:16
@zanieb zanieb requested a review from tpdorsey as a code owner October 10, 2022 16:18
Base automatically changed from results/21-refactor-types to feature/results October 10, 2022 16:29
@zanieb zanieb removed the request for review from tpdorsey October 10, 2022 16:36
@netlify
Copy link

netlify bot commented Oct 10, 2022

Deploy Preview for prefect-orion ready!

Name Link
🔨 Latest commit cd5ef15
🔍 Latest deploy log https://app.netlify.com/sites/prefect-orion/deploys/63445d2a3bcb0f000923a4d1
😎 Deploy Preview https://deploy-preview-7108--prefect-orion.netlify.app/api-ref/prefect/client
📱 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 settings.

from prefect.utilities.asyncutils import asyncnullcontext


def inject_client(fn):
Copy link
Contributor

Choose a reason for hiding this comment

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

Big fan of the move!

@zanieb zanieb merged commit 1fdc57e into feature/results Oct 11, 2022
@zanieb zanieb deleted the results/22-refactor-states branch October 11, 2022 15:36
zanieb added a commit that referenced this pull request Oct 12, 2022
# Conflicts:
#	src/prefect/blocks/core.py
#	src/prefect/deployments.py
zanieb added a commit that referenced this pull request Oct 12, 2022
# Conflicts:
#	src/prefect/blocks/core.py
#	src/prefect/deployments.py
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.

2 participants