Skip to content

Validate ping mode flag, tweak log levels#3734

Merged
DrJosh9000 merged 2 commits intomainfrom
improve-auto-mode-logging
Mar 4, 2026
Merged

Validate ping mode flag, tweak log levels#3734
DrJosh9000 merged 2 commits intomainfrom
improve-auto-mode-logging

Conversation

@DrJosh9000
Copy link
Contributor

@DrJosh9000 DrJosh9000 commented Mar 4, 2026

Description

Validate that ping-mode is set to an acceptable value, and rename "ping-only" to "poll-only". ("ping-only" still accepted.)

Avoid logging an error when configured in auto ping mode, but still log an info message in case someone has selected auto mode deliberately and is expecting streaming to work.

Context

https://buildkite-corp.slack.com/archives/C07KJ0ZSNN9/p1772593581819329

Changes

  • Downgrade streaming loop internal logs to debug
  • Log at error or info level based on configured ping mode in AgentWorker.Start
  • Validate the ping-mode flag value is one of the accepted values
  • Change "ping-only" to the more descriptive "poll-only" (but canonicalise "ping-only" to "poll-only" to avoid it becoming a breaking change)

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go tool gofumpt -extra -w .)

Disclosures / Credits

A quick, entirely human-brained, PR.

@DrJosh9000 DrJosh9000 requested review from a team as code owners March 4, 2026 04:06
@DrJosh9000 DrJosh9000 force-pushed the improve-auto-mode-logging branch 3 times, most recently from 48b3a19 to 58bce84 Compare March 4, 2026 04:45
@DrJosh9000 DrJosh9000 force-pushed the improve-auto-mode-logging branch 6 times, most recently from d3a07c9 to cbfe9c4 Compare March 4, 2026 05:27
@DrJosh9000 DrJosh9000 requested review from a team and zhming0 March 4, 2026 05:35
Copy link
Contributor

@zhming0 zhming0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@DrJosh9000 DrJosh9000 force-pushed the improve-auto-mode-logging branch from cbfe9c4 to 2480514 Compare March 4, 2026 05:40
@DrJosh9000 DrJosh9000 changed the title Log unrecoverable at error level in stream-only mode, info otherwise Validate ping mode flag, tweak log levels Mar 4, 2026
@DrJosh9000 DrJosh9000 enabled auto-merge March 4, 2026 05:42
@DrJosh9000 DrJosh9000 merged commit d34f38d into main Mar 4, 2026
2 checks passed
@DrJosh9000 DrJosh9000 deleted the improve-auto-mode-logging branch March 4, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants