-
Notifications
You must be signed in to change notification settings - Fork 98
fix(commands): Skip warmup script on --dry-run #1523
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
base: main
Are you sure you want to change the base?
Changes from all commits
84f20e4
214ed9e
360d85f
2aa5613
22a0c9d
f5fad84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,15 +94,19 @@ impl RestoreCmd { | |
info!("all file contents are fine."); | ||
} | ||
|
||
if dry_run { | ||
if dry_run && config.global.dry_run_warmup { | ||
repo.warm_up(restore_infos.to_packs().into_iter())?; | ||
} else { | ||
} else if !dry_run && !config.global.dry_run_warmup { | ||
// save some memory | ||
let repo = repo.drop_data_from_index(); | ||
|
||
let ls = repo.ls(&node, &ls_opts)?; | ||
repo.restore(restore_infos, &self.opts, ls, &dest)?; | ||
println!("restore done."); | ||
} else { | ||
info!( | ||
"--dry-run is without warmup, --dry-run --dry-run-warmup also issues the warmup script." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here. Change into |
||
); | ||
} | ||
|
||
Ok(()) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ expression: output | |
[global] | ||
use-profiles = [] | ||
dry-run = false | ||
dry-run-warmup = false | ||
check-index = false | ||
no-progress = false | ||
|
||
|
@@ -19,6 +20,8 @@ run-finally = [] | |
[global.metrics-labels] | ||
|
||
[repository] | ||
repository = "/tmp/repo" | ||
password = "test" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think those come from a local |
||
no-cache = false | ||
warm-up = 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.
Nitpick: Users may not necessarily want to see this information, I'd make it a
debug!