Fixed unexpected waiting during async service deployment #2364
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2288
This PR fixes the async no-wait deployment of services, using a goroutine that will perform the installation of the service in background, even when it's using Helm hooks that are NOT going to be run asynchronously even when no-wait is specified (see the referenced ticket for more info regarding this behavior).
This mean that we should probably perform a better check of the service status.
In this PR I've also fixed the test that will check immediately the existence of the service if run without the
--wait
(because it could take a while before it exists, and before it can be deleted), and added one more test that will not wait if the--wait
is specified. In this case the creation should be synchronous, so when the API returns the service should exist.