Skip to content

Improve %reset status user messaging on retry timeout #652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Starting with v1.31.6, this file will contain a record of major features and updates made in each release of graph-notebook.

## Upcoming
- Added better `%reset` user messaging on status check timeout ([Link to PR](https://github.com/aws/graph-notebook/pull/652))
- Upgraded `setuptools` dependency to 70.x ([Link to PR](https://github.com/aws/graph-notebook/pull/649))

## Release 4.5.0 (July 15, 2024)
Expand Down
26 changes: 20 additions & 6 deletions src/graph_notebook/magics/graph_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1724,15 +1724,29 @@ def on_button_delete_clicked(b):
with interval_output:
print(f'checking status in {time_remaining} seconds')
time.sleep(1)
with output:
with (output):
job_status_output.clear_output()
interval_output.close()
total_status_wait = max_status_retries * poll_interval
print(result)
if interval_check_response.get("status") != 'healthy':
print(f"Could not retrieve the status of the reset operation within the allotted time of "
f"{total_status_wait} seconds. If the database is not in healthy status after at least 1 "
f"minute, please try the operation again or reboot the {message_instance}.")
final_status = interval_check_response.get("status")
if using_db:
if final_status != 'healthy':
print(f"Could not retrieve the status of the reset operation within the allotted time of "
f"{total_status_wait} seconds. If the database is not in healthy status after at "
f"least 1 minute, please try the operation again or reboot the cluster.")
print(result)
else:
if final_status == 'RESETTING':
print(f"Reset is still in progress after the allotted wait time of {total_status_wait} "
f"seconds, halting status checks. Please use %status to verify when your graph is "
f"available again.")
print(f"\nTIP: For future resets, you can use the --max-status-retries option to extend "
f"the total wait duration.")
elif final_status != 'AVAILABLE':
print(f"Graph is not in AVAILABLE or RESETTING status after the allotted time of "
f"{total_status_wait} seconds, something went wrong. "
f"Current status is {final_status}, see below for details.")
print(result)

def on_button_cancel_clicked(b):
confirm_text_hbox.close()
Expand Down
Loading