Skip to content

Commit 4327ada

Browse files
Merge pull request #23508 from michael-redpanda/CORE-7718-metadata
CORE-7718 metadata
2 parents 52b4423 + d20e80c commit 4327ada

20 files changed

+1325
-141
lines changed

src/v/config/configuration.cc

+9
Original file line numberDiff line numberDiff line change
@@ -3273,6 +3273,15 @@ configuration::configuration()
32733273
"Path to RPK binary",
32743274
{.needs_restart = needs_restart::no, .visibility = visibility::tunable},
32753275
"/usr/bin/rpk")
3276+
, debug_bundle_storage_dir(
3277+
*this,
3278+
"debug_bundle_storage_dir",
3279+
"Path to the debug bundle storage directory. Note: Changing this path "
3280+
"does not clean up existing debug bundles. If not set, the debug bundle "
3281+
"is stored in the Redpanda data directory specified in the redpanda.yaml "
3282+
"broker configuration file.",
3283+
{.needs_restart = needs_restart::no, .visibility = visibility::user},
3284+
std::nullopt)
32763285
, oidc_discovery_url(
32773286
*this,
32783287
"oidc_discovery_url",

src/v/config/configuration.h

+1
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ struct configuration final : public config_store {
662662
property<bool> cpu_profiler_enabled;
663663
bounded_property<std::chrono::milliseconds> cpu_profiler_sample_period_ms;
664664
property<std::filesystem::path> rpk_path;
665+
property<std::optional<std::filesystem::path>> debug_bundle_storage_dir;
665666

666667
// oidc authentication
667668
property<ss::sstring> oidc_discovery_url;

src/v/debug_bundle/BUILD

+92-7
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,76 @@ redpanda_cc_library(
44
name = "debug_bundle",
55
srcs = [
66
"debug_bundle_service.cc",
7-
"error.cc",
8-
"types.cc",
97
],
108
hdrs = [
119
"debug_bundle_service.h",
12-
"error.h",
1310
"fwd.h",
14-
"types.h",
1511
],
1612
implementation_deps = [
13+
":metadata",
14+
":utils",
15+
"//src/v/bytes:iostream",
16+
"//src/v/crypto",
1717
"//src/v/ssx:future_util",
18-
"//src/v/strings:string_switch",
1918
"//src/v/utils:external_process",
2019
"@boost//:algorithm",
20+
"@re2",
2121
],
2222
include_prefix = "debug_bundle",
2323
visibility = ["//visibility:public"],
2424
deps = [
25+
":error",
26+
":types",
2527
"//src/v/base",
2628
"//src/v/config",
2729
"//src/v/container:fragmented_vector",
30+
"//src/v/storage",
31+
"//src/v/utils:mutex",
32+
"@fmt",
33+
"@seastar",
34+
],
35+
)
36+
37+
redpanda_cc_library(
38+
name = "error",
39+
srcs = [
40+
"error.cc",
41+
],
42+
hdrs = [
43+
"error.h",
44+
],
45+
include_prefix = "debug_bundle",
46+
visibility = ["//visibility:public"],
47+
deps = [
48+
"//src/v/base",
49+
],
50+
)
51+
52+
redpanda_cc_library(
53+
name = "types",
54+
srcs = [
55+
"types.cc",
56+
],
57+
hdrs = [
58+
"types.h",
59+
],
60+
implementation_deps = [
61+
":error",
62+
"//src/v/strings:string_switch",
63+
"@re2",
64+
],
65+
include_prefix = "debug_bundle",
66+
visibility = ["//visibility:public"],
67+
deps = [
68+
"//src/v/base",
69+
"//src/v/container:fragmented_vector",
2870
"//src/v/model",
2971
"//src/v/security",
30-
"//src/v/utils:mutex",
3172
"//src/v/utils:named_type",
3273
"//src/v/utils:uuid",
3374
"@abseil-cpp//absl/container:btree",
3475
"@abseil-cpp//absl/strings",
3576
"@fmt",
36-
"@re2",
3777
"@seastar",
3878
],
3979
)
@@ -52,3 +92,48 @@ redpanda_cc_library(
5292
"//src/v/reflection:type_traits",
5393
],
5494
)
95+
96+
redpanda_cc_library(
97+
name = "metadata",
98+
hdrs = [
99+
"metadata.h",
100+
],
101+
implementation_deps = [
102+
"//src/v/serde:vector",
103+
],
104+
include_prefix = "debug_bundle",
105+
visibility = ["//src/v/debug_bundle/tests:__subpackages__"],
106+
deps = [
107+
":types",
108+
"//src/v/bytes",
109+
"//src/v/container:fragmented_vector",
110+
"//src/v/serde",
111+
"//src/v/serde:bytes",
112+
"//src/v/serde:named_type",
113+
"//src/v/serde:uuid",
114+
"//src/v/serde:variant",
115+
"//src/v/utils:uuid",
116+
"@seastar",
117+
],
118+
)
119+
120+
redpanda_cc_library(
121+
name = "utils",
122+
srcs = [
123+
"utils.cc",
124+
],
125+
hdrs = [
126+
"utils.h",
127+
],
128+
implementation_deps = [
129+
"//src/v/base",
130+
"//src/v/crypto",
131+
"//src/v/ssx:future_util",
132+
"@seastar",
133+
],
134+
include_prefix = "debug_bundle",
135+
visibility = ["//src/v/debug_bundle/tests:__subpackages__"],
136+
deps = [
137+
"//src/v/bytes",
138+
],
139+
)

src/v/debug_bundle/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ v_cc_library(
44
debug_bundle_service.cc
55
error.cc
66
types.cc
7+
utils.cc
78
DEPS
89
v::config
910
v::utils

0 commit comments

Comments
 (0)