Skip to content
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

Make Echidna status checking tolerate transient failure #1856

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 2 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
16 changes: 12 additions & 4 deletions document/util/check-echidna-status.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,21 @@ def get_echidna_id(directory):
def get_current_response(echidna_id):
url = ECHIDNA_STATUS_URL + echidna_id
print(f'Fetching {url}')
response = requests.get(url, allow_redirects=True)
if response.status_code != 200:
retry = 2
while retry:
response = requests.get(url, allow_redirects=True)
if response.status_code == 200:
return response.json()

print(f'Got status code {response.status_code}, text:')
print(response.text)
raise Exception('Failed to fetch echidna result')
retry -= 1
if retry:
print('Retrying in 5s')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see where the actual sleep is happening. Maybe sleeping for real will help?



raise Exception('Failed to fetch echidna result')

return response.json()


def get_echidna_result(echidna_id):
Expand Down
Loading