Ziyao Wei
04/11/2020, 5:47 PMprefect agent start
to connect to Azure - I am passing in a AZURE_STORAGE_CONNECTION_STRING
but it complains:
Unexpected error: HTTPError('400 Client Error: Bad Request for url: http://<URL>:4200/graphql/alpha')
Traceback (most recent call last):
File "/home/<username>/.local/lib/python3.7/site-packages/prefect/client/secrets.py", line 121, in get
value = secrets[self.name]
KeyError: 'AZ_CREDENTIALS'
Jeremiah
04/11/2020, 5:56 PMZiyao Wei
04/11/2020, 5:58 PMApril 11th 2020 at 1:46:15pm | prefect.CloudTaskRunner
ERROR
Unexpected error: HTTPError('400 Client Error: Bad Request for url: http://<URL>:4200/graphql/alpha')
Traceback (most recent call last):
File "/home/<USER>/.local/lib/python3.7/site-packages/prefect/client/secrets.py", line 121, in get
value = secrets[self.name]
KeyError: 'AZ_CREDENTIALS'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/<USER>/.local/lib/python3.7/site-packages/prefect/engine/runner.py", line 48, in inner
new_state = method(self, state, *args, **kwargs)
File "/home/<USER>/.local/lib/python3.7/site-packages/prefect/engine/task_<http://runner.py|runner.py>", line 925, in get_task_run_state
state._result.store_safe_value()
File "/home/<USER>/.local/lib/python3.7/site-packages/prefect/engine/result/base.py", line 127, in store_safe_value
value = self.result_handler.write(self.value)
File "/home/<USER>/.local/lib/python3.7/site-packages/prefect/engine/result_handlers/azure_result_<http://handler.py|handler.py>", line 110, in write
self.service.create_blob_from_text(
File "/home/<USER>/.local/lib/python3.7/site-packages/prefect/engine/result_handlers/azure_result_<http://handler.py|handler.py>", line 75, in service
self.initialize_service()
File "/home/<USER>/.local/lib/python3.7/site-packages/prefect/engine/result_handlers/azure_result_<http://handler.py|handler.py>", line 59, in initialize_service
azure_credentials = Secret(self.azure_credentials_secret).get()
File "/home/<USER>/.local/lib/python3.7/site-packages/prefect/client/secrets.py", line 130, in get
variables=dict(name=self.name),
File "/home/<USER>/.local/lib/python3.7/site-packages/prefect/client/client.py", line 220, in graphql
token=token,
File "/home/<USER>/.local/lib/python3.7/site-packages/prefect/client/client.py", line 180, in post
token=token,
File "/home/<USER>/.local/lib/python3.7/site-packages/prefect/client/client.py", line 317, in _request
response.raise_for_status()
File "/conda/envs/rapids/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://<URL>:4200/graphql/alpha
Jeremiah
04/11/2020, 5:58 PMZiyao Wei
04/11/2020, 5:59 PMAZURE_STORAGE_CONNECTION_STRING=XXXXXX prefect agent start
Jeremiah
04/11/2020, 6:00 PMAzure
storage is that correct?Ziyao Wei
04/11/2020, 6:02 PMstorage = Azure(container="prefect-flows")
with Flow("Hello World from Azure!", storage=storage) as flow:
simple_task_test()
flow.register()
Jeremiah
04/11/2020, 6:09 PMflow.result_handler.azure_credentials_secret=None
just prior to registering the flow?Ziyao Wei
04/11/2020, 6:30 PMresult_handler = AzureResultHandler(container=container, azure_credentials_secret=None)
with Flow("Hello World from Azure!", storage=storage, result_handler=result_handler) as flow:
simple_task_test()