Skip to content

Commit

Permalink
WX-1307 typo correction, added response logging for initial DELETE re…
Browse files Browse the repository at this point in the history
…sponse
  • Loading branch information
JVThomas committed Oct 12, 2023
1 parent 6d9be20 commit 9672bee
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def delete_workspace(workspace_namespace, workspace_name, max_retry=4):
# First call to initiate workspace deletion
response = requests.delete(url=delete_workspace_url, headers=headers)
handle_failed_request(response, f"Error deleting workspace {workspace_name} - {workspace_namespace}", 202)
output_message(response.text)
output_message(f"Workspace {workspace_name} - {workspace_namespace} delete request submitted")

# polling to ensure that workspace is deleted (which takes about 5ish minutes)
Expand All @@ -166,7 +167,7 @@ def delete_workspace(workspace_namespace, workspace_name, max_retry=4):
get_workspace_url = f"{rawls_url}/api/workspaces/{workspace_namespace}/{workspace_name}"
polling_response = requests.get(url=get_workspace_url, headers=headers)
polling_status_code = polling_response.status_code
output_message(f"Polling GET WWORKSPACE - {polling_status_code}")
output_message(f"Polling GET WORKSPACE - {polling_status_code}")
if polling_status_code == 200:
output_message(f"Workspace {workspace_name} - {workspace_namespace} is still active")
max_retry -= 1
Expand Down

0 comments on commit 9672bee

Please sign in to comment.