Skip to content

Commit

Permalink
Merge pull request #110507 from RaduBerinde/backport23.1-110150
Browse files Browse the repository at this point in the history
release-23.1: cli: fix debug pebble commands on encrypted stores
  • Loading branch information
RaduBerinde authored Sep 15, 2023
2 parents e388dd1 + 6de6e20 commit f3210c3
Show file tree
Hide file tree
Showing 8 changed files with 390 additions and 192 deletions.
7 changes: 7 additions & 0 deletions pkg/ccl/cliccl/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ with their env type and encryption settings (if applicable).
&storeEncryptionSpecs, cliflagsccl.EnterpriseEncryption)

cli.PopulateStorageConfigHook = fillEncryptionOptionsForStore
cli.EncryptedStorePathsHook = func() []string {
var res []string
for _, spec := range storeEncryptionSpecs.Specs {
res = append(res, spec.Path)
}
return res
}
}

// fillEncryptionOptionsForStore fills the StorageConfig fields
Expand Down
5 changes: 3 additions & 2 deletions pkg/cli/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ load("//pkg/testutils/buildutil:buildutil.bzl", "disallowed_imports_test")
go_library(
name = "cli",
srcs = [
"absolute_fs.go",
"auth.go",
"auto_decrypt_fs.go",
"cert.go",
"cli.go",
"client_url.go",
Expand Down Expand Up @@ -56,7 +56,6 @@ go_library(
"start_windows.go",
"statement_bundle.go",
"statement_diag.go",
"swappable_fs.go",
"testutils.go",
"tsdump.go",
"userfile.go",
Expand Down Expand Up @@ -235,6 +234,7 @@ go_library(
"@com_github_cockroachdb_errors//hintdetail",
"@com_github_cockroachdb_errors//oserror",
"@com_github_cockroachdb_logtags//:logtags",
"@com_github_cockroachdb_pebble//:pebble",
"@com_github_cockroachdb_pebble//tool",
"@com_github_cockroachdb_pebble//vfs",
"@com_github_cockroachdb_redact//:redact",
Expand Down Expand Up @@ -305,6 +305,7 @@ go_test(
name = "cli_test",
size = "large",
srcs = [
"auto_decrypt_fs_test.go",
"cert_test.go",
"cli_debug_test.go",
"cli_test.go",
Expand Down
139 changes: 0 additions & 139 deletions pkg/cli/absolute_fs.go

This file was deleted.

Loading

0 comments on commit f3210c3

Please sign in to comment.