Skip to content

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.

_, 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

@sonarqubecloud
Copy link

sonarqubecloud 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.

3 participants