Hi, I’m porting a flow from 1.0 to 2.0. My flow needs a couple of secrets. During development I would like to run the flow via a plain old python call and the ephemeral API, with
if __name__ == '__main__': myflow()
. This is without a running Orion server.
The code in my flow that creates the Secret block appears to work. However, when I try use my Secret block in my 2.0 flow the prefect client raises a PrefectHTTPStatusError, and says ‘Block document not found’.
In Prefect 1.0 I could use
PREFECT__CONTEXT__SECRETS__
to set the values I need, but I don’t see any mention of similar functionality for 2.0.
✅ 1
Mars
08/17/2022, 12:02 AM
If using blocks and secrets means I absolutely need to have an Orion server running, that’s fine. I’d just like to know so we can structure our pipeline dev and deployment environments appropriately.
a
alex
08/17/2022, 12:06 AM
Hey @Mars! Blocks work with the ephemeral API, so you shouldn't need an Orion server running to use them. Would you be able to share some example code where you're seeing this behavior?
m
Mars
08/17/2022, 12:19 AM
Hello! Nevermind, there was a bug in my code: I wrote
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.