Skip to content

Commit

Permalink
v1.16: Add warning about deprecated snapshot archive formats (#33641)
Browse files Browse the repository at this point in the history
These values are not deprecated in v1.16, but they are deprecated in
v1.17. So, give a warning in v1.16 to operators who are running the
soon-to-be deprecated values
  • Loading branch information
steviez authored Oct 11, 2023
1 parent 4042079 commit 29abc02
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions validator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1509,8 +1509,19 @@ pub fn main() {

let archive_format = {
let archive_format_str = value_t_or_exit!(matches, "snapshot_archive_format", String);
ArchiveFormat::from_cli_arg(&archive_format_str)
.unwrap_or_else(|| panic!("Archive format not recognized: {archive_format_str}"))
let archive_format = ArchiveFormat::from_cli_arg(&archive_format_str)
.unwrap_or_else(|| panic!("Archive format not recognized: {archive_format_str}"));
match archive_format {
ArchiveFormat::TarBzip2 | ArchiveFormat::TarGzip | ArchiveFormat::Tar => {
warn!(
"The specified --snapshot-archive-format is deprecated. Update to use either \
zstd or lz4, or do not pass --snapshot-archive-format argument at all to use \
the default value of zstd. Deprecated value: {archive_format_str}"
);
}
ArchiveFormat::TarZstd | ArchiveFormat::TarLz4 => {}
}
archive_format
};

let snapshot_version =
Expand Down

0 comments on commit 29abc02

Please sign in to comment.