Kevin Kho
Jason
04/20/2022, 8:30 PMmarque
04/21/2022, 1:35 AMprefect deployment create
. Getting a prefect.exceptions.ObjectAlreadyExists
error. Is this expected?Ahmed Ezzat
04/21/2022, 5:11 AMRasmus Lindqvist
04/21/2022, 5:48 AMprefect agent vertex start
? Or would you recommend deploying Prefect on in another way on GCP instead?Ben Ayers-Glassey
04/21/2022, 6:04 AMprefect describe flows ...
)?
What I'm wanting to do is mark each flow with the git repo and commit from which the flow was registered.
I'm thinking of situations where a flow run fails, so you want to see the source code; but if you're in an organization with many people making their own flows in different Git repos, you may not know which repo the flow is from, and so you want a way to easily find the source for a given flow.
We've been asking people to manually add a link to the Git repo in every flow's "README" section in the Prefect Cloud UI, but as far as I can tell, you can't populate that README section via Python or commandline.Malthe Karbo
04/21/2022, 6:52 AMChris Reuter
04/21/2022, 12:32 PMKonstantin
04/21/2022, 1:57 PM51 secret = VaultSecret("/######/######/###/#####/").run()
52 File "/usr/local/lib/python3.9/site-packages/prefect/utilities/tasks.py", line 456, in method
53 return run_method(self, *args, **kwargs)
54 File "/usr/local/lib/python3.9/site-packages/prefect/tasks/secrets/vault_secret.py", line 171, in run
55 value = self._get_vault_secret(name)
56 File "/usr/local/lib/python3.9/site-packages/prefect/tasks/secrets/vault_secret.py", line 87, in _get_vault_secret
57 vault_creds = PrefectSecret(self.vault_credentials_secret).run()
58 File "/usr/local/lib/python3.9/site-packages/prefect/tasks/secrets/base.py", line 66, in run
59 return _Secret(name).get()
60 File "/usr/local/lib/python3.9/site-packages/prefect/client/secrets.py", line 140, in get
61 raise ValueError(
62 ValueError: Local Secret "VAULT_CREDENTIALS" was not found.
my code:
from prefect.tasks.secrets.vault_secret import VaultSecret
secret = VaultSecret("/######/########/###/#####/").run()Kevin Mullins
04/21/2022, 2:06 PMAKS
. I’ve been using Docker
storage for my flows and just recently started using AzureResult
in my flows for result persistence. I’ve been letting the AzureResult
use the AZURE_STORAGE_CONNECTION_STRING
environment variable which is the recommendation from the documentation and plays nicely with k8s
secrets in AKS
. Just found after some infrastructure changes that the environment variable was not being used and finally found it it was because the Docker
storage was capturing the environment variable during registration and serializing the value via cloudpickle
into the flow. I’ll be looking into using secrets; however, I wanted to suggest maybe re-visiting the documentation or process to prevent accidental credential exposures in the Docker
storage.Joshua Greenhalgh
04/21/2022, 2:20 PMPod prefect-job-18e30a61-5tnpd failed.
Container 'flow' state: terminated
Exit Code:: 1
Reason: Error
In the logs...Tom Manterfield
04/21/2022, 2:42 PMKevin Weiler
04/21/2022, 3:00 PMAhmed Ezzat
04/21/2022, 3:05 PMgather
in prefect 2.0. I'm aware that tasks return instance of PrefectFuture
what I want is a way to get finished futures as soon as it completes, keep in mind I'm talking about a list of futures not just oneJoshua Greenhalgh
04/21/2022, 3:20 PMPatrick Tan
04/21/2022, 3:43 PMJake
04/21/2022, 3:58 PMAttributeError: 'V1Job' object has no attribute 'name'
and I’m not sure what this means. Prefect cloud is reporting that No heartbeat detected from the remote task; marking the run as failed.
This is a Kubernetes Agent. I looked at the logs and here is a stack trace:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/prefect/agent/kubernetes/agent.py", line 413, in heartbeat
self.manage_jobs()
File "/usr/local/lib/python3.6/site-packages/prefect/agent/kubernetes/agent.py", line 193, in manage_jobs
ERROR:agent:Error while managing existing k8s jobs
Traceback (most recent call last):
f"Job {job.name!r} is for flow run {flow_run_id!r} "
AttributeError: 'V1Job' object has no attribute 'name'
File "/usr/local/lib/python3.6/site-packages/prefect/agent/kubernetes/agent.py", line 190, in manage_jobs
flow_run_state = self.client.get_flow_run_state(flow_run_id)
File "/usr/local/lib/python3.6/site-packages/prefect/client/client.py", line 1664, in get_flow_run_state
raise ObjectNotFoundError(f"Flow run {flow_run_id!r} not found.")
prefect.exceptions.ObjectNotFoundError: Flow run 'af8b8a74-8ed0-4417-812a-566de859ce64' not found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/prefect/agent/kubernetes/agent.py", line 413, in heartbeat
self.manage_jobs()
File "/usr/local/lib/python3.6/site-packages/prefect/agent/kubernetes/agent.py", line 193, in manage_jobs
f"Job {job.name!r} is for flow run {flow_run_id!r} "
AttributeError: 'V1Job' object has no attribute 'name'
Deleting the Agent pod did not solve the issue. Any ideas?Matthew Seligson
04/21/2022, 4:25 PMBrian Phillips
04/21/2022, 4:30 PMMatt Delacour
04/21/2022, 4:42 PMDockerFlowRunner()
for that is unclear
• I am guessing that I would need to use tags to glue any logic around our different environments (prod / adhoc). But I don't know if work-queues need to be created "manually" for each new "Repo user" (see diagram)
Also feel free to point me to a tuto explaining all the best practices to deploy Prefect 🙏Niclas Roos
04/21/2022, 5:36 PMShuchita Tripathi
04/21/2022, 6:12 PMAndrew Lawlor
04/21/2022, 6:17 PMFailed to load and execute flow run: RefreshError(TransportError("Failed to retrieve <http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/ACCOUNT/token?scopes=SCOPES> from the Google Compute Engine metadata service. Status: 500 Response:\nb'Unable to generate access token; IAM returned \\n'", <google.auth.transport.requests._Response object at 0x7f5b071fd670>))
Andrew Lawlor
04/21/2022, 6:36 PMJustin Burchard
04/21/2022, 7:25 PMFabio Scarpellini
04/21/2022, 7:41 PMAssaf Ben Shimon
04/21/2022, 11:01 PMDarshan
04/22/2022, 12:26 AMAhmed Ezzat
04/22/2022, 4:35 AMRainer Schülke
04/22/2022, 7:56 AM