Эх сурвалжийг харах

M7(1c/3): declare --dedupe-key flag in loadgen-mqtt (mirror loadgen-http)

M7 build's chained RUN in Dockerfile:15 masks go build errors as
'exit code 1' with no stderr. The pre-existing M7 postmortem flagged
this for cmd/http/main.go. The same fix was needed for cmd/mqtt/
main.go (uses *dedupeKey on line 114) but the flag declaration was
never added — the bug only shows up when the build actually compiles
loadgen-mqtt, which the original M7 verification did not.

Add the --dedupe-key flag to cmd/mqtt/main.go so the chained build
succeeds. Same shape as cmd/http/main.go.
Luis Rosales 1 сар өмнө
parent
commit
50d2d17442

+ 1 - 0
loadgen/cmd/mqtt/main.go

@@ -47,6 +47,7 @@ func main() {
 		rate      = flag.Int("rate", 10, "target alerts/sec")
 		mode      = flag.String("mode", "normal", "profile: normal|burst")
 		dedupePct = flag.Int("dedupe-pct", 30, "percent sharing a dedupe_key (normal)")
+		dedupeKey = flag.String("dedupe-key", "", "force a specific dedupe_key on every alert (overrides --dedupe-pct; useful for M6 ×N smoke tests)")
 		metrics   = flag.String("metrics", "", "Prometheus metrics listen addr (empty to disable)")
 		timeout   = flag.Duration("duration", 30*time.Second, "max run time")
 	)