-
Notifications
You must be signed in to change notification settings - Fork 113
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
CHEF-727 : Version Command on Bastion #7970
Conversation
👷 Deploy Preview for chef-automate processing.
|
463fa9b
to
81635c8
Compare
A2VERSIONVERBOSE = "sudo chef-automate version -v " | ||
CSVERSIONCMD = "sudo chef-server-ctl version" | ||
OSGETINFOCURLCMD = "curl -XGET http://localhost:10144" | ||
PGGETVERSIONCURLCMD = "PGPASSWORD=%s hab pkg exec core/postgresql13 psql -U %s -h localhost -p 10145 -d postgres --dbname postgres -tAc 'SELECT version()'" |
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.
Can we have a version constant, what if the version gets changed in future, then this command will not work.
8f680ef
to
17280ce
Compare
@@ -91,8 +91,8 @@ func newDebugCmd() *cobra.Command { | |||
logLevelCmd.Flags().StringVar(&logLevelCmdFlags.endpoint, "endpoint", "", "The endpoint the service is listening on") | |||
logLevelCmd.Flags().DurationVar(&logLevelCmdFlags.connectionTimeout, "connection-timeout", 0, "Most time to wait to connect to service") | |||
|
|||
versionCmd.Flags().StringVar(&versionCmdFlags.endpoint, "endpoint", "", "The endpoint the service is listening on") | |||
versionCmd.Flags().DurationVar(&versionCmdFlags.connectionTimeout, "connection-timeout", 0, "Most time to wait to connect to service") | |||
getVersionCmd.Flags().StringVar(&versionCmdFlags.endpoint, "endpoint", "", "The endpoint the service is listening on") |
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.
The flags were being set to the wrong versionCmd object, as a result of which, endpoint and connection timeout flags were coming up in docs under chef-automate version command. Corrected this
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.
once made the suggested changes, will review the complete PR again
6517bd4
to
c926234
Compare
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.
Tested this application on HA (AWS Deployment), the commands are working fine. The error I hilighted yesterday is fixed.
APPROVING!
Signed-off-by: Shanmugapriya <shramana@progress.com>
Signed-off-by: Shanmugapriya <shramana@progress.com>
Signed-off-by: Shanmugapriya <shramana@progress.com>
Signed-off-by: Shanmugapriya <shramana@progress.com>
Signed-off-by: Shanmugapriya <shramana@progress.com>
Signed-off-by: Shanmugapriya <shramana@progress.com>
Signed-off-by: Shanmugapriya <shramana@progress.com>
Signed-off-by: Shanmugapriya <shramana@progress.com>
Signed-off-by: Shanmugapriya <shramana@progress.com>
Signed-off-by: Shanmugapriya <shramana@progress.com>
Signed-off-by: Shanmugapriya <shramana@progress.com>
4ee06fd
to
961f37c
Compare
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.
https://buildkite.com/chef/chef-automate-main-verify-private/builds/29691
Pipelines are failing because of these changes only. Please address them
Signed-off-by: Shanmugapriya <shramana@progress.com>
🔩 Description: What code changed, and why?
Added code in version.go to enable bastion execution of the command chef-automate version
⛓️ Related Resources
https://chefio.atlassian.net/browse/CHEF-727
👍 Definition of Done
chef-automate version command should run from bastion and display the nodes versions
👟 How to Build and Test the Change
checkout this branch
build components/automate-cli
use the package to test
✅ Checklist
All PRs must tick these:
With occasional exceptions, all PRs from Progress employees must tick these:
make spell
in any component directory)All PRs from Progress employees should tick these if appropriate:
Please add a note next to any checkbox above if you are NOT ticking it.
📷 Screenshots, if applicable
📷
Video Link : Click Here