Skip to content

Make dump commands read only #14562

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

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ydb/public/lib/ydb_cli/commands/ydb_admin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TCommandDatabase : public TClientCommandTree {
};

TCommandDatabaseDump::TCommandDatabaseDump()
: TYdbCommand("dump", {}, "Dump database into local directory")
: TYdbReadOnlyCommand("dump", {}, "Dump database into local directory")
{}

void TCommandDatabaseDump::Config(TConfig& config) {
Expand Down
2 changes: 1 addition & 1 deletion ydb/public/lib/ydb_cli/commands/ydb_admin.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TCommandAdmin : public TClientCommandTree {
virtual void Config(TConfig& config) override;
};

class TCommandDatabaseDump : public TYdbCommand {
class TCommandDatabaseDump : public TYdbReadOnlyCommand {
public:
TCommandDatabaseDump();
void Config(TConfig& config) override;
Expand Down
2 changes: 1 addition & 1 deletion ydb/public/lib/ydb_cli/commands/ydb_cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ int TCommandClusterBootstrap::Run(TConfig& config) {
}

TCommandClusterDump::TCommandClusterDump()
: TYdbCommand("dump", {}, "Dump cluster into local directory")
: TYdbReadOnlyCommand("dump", {}, "Dump cluster into local directory")
{}

void TCommandClusterDump::Config(TConfig& config) {
Expand Down
2 changes: 1 addition & 1 deletion ydb/public/lib/ydb_cli/commands/ydb_cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TCommandClusterBootstrap : public TYdbCommand {
int Run(TConfig& config) override;
};

class TCommandClusterDump : public TYdbCommand {
class TCommandClusterDump : public TYdbReadOnlyCommand {
public:
TCommandClusterDump();
void Config(TConfig& config) override;
Expand Down
1 change: 0 additions & 1 deletion ydb/tests/functional/ydb_cli/test_ydb_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,6 @@ def create_backup(cls, command, expected_files, additional_args=[]):
[
backup_bin(),
"--verbose",
"--assume-yes",
"--endpoint", "grpc://localhost:%d" % cls.cluster.nodes[1].grpc_port,
]
+ command
Expand Down
Loading