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

Feat async install helm #97

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

Ashish-devtron
Copy link
Contributor

No description provided.

}
_ = impl.pubsubClient.Publish(pubsub_lib.HELM_CHART_INSTALL_STATUS_TOPIC, string(data))
}()
rel, err := helmClientObj.InstallChart(context.Background(), chartSpec)
Copy link
Contributor

Choose a reason for hiding this comment

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

it should be helmClientObj.InstallChart(ctx, chartSpec)

} else {
impl.logger.Errorw("Error in upgrade release with chart info", "err", err)
impl.logger.Debug("Upgrading release with chart info")
_, err = helmClientObj.UpgradeReleaseWithChartInfo(ctx, chartSpec)
Copy link
Contributor

Choose a reason for hiding this comment

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

as the async install/upgrade flow is flag driven, we should expose a flag in our gRPC payload (e.g: runInContext: bool) and use native context/ context.background() accordingly. The current flow will break for sync deployments as it will run with a default timeout now.

pkg/service/HelmAppService.go Show resolved Hide resolved
_, err = helmClientObj.UpgradeReleaseWithChartInfo(ctx, chartSpec)
if UpgradeErr, ok := err.(*driver.StorageDriverError); ok {
if UpgradeErr != nil {
if UpgradeErr.Err == driver.ErrReleaseNotFound {
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of driver.ErrReleaseNotFound, it should be driver.ErrNoDeployedReleases

Copy link

sonarcloud bot commented Dec 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants