-
Notifications
You must be signed in to change notification settings - Fork 116
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
Fixing restore error as migration is skipped #8823
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Rensy Thomas <[email protected]>
β Deploy Preview for chef-automate ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
@@ -332,6 +343,7 @@ func handleBackupCommands(cmd *cobra.Command, args []string, commandString strin | |||
os.Exit(1) | |||
} | |||
if strings.Contains(cmd.CommandPath(), "restore") { | |||
deleteSkipMigrationFileIfExists(infra) |
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.
please handle error here and formatting
defer func() { | ||
if subCommand == "restore" && isSkipMigrationFileExist { | ||
writer.Body("Creating .skip_migration file") | ||
createSkipMigrationFile() |
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.
handle error for this function
@@ -42,11 +42,22 @@ either all services are up (chef-automate restart-services) | |||
or all services are down (chef-automate stop) before retrying the restore.` | |||
|
|||
var allPassedFlags string = "" | |||
var isSkipMigrationFileExist bool = false |
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.
please remove global variables. make them part of struct or function scope
π© Description: What code changed, and why?
Fixing restore issue as migration is skipped.
βοΈ Related Resources
π Definition of Done
π How to Build and Test the Change
β 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