Kevin Grismore
07/29/2022, 9:52 PMEOFError EOF when reading a line
Creating a profile for this Prefect Cloud login. Please specify a profile name: An exception occurred.
Error: Process completed with exit code 1.
I don't think it's possible for me to respond to a prompt like that via Actions. Is there a way around this?Khuyen Tran
07/29/2022, 9:59 PMKevin Grismore
07/29/2022, 10:01 PMjobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Dev dependencies
run: |
pip install prefect
- name: Login to Prefect Cloud 2.0
env:
PREFECT_API_KEY: ${{ secrets.PREFECT_API_KEY }}
run: prefect cloud login --key $PREFECT_API_KEY --workspace <my-workspace>
- name: Validate Prefect version
run: prefect version
- name: Authenticate to GCP
uses: 'google-github-actions/auth@v0.7.1'
with:
workload_identity_provider: <my-workload-identity-provider>
service_account: <my-service-account>
- name: Create deployment file
run: prefect deployment build ./flow.py:iowa_contribs -n demo-iowa -t demo -sb gcs/gcs-bucket-access
- name: Run deployment
run: prefect deployment apply deployment.yaml
Khuyen Tran
07/29/2022, 10:09 PMKevin Grismore
07/29/2022, 10:10 PMrun: prefect cloud login --key $PREFECT_API_KEY --workspace <my-workspace>
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
return fn(*args, **kwargs)
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/prefect/utilities/asyncutils.py", line 193, in wrapper
return run_async_in_new_loop(async_fn, *args, **kwargs)
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/prefect/utilities/asyncutils.py", line 140, in run_async_in_new_loop
return anyio.run(partial(__fn, *args, **kwargs))
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/anyio/_core/_eventloop.py", line 70, in run
return asynclib.run(func, *args, **backend_options)
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 292, in run
return native_run(wrapper(), debug=debug)
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper
return await func(*args)
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/prefect/cli/cloud.py", line 293, in login
cloud_profile_name = app.console.input(
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/rich/console.py", line 2079, in input
result = input()
EOFError: EOF when reading a line
Creating a profile for this Prefect Cloud login. Please specify a profile name: An exception occurred.
Error: Process completed with exit code 1.
PREFECT_API_KEY
on the current profile, then login, and it'll exit without prompting me for a profile nameKhuyen Tran
07/29/2022, 10:16 PM<my-workspace>
in here:
prefect cloud login --key $PREFECT_API_KEY --workspace <my-workspace>
with the name of your workspace right?Kevin Grismore
07/29/2022, 10:16 PMprefect config set PREFECT_API_KEY=<your-key>
and prefect config set PREFECT_API_URL=<your-url>
in the CI job or the login will prompt for user inputKhuyen Tran
07/29/2022, 10:47 PMprefect config set
Kevin Grismore
07/29/2022, 10:47 PMKhuyen Tran
07/29/2022, 10:51 PMKevin Grismore
07/29/2022, 10:52 PMBenny Warlick
07/30/2022, 2:48 AM- name: run prefect
run: |-
echo 'my-profile' | prefect cloud login --key ${{ secrets.PREFECT_CLOUD_API_KEY }} -w "$PREFECT_WORKSPACE"
Anna Geller
07/30/2022, 6:57 PMBenny Warlick
07/30/2022, 7:34 PMAnna Geller
07/30/2022, 7:35 PMBenny Warlick
07/30/2022, 7:40 PMKevin Grismore
07/30/2022, 7:42 PMAnna Geller
07/31/2022, 9:21 AMKevin Grismore
07/31/2022, 4:33 PM- name: Run deployment
env:
PREFECT_API_KEY: ${{ secrets.PREFECT_API_KEY }}
PREFECT_API_URL: ${{ secrets.PREFECT_API_URL }}
run: prefect deployment apply my_flow-deployment.yaml
🙂Khuyen Tran
07/31/2022, 4:48 PM