From 9130bcc3c001dc4878c08e63492a689d0829423c Mon Sep 17 00:00:00 2001 From: Alex Luong Date: Wed, 8 Apr 2026 19:43:08 +0700 Subject: [PATCH 1/2] refactor: remove root-level organization_name config The OrganizationName field was only used as a fallback for generating the HTTP User-Agent header when http_user_agent wasn't set. Users should use http_user_agent directly instead. The portal-level PORTAL_ORGANIZATION_NAME is unaffected. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/pages/references/configuration.mdx | 8 ++------ internal/config/config.go | 3 +-- internal/config/destinations.go | 6 +----- internal/config/logging.go | 1 - 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/docs/pages/references/configuration.mdx b/docs/pages/references/configuration.mdx index 6453ebc5..99b863ac 100644 --- a/docs/pages/references/configuration.mdx +++ b/docs/pages/references/configuration.mdx @@ -74,7 +74,7 @@ Global configurations are provided through env variables or a YAML file. ConfigM | `GCP_PUBSUB_PROJECT` | GCP Project ID for Pub/Sub. Required if GCP Pub/Sub is the chosen MQ provider. | `nil` | Conditional | | `GCP_PUBSUB_SERVICE_ACCOUNT_CREDENTIALS` | JSON string or path to a file containing GCP service account credentials for Pub/Sub. Required if GCP Pub/Sub is the chosen MQ provider and not running in an environment with implicit credentials (e.g., GCE, GKE). | `nil` | Conditional | | `GIN_MODE` | Sets the Gin framework mode (e.g., 'debug', 'release', 'test'). See Gin documentation for details. | `release` | No | -| `HTTP_USER_AGENT` | Custom HTTP User-Agent string for outgoing webhook deliveries. If unset, a default (OrganizationName/Version) is used. | `nil` | No | +| `HTTP_USER_AGENT` | Custom HTTP User-Agent string for outgoing webhook deliveries. If unset, defaults to `Outpost/{version}`. | `nil` | No | | `IDGEN_ATTEMPT_PREFIX` | Prefix for attempt IDs, prepended with underscore (e.g., 'atm_123'). Default: empty (no prefix) | `nil` | No | | `IDGEN_DESTINATION_PREFIX` | Prefix for destination IDs, prepended with underscore (e.g., 'dst_123'). Default: empty (no prefix) | `nil` | No | | `IDGEN_EVENT_PREFIX` | Prefix for event IDs, prepended with underscore (e.g., 'evt_123'). Default: empty (no prefix) | `nil` | No | @@ -86,7 +86,6 @@ Global configurations are provided through env variables or a YAML file. ConfigM | `MAX_DESTINATIONS_PER_TENANT` | Maximum number of destinations allowed per tenant/organization. | `20` | No | | `MAX_RETRY_LIMIT` | Maximum number of retry attempts for a single event delivery before giving up. Ignored if retry_schedule is provided. | `10` | No | | `MQS_AUTO_PROVISION` | Whether Outpost should create and manage message queue infrastructure. Set to false if you manage infrastructure externally (e.g., via Terraform). Defaults to true for backward compatibility. | `nil` | No | -| `ORGANIZATION_NAME` | Name of the organization, used for display purposes and potentially in user agent strings. | `nil` | No | | `OTEL_EXPORTER` | Specifies the OTLP exporter to use for this telemetry type (e.g., 'otlp'). Typically used with environment variables like OTEL_EXPORTER_OTLP_TRACES_ENDPOINT. | `nil` | Conditional | | `OTEL_PROTOCOL` | Specifies the OTLP protocol ('grpc' or 'http') for this telemetry type. Typically used with environment variables like OTEL_EXPORTER_OTLP_TRACES_PROTOCOL. | `nil` | Conditional | | `OTEL_SERVICE_NAME` | The service name reported to OpenTelemetry. If set, OpenTelemetry will be enabled. | `nil` | No | @@ -271,7 +270,7 @@ disable_telemetry: false # Sets the Gin framework mode (e.g., 'debug', 'release', 'test'). See Gin documentation for details. gin_mode: "release" -# Custom HTTP User-Agent string for outgoing webhook deliveries. If unset, a default (OrganizationName/Version) is used. +# Custom HTTP User-Agent string for outgoing webhook deliveries. If unset, defaults to 'Outpost/{version}'. http_user_agent: "" idgen: @@ -451,9 +450,6 @@ otel: -# Name of the organization, used for display purposes and potentially in user agent strings. -organization_name: "" - portal: # Primary brand color (hex code) for theming the Outpost Portal (e.g., '#6122E7'). Also referred to as Accent Color in some contexts. brand_color: "" diff --git a/internal/config/config.go b/internal/config/config.go index 2121ec33..8100fa80 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -59,8 +59,7 @@ type Config struct { DeploymentID string `yaml:"deployment_id" env:"DEPLOYMENT_ID" desc:"Optional deployment identifier for multi-tenancy. Enables multiple deployments to share the same infrastructure while maintaining data isolation." required:"N"` AESEncryptionSecret string `yaml:"aes_encryption_secret" env:"AES_ENCRYPTION_SECRET" desc:"A 16, 24, or 32 byte secret key used for AES encryption of sensitive data at rest." required:"Y"` Topics []string `yaml:"topics" env:"TOPICS" envSeparator:"," desc:"Comma-separated list of topics that this Outpost instance should subscribe to for event processing." required:"N"` - OrganizationName string `yaml:"organization_name" env:"ORGANIZATION_NAME" desc:"Name of the organization, used for display purposes and potentially in user agent strings." required:"N"` - HTTPUserAgent string `yaml:"http_user_agent" env:"HTTP_USER_AGENT" desc:"Custom HTTP User-Agent string for outgoing webhook deliveries. If unset, a default (OrganizationName/Version) is used." required:"N"` + HTTPUserAgent string `yaml:"http_user_agent" env:"HTTP_USER_AGENT" desc:"Custom HTTP User-Agent string for outgoing webhook deliveries. If unset, defaults to 'Outpost/{version}'." required:"N"` // Infrastructure Redis RedisConfig `yaml:"redis"` diff --git a/internal/config/destinations.go b/internal/config/destinations.go index b128b328..c903c3ef 100644 --- a/internal/config/destinations.go +++ b/internal/config/destinations.go @@ -18,11 +18,7 @@ type DestinationsConfig struct { func (c *DestinationsConfig) ToConfig(cfg *Config) destregistrydefault.RegisterDefaultDestinationOptions { userAgent := cfg.HTTPUserAgent if userAgent == "" { - if cfg.OrganizationName == "" { - userAgent = fmt.Sprintf("Outpost/%s", version.Version()) - } else { - userAgent = fmt.Sprintf("%s/%s", cfg.OrganizationName, version.Version()) - } + userAgent = fmt.Sprintf("Outpost/%s", version.Version()) } return destregistrydefault.RegisterDefaultDestinationOptions{ diff --git a/internal/config/logging.go b/internal/config/logging.go index 0f406eb5..5c8fbc6c 100644 --- a/internal/config/logging.go +++ b/internal/config/logging.go @@ -34,7 +34,6 @@ func (c *Config) LogConfigurationSummary() []zap.Field { zap.Bool("audit_log", c.AuditLog), zap.String("deployment_id", c.DeploymentID), zap.Strings("topics", c.Topics), - zap.String("organization_name", c.OrganizationName), zap.String("http_user_agent", c.HTTPUserAgent), // API From 22884622de4cbe9e6efb333e7e945809cfe37968 Mon Sep 17 00:00:00 2001 From: Alex Luong Date: Wed, 8 Apr 2026 20:03:34 +0700 Subject: [PATCH 2/2] fix(e2e): enable auto-disable in basic test config The e2e basic config never set Alert.AutoDisableDestination or ConsecutiveFailureCount, so the opevents consecutive-failure test timed out waiting for a destination disable that could never happen. Co-Authored-By: Claude Opus 4.6 (1M context) --- cmd/e2e/configs/basic.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/e2e/configs/basic.go b/cmd/e2e/configs/basic.go index 4e2c4bf8..927a2fed 100644 --- a/cmd/e2e/configs/basic.go +++ b/cmd/e2e/configs/basic.go @@ -87,6 +87,8 @@ func Basic(t *testing.T, opts BasicOpts) config.Config { c.LogBatchThresholdSeconds = 0 // Immediate flush (1ms) for faster tests c.LogBatchSize = 100 c.DeploymentID = opts.DeploymentID + c.Alert.AutoDisableDestination = true + c.Alert.ConsecutiveFailureCount = 20 // Use signature templates with timestamps for mock server compatibility c.Destinations.Webhook.SignatureContentTemplate = "{{.Timestamp.Unix}}.{{.Body}}"