-
Notifications
You must be signed in to change notification settings - Fork 24
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
CLI | Change Vorpal vorpal-latest-version flag flow (AST-48376) #797
Conversation
Policy Management Violations
No New Or Fixed Issues Found |
if err := vorpalWrapper.HealthCheck(); err == nil { | ||
_ = vorpalWrapper.ShutDown() | ||
if !vorpalInstalled || vorpalParams.VorpalUpdateVersion { | ||
if err := checkLicense(vorpalParams.IsDefaultAgent, vorpalWrappers); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Or told us to shut down the service here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to check here for helth check before shutting down. or the shut down check that there sis engine alive bofre>?
internal/services/vorpal.go
Outdated
return err | ||
} | ||
if newInstallation && vorpalParams.VorpalUpdateVersion { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if newInstallation && vorpalParams.VorpalUpdateVersion { | |
if newInstallation { |
in a situation we check together that I removed the executable file- we also want to shut down the service
@@ -50,38 +50,38 @@ func downloadFile(downloadURLPath, filePath string) error { | |||
// InstallOrUpgrade Checks the version according to the hash file, | |||
// downloads the RealTime installation if the version is not up-to-date, | |||
// Extracts the RealTime installation according to the operating system type | |||
func InstallOrUpgrade(installationConfiguration *InstallationConfiguration) error { | |||
func InstallOrUpgrade(installationConfiguration *InstallationConfiguration) (bool, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to add an alias to the bool? like - bool doesInstalltion
internal/services/vorpal.go
Outdated
return err | ||
} | ||
if newInstallation { | ||
_ = vorpalWrapper.ShutDown() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are doing a shutdown in other flow before we are running a new one no? just need to make sure there are no bugs in this flow.
let's have tests please..we have many scenarios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is the only place we are shutting down. This pr did not change this logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we didn't have shutdown aywehre else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here for the shutdown and healthcheck
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is the only function that we use shutdowns.
For healthcheck there are more places
By submitting a PR to this repository, you agree to the terms within the Checkmarx Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.
Description
References
Testing
Checklist