Hi everyone. Is anyone familiar with the manner in...
# prefect-community
e
Hi everyone. Is anyone familiar with the manner in which a manual_only task can be triggered from the UI? The logger results in
finished task run for task with final state: 'Paused'
, and I'm not sure as to how this would be fixed.
n
Hi @Ethan Shenker! Manual-only tasks can be resumed/approved from the flow run page to which the task run belongs or from the task run page itself in the actions bar:
upvote 1
You should also receive a notification in the global notifications bar whenever a task enters a "Paused" state:
e
Hey @nicholas, I really appreciate the response. Unfortunately, I'm still slightly confused. My UI doesn't have either the global notifications bar, nor the column in the "task runs" table that allows for unpausing -
@nicholas I realize now that you're running Prefect on the cloud, whereas I've been running it from my local machine. How would I go about converting to the Cloud? I've been using
flow.register(project_name="...")
and
flow.run_agent()
, but is there another way that I could have it deploy to the cloud rather than my localhost?
n
Hm, I believe the pause/resume functionality should still be able available in Prefect Server - which version are you running? To push to Cloud, you'll need to create a Cloud account (you can do so by visiting cloud.prefect.io), grab a User token from the User > Api Tokens page in the left sidebar, and then running:
Copy code
$ prefect backend cloud && prefect auth login -t <<YOUR_TOKEN>>
Then you'll register your flows as normal 🙂
e
I'll try registering with the cloud, but is there a command I can run to determine the version of the Prefect server I'm running?
n
Yup ~! You can run
prefect version
e
I'm currently running 0.12.3
n
Ahh that explains it! 0.13.0 released a completely new version of the UI, including notifications and the approval functionality.
e
Got it. Unfortunately, I'm using a regulated service that can only run on python3.6, which I believe would prevent me from updating my version of Prefect.
n
Got it - that's fine! In which case it sounds like Cloud is a better solution for you since you'll always have the updated UI and API functionality.
c
Hi Ethan - you should still be able to update your version of Prefect; nothing has changed with the versions of Python we require / support
e
Hi @Chris White, I updated my version of prefect to 0.13.2, but now when I try
prefect server start
,
prefect agent start
, and running my file, I get an error that's never been thrown before: requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://localhost:4200/graphql
n
You'll want to run
prefect backend server
before you interact with your local server and
prefect backend cloud
for interacting with Cloud 🙂
e
I have a shell script that runs the file, and each time that script is ran, the
prefect backend server
command is also ran. However, that HTTP error still persists.
@nicholas It seems as though it's arisen as a result of trying to register the flow
Is there any way to revert back to an older version?
This wasn't happening when I had tried with 0.12.3
c
Hi Ethan, there were a few changes in 0.13.2 that might cause this. In particular you’ll need to first create a project and then provide the project name when you register your flow
e
Hey Chris, I created a project called Pricing Flow within the Prefect UI, and then when I registered my flow from the source code I used the
overwrite_flow.register(project_name="Pricing Flow")
command, but the same HTTP 400 error is being thrown
c
can you post the full traceback of the error? And can you confirm that both you are using prefect 0.13.2 for both the Server start and the flow registration?
e
Traceback (most recent call last): File "./qc_prefect.py", line 328, in <module> overwrite_flow.register(project_name="Pricing Flow") File "/opt/bb/lib/python3.6/site-packages/prefect/core/flow.py", line 1542, in register no_url=no_url, File "/opt/bb/lib/python3.6/site-packages/prefect/client/client.py", line 696, in register version_group_id=version_group_id, File "/opt/bb/lib/python3.6/site-packages/prefect/client/client.py", line 218, in graphql token=token, File "/opt/bb/lib/python3.6/site-packages/prefect/client/client.py", line 178, in post token=token, File "/opt/bb/lib/python3.6/site-packages/prefect/client/client.py", line 329, in _request session=session, method=method, url=url, params=params, headers=headers File "/opt/bb/lib/python3.6/site-packages/prefect/client/client.py", line 265, in _send_request response.raise_for_status() File "/opt/bb/lib/python3.6/site-packages/requests/models.py", line 941, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://localhost:4200/graphql
is the full traceback
when I run prefect version I get back 0.13.2 but I wouldn't know how to distinguish between the server's version and the registration's version
c
When you ran
prefect server start
did you have 0.13.2 installed?
e
I'm running
prefect version
right now, and it displays 0.13.2, and I'm going to run the server again and try from there
the Welcome to prefect server message is displayed
and I'm getting
graphql_1   | INFO:     172.22.0.6:46756 - "POST /graphql/ HTTP/1.1" 200 OK
these messages
but apollo_1 throws a FetchError
I really don't know what that entails but the remainder of it seems to be working fine
c
it takes some time for all the services to become healthy but if you see the Prefect Server ASCII art then you should be good. Next I’d visit the UI at localhost:8080 and confirm everything looks good there as well
e
The localhost UI works fine, and I rerun
prefect backend server
,
prefect agent start
, and I try to rerun my flow but I get the same client error
c
OK can you try setting
PREFECT__CLOUD__DIAGNOSTICS=true
as an environment variable before you register your Flow? This will show the GraphQL call your client is making (it’ll be long)
e
I put that line in my .bashrc file and I also ran
export PREFECT__CLOUD__DIAGNOSTICS=true
but nothing changed
i also added it as a windows environment variable but nothing's changed
Is there any way I could uninstall and reinstall with a previous version? This is part of a project with a deadline coming up soon and the ability to unpause from the UI was only an added benefit, but I need the ability to access the UI and for whatever reason this new version isn't allowing me to do so.
@Chris White I really appreciate the help, and I'm sorry for being so persistent, but this was beyond unexpected and the issue that's coming up doesn't really make sense, which has caused a bit of stress on my part because I have deliverables dependent on my ability to use the cloud
👍 1
the server**
n
Sure @Ethan Shenker , you can always run
pip install --force-reinstall prefect==0.12.3
e
@nicholas thank you so much, I'll let you know in a moment as to whether or not that works
👍 1
Thankfully, that resolved the issue. @nicholas, @Chris White I really appreciate the assistance through all this.
n
Glad to help @Ethan Shenker - when you're on less tight of a deadline the upgrade is well worth the trouble 😄 good luck!
c
yup glad you’re unblocked!
e
I definitely agree @nicholas - I'll likely look into it over the weekend because the ability to unpause would make part of my workflow much more simple. However, I still don't know what the root cause of the issue that had presented itself was, so I'll likely be back on here again soon! Thank you both very very much 🙂
👍 2