https://prefect.io logo
j

Josh Lowe

05/04/2021, 10:19 PM
Hey everyone! This morning we've noticed that almost ALL of our flows have started failing with this error.
Copy code
Message: [{'path': ['set_flow_run_states'], 'message': '[{\'extensions\': {\'path\': \'$\', \'code\': \'data-exception\'}, \'message\': \'invalid input syntax for type uuid: "3fca7934-6af8-45f7-aae4-ea6fec0339c9:FargateAgent:agent:<agent_name>"\'}]', 'extensions': {'code': 'INTERNAL_SERVER_ERROR'}}]
No changes have been made to our platform, and it looks like some flows are able to be run, but then will fail again on subsequent runs. Anyone seen anything like this before? FargateAgent is deprecated, and we have plans to update and move to ECS agent - but I haven't seen any updates in a while that might be causing this
😓 2
m

Mariia Kerimova

05/04/2021, 10:37 PM
Hello Josh! What version of Prefect are you using?
👋 1
j

Josh Lowe

05/04/2021, 10:38 PM
Core version 0.12.0 currently! 😬 We’ve been due for an update for a while now
m

Mariia Kerimova

05/04/2021, 10:42 PM
Okay, let me find out what changes were made on our side, I'll get back to you shortly.
One more question to narrow the scope. Did you try to restart the agent and run a flow?
j

Josh Lowe

05/04/2021, 11:04 PM
Yup, and it worked for a few runs then started throwing that error again
m

Mariia Kerimova

05/04/2021, 11:16 PM
Can you please set debug level logs for this agent and confirm that you this log
Agent ID: 7DEF1AEF-32B5-4D39-A2CA-D9D6D63B7471
?
j

Josh Lowe

05/04/2021, 11:30 PM
Yup that's the agent id:
7def1aef-32b5-4d39-a2ca-d9d6d63b7471
k

Kevin Dyer

05/05/2021, 1:32 AM
Did you see anything at your end @Mariia Kerimova or are you waiting for us to increase the debug level?
Sorry for the delay. I bit of a change of guard at our end as Josh had to go offline
k

Kevin Kho

05/05/2021, 1:51 AM
Hey @Kevin Dyer, we’ll probably have to respond to you tom but yes increasing the debug level and showing logs. That might help us.
👍 1
k

Kevin Dyer

05/05/2021, 4:59 AM
Hey Kevin, I jumped in and does the agent have debug logging? https://docs.prefect.io/orchestration/agents/fargate.html
k

Kevin Kho

05/05/2021, 5:27 AM
On the agent, set the environment variable
PREFECT__LOGGING__LEVEL=DEBUG
. Doc
You can do it upon agent start like this
Actually wait, I think that CLI is for later versions.
Looks it like works for version 0.12. Old docs
k

Kevin Dyer

05/05/2021, 5:33 PM
So
export PREFECT__LOGGING__LEVEL=Debug; start_agent.py
Where the script has
Copy code
agent = FargateAgent(...)
agent.start()
Should do it? Eventually it seems to rely on this line: https://github.com/PrefectHQ/prefect/blob/master/src/prefect/agent/agent.py#L145
k

Kevin Kho

05/05/2021, 6:25 PM
I think you want
PREFECT__LOGGING__LEVEL=DEBUG
. Not sure if capitalization matters but just to be safe. That should do it. I wouldn’t really read code from master since we’re on version 0.14+ now and you were on 0.12 so I’m not sure it’s reliable. But yes in this case I think that’s all good.
👍 1
k

Kevin Dyer

05/10/2021, 1:22 AM
Sorry for being slow to come back on this. We restarted everything to fix the issue. I'll try remember to check in regarding anything we have learnt, including if the log level change show more details on the agent
k

Kevin Kho

05/10/2021, 1:24 AM
You can use the CLI when starting up an agent to control log levels btw.
prefect agent local start -log-level DEBUG
. Doc here . The environment variable is not the easiest way to do it
k

Kevin Dyer

05/10/2021, 1:27 AM
Sorry, I said agent but we are using a
agent.start()
script. I'd like to dig further (and upgrade) if I can make the time
k

Kevin Kho

05/10/2021, 1:28 AM
Oh my bad. Yes I guess env variable is the way to go.