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

Fixed unexpected waiting during async service deployment #2364

Merged
merged 3 commits into from
Jun 13, 2023

Conversation

enrichman
Copy link
Member

@enrichman enrichman commented Jun 5, 2023

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.

@enrichman enrichman linked an issue Jun 5, 2023 that may be closed by this pull request
@enrichman enrichman self-assigned this Jun 5, 2023
@enrichman enrichman added the kind/bug Something isn't working label Jun 5, 2023
@enrichman enrichman added this to the v1.9.0 milestone Jun 5, 2023
@enrichman enrichman force-pushed the 2288-service-deployment-with-hooks-are-still-waiting branch from 2387a51 to 2a156b9 Compare June 7, 2023 18:00
@enrichman enrichman force-pushed the 2288-service-deployment-with-hooks-are-still-waiting branch from 2a156b9 to 8b6d949 Compare June 9, 2023 12:22
@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Patch coverage: 81.81% and project coverage change: -0.40 ⚠️

Comparison is base (90bc58f) 65.62% compared to head (04ee902) 65.22%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2364      +/-   ##
==========================================
- Coverage   65.62%   65.22%   -0.40%     
==========================================
  Files         181      181              
  Lines       15408    15413       +5     
==========================================
- Hits        10111    10053      -58     
- Misses       4152     4202      +50     
- Partials     1145     1158      +13     
Flag Coverage Δ
acceptance-api 47.71% <81.81%> (-0.12%) ⬇️
acceptance-apps 38.11% <72.72%> (+0.03%) ⬆️
acceptance-cli 61.68% <72.72%> (-0.32%) ⬇️
unittests 9.23% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/api/v1/application/running.go 23.68% <0.00%> (ø)
internal/helm/helm.go 74.49% <70.00%> (-3.64%) ⬇️
helpers/kubernetes/cluster.go 71.55% <100.00%> (ø)
internal/services/instances.go 56.80% <100.00%> (+0.14%) ⬆️

... and 12 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@enrichman enrichman marked this pull request as ready for review June 9, 2023 15:39
@enrichman enrichman requested a review from a team as a code owner June 9, 2023 15:39
@enrichman enrichman changed the title Async service deployment Fixed unexpected waiting during async service deployment Jun 9, 2023
Copy link
Contributor

@andreas-kupries andreas-kupries left a comment

Choose a reason for hiding this comment

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

lgtm

@enrichman enrichman merged commit 8a8a4a6 into main Jun 13, 2023
17 checks passed
@enrichman enrichman deleted the 2288-service-deployment-with-hooks-are-still-waiting branch June 13, 2023 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Service deployment with hooks are still waiting
2 participants