Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

ace-n
Copy link

@ace-n ace-n commented Nov 10, 2022

Fixes #8465

@product-auto-label product-auto-label bot added api: run Issues related to the Cloud Run API. samples Issues that are directly related to samples. labels Nov 10, 2022
@ace-n ace-n changed the title chore(run/jobs): add retries to failing test chore(run/jobs): add retries for flaky Cloud Builds Nov 10, 2022
Ace Nassri added 2 commits November 10, 2022 11:43
@ace-n ace-n marked this pull request as ready for review November 10, 2022 19:54
@ace-n ace-n requested review from a team as code owners November 10, 2022 19:54
Copy link
Contributor

@unforced unforced left a comment

Choose a reason for hiding this comment

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

LGTM

@davidcavazos
Copy link
Contributor

Would backoff be able to handle this more cleanly? Since they're tests I don't have a strong opinion.

built = True
except Exception as e:
print(e)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Are there any cleanups that needs to be done, possibly in a finally clause?

Copy link
Author

Choose a reason for hiding this comment

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

See other thread. 🙂

]
)
destroyed = False
for x in range(3):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same 3 concerns as above! (backoff, exception, and cleanup using finally)

Copy link
Author

Choose a reason for hiding this comment

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

This step looks like the clean-up step for the previous one.

In any case - is a finally clause required if we're working with backoff?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's a bit tricky in this case actually - I'm not sure what would be the best approach if teardown were to throw errors. In other cases I'd suggest finally to clean up but fine to leave it as is here.

Copy link
Collaborator

@dandhlee dandhlee left a comment

Choose a reason for hiding this comment

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

Thank you!

@ace-n ace-n merged commit 33d89a7 into main Nov 11, 2022
@ace-n ace-n deleted the fix-8465 branch November 11, 2022 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: run Issues related to the Cloud Run API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

run.jobs.e2e_test: test_end_to_end failed
4 participants