a

    Arun Giridharan

    10 months ago
    Question: Is it possible for 2 parent flows to access the same child run id?
    Kevin Kho

    Kevin Kho

    10 months ago
    Hey @Arun Giridharan, if you are on Cloud, I think this is a good use case for the KV Store. You can persist the value of the child run id and then retrieve it later maybe?
    a

    Arun Giridharan

    10 months ago
    @Kevin Kho interesting! How does KV Store handle concurrency issues?
    Kevin Kho

    Kevin Kho

    10 months ago
    I believe it’s pretty lightweight. Fetching keys should be fast. You may run into issues with reading or writing though if the two parents flows are doing it simultaneously. You can also use the GraphQL API maybe to find that child flow id if you know what you are looking for?
    a

    Arun Giridharan

    10 months ago
    is there a way to this in just Prefect Core?
    Kevin Kho

    Kevin Kho

    10 months ago
    Maybe if you maintain your own Redis cache? It needs to be cached somewhere, but how can you trigger flows with just Prefect core? I though they need to be registered and run to get those ids
    a

    Arun Giridharan

    10 months ago
    This may be a silly question but how can I get a flow id during a flow?
    Kevin Kho

    Kevin Kho

    10 months ago
    Not a silly question.
    prefect.context.get("flow_id")
    . You can find more here