You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -764,8 +773,8 @@ var AgentStartCommand = cli.Command{
764
773
// API + agent behaviour
765
774
cli.StringFlag{
766
775
Name: "ping-mode",
767
-
Usage: "Selects available protocols for dispatching work to this agent. One of ping-only (default), auto (prefer streaming, but fall back to polling when necessary) or stream-only.",
768
-
Value: "ping-only",
776
+
Usage: "Selects available protocols for dispatching work to this agent. One of auto (default, prefer streaming, but fall back to polling when necessary), poll-only, or stream-only.",
777
+
Value: "auto",
769
778
EnvVar: "BUILDKITE_AGENT_PING_MODE",
770
779
},
771
780
@@ -852,6 +861,15 @@ var AgentStartCommand = cli.Command{
852
861
returnfmt.Errorf("failed to unset config from environment: %w", err)
853
862
}
854
863
864
+
if!slices.Contains(pingModes, cfg.PingMode) {
865
+
returnfmt.Errorf("invalid ping mode %q, must be one of %v", cfg.PingMode, pingModes)
866
+
}
867
+
// Calling it "ping-only" was a mistake, so canonicalise it to "poll-only"
868
+
// on the very remote chance someone is using that.
0 commit comments