UB: fix use of `warn` method instead of `warning` for outputing messages
requested to merge 461878-unified-backups-block-in-restore-private-method-warn-called-for-gitlab-backup-cli-output into master
What does this MR do and why?
Fix a method call in the Unified Backup codebase that was renamed to something else.
This change prevents the following stacktrace:
/opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/targets/database.rb:97:in `block in restore': private method `warn' called for Gitlab::Backup::Cli::Output:Module (NoMethodError)
Gitlab::Backup::Cli::Output.warn(
^^^^^
Did you mean? warning
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/targets/database.rb:84:in `each'
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/targets/database.rb:84:in `restore'
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/tasks/task.rb:36:in `restore!'
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/restore_executor.rb:54:in `block (2 levels) in execute_all_tasks'
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/restore_executor.rb:82:in `measure_duration'
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/restore_executor.rb:53:in `block in execute_all_tasks'
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/tasks.rb:42:in `block in build_each'
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/tasks.rb:41:in `each'
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/tasks.rb:41:in `build_each'
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/restore_executor.rb:50:in `execute_all_tasks'
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/restore_executor.rb:29:in `execute'
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/commands/restore_subcommand.rb:27:in `block in all'
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/commands/restore_subcommand.rb:50:in `measure_duration'
from /opt/gitlab/embedded/service/gitlab-rails/gems/gitlab-backup-cli/lib/gitlab/backup/cli/commands/restore_subcommand.rb:24:in `all'
...
from /opt/gitlab/embedded/service/gitlab-rails/bin/gitlab-backup-cli:14:in `<main>'
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Related to #461878 (closed)
Edited by Gabriel Mazetto