<@ULVA73B9P> why am I receiving a "no such command...
# ask-marvin
s
@Marvin why am I receiving a "no such command: 'execute'" in my kubernetes job?
m
There doesn't seem to be a direct match for the error message "no such command: 'execute'" in the open issues on the Prefect GitHub repository. However, there are some issues that might be tangentially related or could provide insights into the problem. One open issue is related to extending container command functionality with optional arguments after
prefect.engine
(#10400). This suggests there might be room for improved handling of command-line arguments within the Prefect CLI or engine, which could potentially relate to unexpected command errors. The entrypoint command is
["python", "-m", "prefect.engine"]
, and any additional command arguments are treated as a flow run ID. The discussion indicates a desire to allow for additional customized behavior beyond this. Another issue discusses the ability to not overwrite CLI deployments (#6644). This seems less related but does touch upon CLI behavior, which could be worth considering if your issue is arising from deployment procedures. The third issue mentions an excessive amount of
AssertionError: feed_data before feed_eof
in the logs (#6335). This is an error related to asyncio and stream handling, which might indirectly suggest there are bugs or edge cases in the Prefect system that could lead to unexpected command errors if there are issues with the subprocess execution within asyncio. Given the information above, I recommend the following: 1. Review the command and arguments you're using in the Kubernetes job to ensure it matches the expected format used by the Prefect CLI or engine. 2. Confirm that your Prefect agent and any related containers are using correctly structured entrypoint commands. 3. Check if there are any optional arguments or configurations that might be affecting the command recognition. If the issue persists, it might be useful to open a new issue on the Prefect GitHub repository with specific details about your setup, the exact commands you're running, and the context in which the error occurs. That way, the Prefect team can take a closer look and provide more targeted assistance.
n
what version is your worker running? this is likely a version mismatch thing
k
Are you referring to the docker image version? Or the prefect version in our dependencies. This is our docker image version: prefecthq/prefect:2-python3.10 And the prefect veresion in our python dependency is 2.10.6
n
gotcha > And the prefect version in our python dependency is 2.10.6 if possible i’d recommend upgrading from 2.10.6 to 2.14.5 + > prefect 2.14.5 changed the default command for from
prefect -m prefect.engine
to
prefect flow-run execute
, with the consequence that an agent on the newest version of prefect cannot start runs in any infrastructure that has prefect<2.12.0 (the version when
flow-run execute
was introduced) installed
so I'm guessing you're running a relatively old k8s agent on your cluster? here's the worker helm chart instructions if thats helpful
k
ya 😞 We haven't update our k8s agent since May 2023
s
Thank you Nate - this was helpful. We are back up and running again after updating.
k
Thank you very much Nate!
You're a life saver!
n
no problem! catjam