Skip to content

Conversation

dinagraves
Copy link
Contributor

There have been many flaky tests failing on gcloud run services delete. The underlying error seems to show that the deletion call is slow, but it succeeds eventually. I am proposing running this asynchronously and trusting that it will delete.

@dinagraves dinagraves requested review from a team as code owners November 24, 2021 19:11
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 24, 2021
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Nov 24, 2021
Copy link

@ace-n ace-n left a comment

Choose a reason for hiding this comment

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

This seems OK to me, but I'll defer to @averikitsch or @grayside.

@leahecole
Copy link
Collaborator

If this is a best practice for cloud run products or for samples that use gcloud within, should we add this to the authoring guide?

@leahecole leahecole added the blunderbuss: assign Instruct blunderbuss to assign someone label Nov 29, 2021
@blunderbuss-gcf blunderbuss-gcf bot removed the blunderbuss: assign Instruct blunderbuss to assign someone label Nov 29, 2021
@parthea parthea requested a review from engelke November 30, 2021 12:12
@grayside
Copy link
Collaborator

We usually adjust timeouts and add retries per gcloud command in an effort to guarantee the process completes successfully before the next test run. Cloud Run automatically persists unspecified configuration to new deployments, so if a deletion fails, any configuration bits that weren't explicitly set for a new test will be inherited and potentially disrupt service behaviors.

This is not a problem if the Cloud Run service is named per build.

If deletions do tend to fail, there's also a risk of reaching the 1000 service and 1000 revision quota limits, which would lead to test failures.

@dinagraves
Copy link
Contributor Author

dinagraves commented Dec 1, 2021

So far, the deletion has never failed to complete after bubbling up the error. There are no lingering services in the project. Additionally, the services are named per test run.

I think any risks associated with this change are quite low and it will fix the failing tests.

@dinagraves dinagraves added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 1, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 1, 2021
@dinagraves dinagraves merged commit c0cca0b into main Dec 2, 2021
@dinagraves dinagraves deleted the gcloud-async branch December 2, 2021 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants