From 22fa5026381260119cde89a8b581c23084aff765 Mon Sep 17 00:00:00 2001 From: clawbot <35+clawbot@noreply.example.org> Date: Sat, 3 Oct 2026 01:39:13 +0200 Subject: [PATCH] Remove an http target's max_queue_size (closes #477) An http target's max_queue_size was stored and shown in the target list as "Max Queue Size", but nothing in the delivery engine read it, so an operator who set it expecting deliveries to be bounded got nothing. It is removed from the target, the target list and the README's target table; neither form had a field for it. Nothing checks for a leftover value. An existing database keeps its old column, which is no longer read. Model: opus-5-5 --- README.md | 1 - internal/database/model_target.go | 3 +-- internal/delivery/target_config_view.go | 7 ------- internal/delivery/target_config_view_test.go | 8 ++------ 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index bc13f49..588a927 100644 --- a/README.md +++ b/README.md @@ -1699,7 +1699,6 @@ events should be forwarded. | `active` | boolean | Whether deliveries are enabled (default: true) | | `config` | JSON text | Type-specific configuration | | `max_retries` | integer | Total delivery attempts for `http` and `slack` targets, not retries on top of the first: 0 is a single fire-and-forget attempt with no retries and no circuit breaker, and a value of N makes N attempts in all, with exponential backoff and a per-target circuit breaker. Ignored by `database` and `log` targets | -| `max_queue_size` | integer | Stored and shown on the target's detail view, but not enforced anywhere yet: nothing in the delivery engine consults it. Queue depth is set by the two fixed 10,000-entry channels | **Relations:** Belongs to Webhook. Has many Deliveries. diff --git a/internal/database/model_target.go b/internal/database/model_target.go index 43b5a4f..c10127c 100644 --- a/internal/database/model_target.go +++ b/internal/database/model_target.go @@ -31,8 +31,7 @@ type Target struct { // For HTTP targets (max_retries=0 means fire-and-forget, // >0 enables retries with backoff) - MaxRetries int `json:"maxRetries,omitempty"` - MaxQueueSize int `json:"maxQueueSize,omitempty"` + MaxRetries int `json:"maxRetries,omitempty"` // Relations. No model marshals the record it belongs to: // Webhook.Targets leads back here, and the JSON could loop. diff --git a/internal/delivery/target_config_view.go b/internal/delivery/target_config_view.go index d6e3a84..295cfb1 100644 --- a/internal/delivery/target_config_view.go +++ b/internal/delivery/target_config_view.go @@ -173,13 +173,6 @@ func httpConfigFields(t *database.Target) []ConfigField { fields = append(fields, maxRetriesField(t)) - if t.MaxQueueSize > 0 { - fields = append(fields, ConfigField{ - Label: "Max Queue Size", - Value: strconv.Itoa(t.MaxQueueSize), - }) - } - return fields } diff --git a/internal/delivery/target_config_view_test.go b/internal/delivery/target_config_view_test.go index f763d86..5f8d987 100644 --- a/internal/delivery/target_config_view_test.go +++ b/internal/delivery/target_config_view_test.go @@ -197,14 +197,12 @@ func TestNewTargetViews_Slack(t *testing.T) { } // TestNewTargetViews_SlackRetries proves a Slack target shows -// its retry count the same way an HTTP target does, and no -// queue size even when one is stored: delivery never reads it. +// its retry count the same way an HTTP target does. func TestNewTargetViews_SlackRetries(t *testing.T) { t.Parallel() target := slackTarget() target.MaxRetries = 2 - target.MaxQueueSize = 100 view := viewFor(t, target) @@ -226,8 +224,7 @@ func TestNewTargetViews_HTTP(t *testing.T) { Config: `{"url":"` + viewExampleHook + `",` + `"timeout":30,` + `"headers":{"Authorization":"Bearer sekrit"}}`, - MaxRetries: 5, - MaxQueueSize: 100, + MaxRetries: 5, }) fields := fieldMap(view.Config) @@ -239,7 +236,6 @@ func TestNewTargetViews_HTTP(t *testing.T) { "Timeout": "30s", "Headers": "1 configured", viewMaxRetries: "5", - "Max Queue Size": "100", }, fields, )