Hi, I’m porting a flow from 1.0 to 2.0. My flow n...
# prefect-community
m
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
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
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
Hello! Nevermind, there was a bug in my code: I wrote
Copy code
Secret(value="my-secret-name").save(name="somevalue")
instead of
Copy code
Secret(value="somevalue").save(name="my-secret-name")
PEBKAC!
👍 1