I’m having some trouble with Email Task and the Cl...
# prefect-server
k
I’m having some trouble with Email Task and the Cloud Secrets. We recently upgraded our Prefect local agent to the current version, and now are getting these the Local Secret not found message for the email creds when initiating a flow run from the cloud (screenshot attached). However, when we run the flow locally from python, Prefect is able to get the email creds that are stored in Prefect Cloud (this is assumed since we never stored the email creds anywhere but the cloud). Any ideas? cc: @jack
j
Hi @Kao Phetchareun - double checking you are using Prefect Cloud? (This is the Server channel so want to be sure we're talking about the same thing).
k
OH yes I’m using CLoud
I didn’t realize there was a separate channel
j
All good! Just wanted to be sure we were talking about the same thing. Is there anyway that you have
use_local_secrets = true
set in your config?
Or as an environment variable?
k
I have that variable set to false in the config file itself
Which is why I’m confused as to why it works locally (where I never saved the creds locally), but doesn’t in the cloud since the creds are only in the cloud
🤔 1
j
Is the agent in the same environment as you are using locally? If not, can you make sure that the config.toml in that environment has
use_local_secrets = false
too?
k
In windows, would this be in an account’s
.prefect
directory? Our agent is on a windows machine
j
Ooh good question. Yup the config.toml is usually in .prefect. And I don't think that should differ for a windows machine. (But if you can't find it I can double check with the team.)
k
Well I was editing the config.toml in the actual python installation. I only see a backend.toml file in the service account that actually runs the cloud initiated jobs
Let me check if editing the backend.toml file fixes this
Issue still persissts
j
Yes the backend.toml is for setting server/cloud. Can you try setting
PREFECT__CLOUD__USE_LOCAL_SECRETS
to false?
k
Trying… may take a little bit
j
@Jenny Which config file is supposed to contain
use_local_secrets = false
?
For example, should it be in:
/home/users/MY_USERNAME/.prefect/config.toml
or
/home/users/USERNAME_OF_THE_PREFECT_AGENT/.prefect/config.toml
or
/path/to/the/VIRTUALENV/lib/site-packages/prefect/config.toml
?
j
Looks to me like the one with username of the Prefect agent would be the one to set but really it's whichever one your agent is using!