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

Incomplete Model for StateCreate #15591

Open
WolfgangWenzel opened this issue Oct 5, 2024 · 0 comments
Open

Incomplete Model for StateCreate #15591

WolfgangWenzel opened this issue Oct 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@WolfgangWenzel
Copy link

Bug summary

First: congrats to an ingenious product! We have been evaluating workflow systems forever and this seems to be great.

However: if i trigger a run via client.create_flow_from_deployment, this calls DeploymentFlowRunCreate in line 628 in orchestration.py, which calls state.to_state_create() in line 631.

This code for this is in line 310 of objects.py which is supposed to return a StateCreate object that is not fully defined in actions.py. This is because ResultRecordMetadata is not imported there because TYPE_CHECKING (which is from typing.py -- dont touch it) is FALSE.

In anycase, if your would import ResultRecordMetadata at this point it results into a circular import.

A partial fix to this is to add

 from prefect.results import ResultRecordMetadata
 StateCreate.model_rebuild()

directly before StateCreate in objects.py but i am not sure this fixes all problems.

Cheers

Version info (prefect version output)

Version:             3.0.3
API version:         0.8.4
Python version:      3.9.6
Git commit:          d9c51bc3
Built:               Fri, Sep 20, 2024 8:52 AM
OS/Arch:             win32/AMD64
Profile:             local
Server type:         server
Pydantic version:    2.9.1
Integrations:
  prefect-aws:       0.5.0
  prefect-shell:     0.3.0

Additional context

No response

@WolfgangWenzel WolfgangWenzel added the bug Something isn't working label Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant