@@ -46,6 +46,17 @@ filegroup(
4646 visibility = ["//visibility:public" ],
4747)
4848
49+ # Per-section sub-files referenced by yaml/system-probe_schema.yaml via $ref
50+ filegroup (
51+ name = "system_probe_schema_subfiles" ,
52+ srcs = [
53+ "yaml/system-probe-cws.yaml" ,
54+ "yaml/system-probe-usm.yaml" ,
55+ "yaml/system-probe_schema.yaml" ,
56+ ],
57+ visibility = ["//visibility:public" ],
58+ )
59+
4960ZSTD_ARGS = [
5061 "--no-check" , # match DataDog/zstd Go library behavior: no XXH64 frame checksum
5162 "-5" , # match DataDog/zstd: DefaultCompression = 5
@@ -66,6 +77,18 @@ run_binary(
6677 tool = "//tasks/schema:merge_schema" ,
6778)
6879
80+ # yaml/system-probe_schema.yaml uses sub-files in a similar manner as the core_schema
81+ run_binary (
82+ name = "merged_system_probe_schema" ,
83+ srcs = glob (["yaml/*.yaml" ]),
84+ outs = ["system-probe_schema.merged.yaml" ],
85+ args = [
86+ "$(execpath yaml/system-probe_schema.yaml)" ,
87+ "$@" ,
88+ ],
89+ tool = "//tasks/schema:merge_schema" ,
90+ )
91+
6992# Derive the "embedded" schema output from the merged schema: a variant trimmed
7093# of build-time-only data (documentation strings, ...) so the compressed,
7194# embedded artifact stays small and runtime RSS low. What the "embedded" output
@@ -82,14 +105,14 @@ run_binary(
82105 tool = "//tasks/schema:produce_byproduct" ,
83106)
84107
85- # system-probe is a single-file schema (no $ref), so it is processed directly.
108+ # system-probe "embedded" schema, trimmed of build-time-only data
86109run_binary (
87110 name = "embedded_system_probe_schema" ,
88- srcs = ["yaml/system-probe_schema.yaml " ],
111+ srcs = [":merged_system_probe_schema " ],
89112 outs = ["system-probe_schema.embedded.yaml" ],
90113 args = [
91114 "embedded" ,
92- "$(execpath yaml/system-probe_schema.yaml )" ,
115+ "$(execpath :merged_system_probe_schema )" ,
93116 "$@" ,
94117 ],
95118 tool = "//tasks/schema:produce_byproduct" ,
0 commit comments