tvong
09/25/2024, 10:52 AMTraceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/prefect/cli/_utilities.py", line 42, in wrapper
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/cli/_types.py", line 153, in sync_fn
return asyncio.run(async_fn(*args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/cli/worker.py", line 114, in start
is_paused = await _check_work_pool_paused(work_pool_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/cli/worker.py", line 179, in _check_work_pool_paused
work_pool = await client.read_work_pool(work_pool_name=work_pool_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/client/orchestration.py", line 2638, in read_work_pool
response = await self._client.get(f"/work_pools/{work_pool_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1814, in get
return await self.request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1585, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/client/base.py", line 361, in send
response.raise_for_status()
File "/usr/local/lib/python3.11/site-packages/prefect/client/base.py", line 174, in raise_for_status
raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
prefect.exceptions.PrefectHTTPStatusError: Client error '401 Unauthorized' for url '<https://api.prefect.cloud/api/accounts/f77cfc80-a3a6-49f7-9902-7cadf8393125/workspaces/8d0c18c7-2e0b-46ac-bf03-40351431e6c5/work_pools/analytics-platform-kube-prod>'
Response: {'detail': 'Unauthorized'}
Marvin
09/25/2024, 10:52 AMGetting the following error when I deploy a prefect worker using the helm chart, I made sure that I filled out the helm chart values correctly so I don't think its an issue of misconfiguration```Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/prefect/cli/_utilities.py", line 42, in wrapper return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/prefect/cli/_types.py", line 153, in sync_fn return asyncio.run(async_fn(*args, **kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/prefect/cli/worker.py", line 114, in start is_paused = await _check_work_pool_paused(work
tvong
09/25/2024, 10:53 AMraise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
prefect.exceptions.PrefectHTTPStatusError: Client error '401 Unauthorized' for url '<https://api.prefect.cloud/api/accounts/f77cfc80-a3a6-49f7-9902-7cadf8393125/workspaces/8d0c18c7-2e0b-46ac-bf03-40351431e6c5/work_pools/analytics-platform-kube-prod>'
Response: {'detail': 'Unauthorized'}
Marvin
09/25/2024, 10:53 AMbash
kubectl create secret generic prefect-api-key \
--namespace=prefect --from-literal=key=your-prefect-cloud-api-key
- Replace your-prefect-cloud-api-key
with your actual API key.
3. Verify Helm Chart Values Configuration:
- Make sure your values.yaml
is correctly set up with the Prefect worker configuration, specifically under the worker
section.
- Add the Prefect Helm repository and create a namespace if not already done.
bash
helm repo add prefect <https://prefecthq.github.io/prefect-helm>
helm repo update
kubectl create namespace prefect
4. Helm Chart Deployment:
- Deploy the Helm chart with the configured values.
bash
helm install prefect-worker prefect/prefect --namespace=prefect -f values.yaml
5. Network and Proxy Configuration:
- Make sure your network allows outbound communication to Prefect Cloud URLs:
- app.prefect.cloud
- api.prefect.cloud
- `auth.workos.com
- If using proxies, ensure they are configured correctly in your environment.
If you have followed these steps and still face issues, verify your API key again and double-check your values.yaml
file for any misconfigurations.
Feel free to ask if you need more detailed help with any specific step!Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by