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

Add root flow run id to runtime #13165

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

50Bytes-dev
Copy link

This PR adds root_flow_run_id variable to prefect.runtime.flow_run.

Example

from prefect import flow
from prefect import runtime

@flow(log_prints=True)
def root_flow(x):
    child_flow()

@flow
def child_flow():
    deep_flow()

@flow
def deep_flow():
    print("Root flow run id is", runtime.flow_run.root_flow_run_id)

root_flow(1)

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • This pull request includes a label categorizing the change e.g. maintenance, fix, feature, enhancement, docs.

@50Bytes-dev 50Bytes-dev requested a review from a team as a code owner April 30, 2024 11:58
Copy link

netlify bot commented Apr 30, 2024

👷 Deploy request for prefect-docs-preview pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5588eed

@50Bytes-dev
Copy link
Author

@abrookins please merge, I need this

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.

None yet

2 participants