-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Adding deprecate message to backup hooks #11491
Adding deprecate message to backup hooks #11491
Conversation
Signed-off-by: Rameez Sajwani <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Rameez Sajwani <[email protected]>
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.
Looks good to me!
…ackup-hooks Signed-off-by: Manan Gupta <[email protected]>
@rsajwani I am taking the liberty to merge the release-15.0 branch since the VTOrc test names have changed and they are required now. |
go/vt/mysqlctl/backup.go
Outdated
@@ -103,7 +103,8 @@ func init() { | |||
} | |||
|
|||
func registerBackupFlags(fs *pflag.FlagSet) { | |||
fs.StringVar(&backupStorageHook, "backup_storage_hook", backupStorageHook, "if set, we send the contents of the backup files through this hook (deprecated: hooks will be disabled in v16.0. Please use ExternalCompressorCmd/ExternalDecompressorCmd instead).") | |||
fs.StringVar(&backupStorageHook, "backup_storage_hook", backupStorageHook, "if set, we send the contents of the backup files through this hook.") | |||
_ = fs.MarkDeprecated("backup_storage_hook", "--backup_storage_hook is deprecated; Consider using ExternalCompressorCmd/ExternalDecompressorCmd instead.") |
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.
For this, pflag
is going to do roughly {{f.Name}} is deprecated.{{ if .Message ne "" }} {{ .Message }}{{ endif }}
, so you should try this out and adjust accordingly.
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.
fixed it...
Flag --backup_storage_hook has been deprecated, consider using ExternalCompressorCmd/ExternalDecompressorCmd instead.
W1014 10:26:31.712856 67759 backup.go:211] checkNoDB failed, found active db vt_ks
W1014 10:26:32.067150 67759 builtinbackupengine.go:165] --backup_storage_hook is deprecated; Consider using ExternalCompressorCmd/ExternalDecompressorCmd instead.
if backupStorageHook != "" { | ||
log.Warning("--backup_storage_hook is deprecated; Consider using ExternalCompressorCmd/ExternalDecompressorCmd instead.") | ||
} |
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 is redundant
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 debated this a bit. The flag deprecation warning shows up only at tablet startup, whereas this will show up on every backup/restore, so it does have some additional value.
@@ -591,6 +591,9 @@ func (be *BuiltinBackupEngine) ExecuteRestore(ctx context.Context, params Restor | |||
if err := prepareToRestore(ctx, params.Cnf, params.Mysqld, params.Logger); err != nil { | |||
return nil, err | |||
} | |||
if bm.TransformHook != "" { | |||
log.Warning("--backup_storage_hook is deprecated; Consider using ExternalCompressorCmd/ExternalDecompressorCmd instead.") |
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 is redundant
@GuptaManan100 @rsajwani please don't merge this until the deprecation wording is fixed |
…ackup-hooks Signed-off-by: Rameez Sajwani <[email protected]>
Signed-off-by: Rameez Sajwani <[email protected]>
Signed-off-by: Rameez Sajwani <[email protected]>
Signed-off-by: Rameez Sajwani <[email protected]>
I was unable to forwardport this Pull Request to the following branches: |
* Adding deprecate message to backup hooks Signed-off-by: Rameez Sajwani <[email protected]> * adding markdeprecated Signed-off-by: Rameez Sajwani <[email protected]> * fixing deprecation message Signed-off-by: Rameez Sajwani <[email protected]> * fixing messaging Signed-off-by: Rameez Sajwani <[email protected]> * fix flag name Signed-off-by: Rameez Sajwani <[email protected]> Signed-off-by: Rameez Sajwani <[email protected]> Signed-off-by: Manan Gupta <[email protected]> Co-authored-by: Manan Gupta <[email protected]>
* Adding deprecate message to backup hooks (#11491) * Adding deprecate message to backup hooks Signed-off-by: Rameez Sajwani <[email protected]> * adding markdeprecated Signed-off-by: Rameez Sajwani <[email protected]> * fixing deprecation message Signed-off-by: Rameez Sajwani <[email protected]> * fixing messaging Signed-off-by: Rameez Sajwani <[email protected]> * fix flag name Signed-off-by: Rameez Sajwani <[email protected]> Signed-off-by: Rameez Sajwani <[email protected]> Signed-off-by: Manan Gupta <[email protected]> Co-authored-by: Manan Gupta <[email protected]> * fix release notes and summary Signed-off-by: Rameez Sajwani <[email protected]> * fixing some typos in release notes and summary Signed-off-by: Rameez Sajwani <[email protected]> * removing newline Signed-off-by: Rameez Sajwani <[email protected]> Signed-off-by: Rameez Sajwani <[email protected]> Signed-off-by: Manan Gupta <[email protected]> Co-authored-by: Manan Gupta <[email protected]>
Signed-off-by: Rameez Sajwani [email protected]
Description
This PR generates deprecation message for backup hooks. They are plan to be removed in v16.0
Related Issue(s)
Checklist
Deployment Notes