Skip to content

feat: add HTTP keep-alive support to HAProxy backend configuration - #108

Merged
sarg3nt merged 2 commits into
mainfrom
add-http-keep-alive-to-haproxy
May 16, 2026
Merged

feat: add HTTP keep-alive support to HAProxy backend configuration#108
sarg3nt merged 2 commits into
mainfrom
add-http-keep-alive-to-haproxy

Conversation

@sarg3nt

@sarg3nt sarg3nt commented May 16, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 16, 2026 20:14
@github-actions github-actions Bot added the agent label May 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds optional HTTP keep-alive support to the HAProxy backend configuration generated by gearbox-agent, controlled via a new Docker Compose label and propagated through the backend config model into the HAProxy config generator.

Changes:

  • Add HTTPKeepAlive to compose.BackendConfig and parse it from haproxy.backend.http_keep_alive.
  • Emit option http-keep-alive in generated HAProxy backend stanzas when enabled.
  • Extend generator/parser tests to cover the new flag.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
gearbox-agent/internal/framework/services/haproxy/generator.go Emit option http-keep-alive for backends when the new flag is enabled.
gearbox-agent/internal/framework/services/haproxy/generator_test.go Add test coverage for keep-alive directive generation.
gearbox-agent/internal/framework/services/compose/parser.go Add HTTPKeepAlive field to backend config and parse it from compose labels.
gearbox-agent/internal/framework/services/compose/parser_test.go Extend “all labels” test to include the keep-alive label and assertion.

Comment thread gearbox-agent/internal/framework/services/haproxy/generator.go Outdated
Comment thread gearbox-agent/internal/framework/services/haproxy/generator_test.go Outdated
…test

Address Copilot review findings on PR #108:

- Only emit `option http-keep-alive` when backend.Mode == "http"; emitting
  it for tcp-mode backends produces an invalid stanza.
- Drop BackendSSL from the keep-alive test (it was generating `verify`
  with an empty value, unrelated to keep-alive). Add a separate test
  asserting the directive is suppressed for tcp-mode backends.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sarg3nt
sarg3nt merged commit 5837316 into main May 16, 2026
22 checks passed
@sarg3nt
sarg3nt deleted the add-http-keep-alive-to-haproxy branch May 16, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants