Tony Yun
09/28/2021, 7:06 PMValueError: Local Secret "CRITEO_SECRET_KEEPS" was not found.
But running locally is totally fine:
>>> prefect.client.Secret('CRITEO_SECRET_KEEPS').get()
'1stxxxxg'
Is there any possible reasons? I clearly defined the secret in local config file.Tony Yun
09/28/2021, 7:13 PMKevin Kho
"PREFECT__CLOUD__USE_LOCAL_SECRETS" = "true"
?Kevin Kho
Kevin Kho
from prefect import Flow, task
from prefect.client.secrets import Secret
from prefect.storage import Docker
storage = Docker(base_image="prefecthq/prefect:0.15.5-python3.8")
x = Secret("TEST").get()
@task
def abc():
x = Secret("TEST").get()
return x
with Flow("test", storage=storage) as flow:
abc(x)
flow.register("dsdc")
and it’s working fine. I think at this point, I might need a reproducible example (or you can share you code with me privately if you are comfortable and I can try to re-create the structure)Tony Yun
09/28/2021, 8:03 PMTony Yun
09/29/2021, 8:30 PMCRIETO_SECRET_KEEPS = get_secret('CRITEO_SECRET_KEEPS')
^this doesn’t work if in the parent level of a module somehow