Add debug information about event, rerun only failed jobs

This commit is contained in:
Mikhail f. Shiryaev 2022-03-28 18:43:45 +02:00
parent 093bdc2c13
commit ea7939103a
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -379,12 +379,16 @@ def check_need_to_rerun(workflow_description):
def rerun_workflow(workflow_description, token):
print("Going to rerun workflow")
_exec_post_with_retry(workflow_description.rerun_url, token)
try:
_exec_post_with_retry(f"{workflow_description.rerun_url}-failed-jobs", token)
except Exception:
_exec_post_with_retry(workflow_description.rerun_url, token)
def main(event):
token = get_token_from_aws()
event_data = json.loads(event["body"])
print("The body received:", event_data)
workflow_description = get_workflow_description_from_event(event_data)
print("Got workflow description", workflow_description)