diff --git a/doc/rfc/stovepipe/steps/process.md b/doc/rfc/stovepipe/steps/process.md index 24e9fffa9..3d9b3a852 100644 --- a/doc/rfc/stovepipe/steps/process.md +++ b/doc/rfc/stovepipe/steps/process.md @@ -60,13 +60,13 @@ Strategy and baseline are persisted on the Request and are **immutable**: a rede Validation is expensive and shares a baseline, so heads arriving while an earlier one runs `build → buildsignal → record` must not all start builds at once. -**Runtime state** lives on the Queue row; the **concurrency cap** does not — it is deployment configuration, resolved at gate-check time the same way SubmitQueue separates `storage` from `queueconfig` (see [submitqueue/extension/queueconfig/README.md](../../../../submitqueue/extension/queueconfig/README.md)): pipeline stages read mutable state from the store and read knobs like `max_concurrent` from a config `Store` (or a wiring default for MVP). Config is not written by ingest/process/record and does not need optimistic locking. +**Runtime state** lives on the Queue row; the **concurrency cap** does not — it is deployment configuration, resolved at gate-check time the same way SubmitQueue separates `storage` from `queueconfig` (see [submitqueue/extension/queueconfig/README.md](../../../../submitqueue/extension/queueconfig/README.md)): pipeline stages read mutable state from the store and read knobs like `max_concurrent` from a config `Store`. Config is not written by ingest/process/record and does not need optimistic locking. | Source | Field | Meaning | |---|---|---| | Queue row | `last_green_uri` | Bookmark `buildsignal` advances on a successful build; empty until first green. | | Queue row | `in_flight_count` | Requests past `process` and not yet terminal. `process` increments on admit; `record` (or DLQ reconciliation) decrements on terminal. | -| Queue config | `max_concurrent` | Cap on concurrent in-flight validations. **Default 1** (global wiring default for MVP; per-queue override when a Stovepipe `queueconfig` extension lands). | +| Queue config | `max_concurrent` | Cap on concurrent in-flight validations. **Default 1** in the example queue configuration file; shared defaults and per-queue overrides live under the process stage configuration. | A slot is held from admit until the build goes terminal (`process → build → buildsignal`), not just while `process` runs. It is released when the Request reaches **any** terminal state and `in_flight_count` is decremented — `buildsignal` recording the build's outcome, success *or* failure, or the DLQ reconciler forcing a terminal `failed` (see [integrity](#in_flight_count-integrity)). A build *failure* frees the slot just like a success; only a Request that never terminates keeps its slot. diff --git a/service/stovepipe/README.md b/service/stovepipe/README.md index 3aace589e..60b2ad832 100644 --- a/service/stovepipe/README.md +++ b/service/stovepipe/README.md @@ -53,6 +53,12 @@ The Stovepipe controllers live under [`stovepipe/controller/`](../../stovepipe/c | `PORT` | no | gRPC listen address | `:8083` | | `HOSTNAME` | no | Subscriber name for the queue consumers | `stovepipe-` | +## Queue and stage configuration + +The example server reads `queues.yaml` from its working directory by default; the normal and debug Docker images include [`server/queues.yaml`](server/queues.yaml). Select another complete file with `-config`. No embedded baseline or cross-file merging is involved. + +The file contains shared settings under `defaults.stages` and explicitly named `queues` with optional stage overrides. Queue names must match `MQ_TENANTS`. Invalid configuration fails startup; changes require a restart. See the [configuration provider](../../stovepipe/extension/queueconfig/README.md) for inheritance and validation rules. + ## Running ### Docker Compose (recommended) @@ -92,7 +98,7 @@ History lookup is defined by retained `request_log` rows. A request with no reta bazel build //service/stovepipe/server:stovepipe bazel build //service/stovepipe/client:stovepipe -go run ./service/stovepipe/server +go run ./service/stovepipe/server -config service/stovepipe/server/queues.yaml ``` ## Testing the Ping RPC diff --git a/service/stovepipe/server/BUILD.bazel b/service/stovepipe/server/BUILD.bazel index 8b6b60ef2..0d4484e5c 100644 --- a/service/stovepipe/server/BUILD.bazel +++ b/service/stovepipe/server/BUILD.bazel @@ -44,7 +44,8 @@ go_library( "//stovepipe/extension/fixer/noop:go_default_library", "//stovepipe/extension/projectissues/noop:go_default_library", "//stovepipe/extension/projectstatus/noop:go_default_library", - "//stovepipe/extension/queueconfig/default:go_default_library", + "//stovepipe/extension/queueconfig:go_default_library", + "//stovepipe/extension/queueconfig/yaml:go_default_library", "//stovepipe/extension/sourcecontrol:go_default_library", "//stovepipe/extension/sourcecontrol/fake:go_default_library", "//stovepipe/extension/storage:go_default_library", @@ -80,6 +81,7 @@ filegroup( testonly = True, srcs = [ "Dockerfile", + "queues.yaml", ":stovepipe_linux", ], visibility = ["//test:__subpackages__"], @@ -88,6 +90,7 @@ filegroup( go_test( name = "go_default_test", srcs = ["main_test.go"], + data = ["queues.yaml"], embed = [":go_default_library"], deps = [ "//api/base/hook:go_default_library", @@ -101,6 +104,8 @@ go_test( "//stovepipe/core/requestlog:go_default_library", "//stovepipe/entity:go_default_library", "//stovepipe/extension/buildissue/noop:go_default_library", + "//stovepipe/extension/queueconfig:go_default_library", + "//stovepipe/extension/queueconfig/yaml:go_default_library", "//stovepipe/extension/storage:go_default_library", "//stovepipe/extension/storage/mock:go_default_library", "@com_github_stretchr_testify//assert:go_default_library", diff --git a/service/stovepipe/server/Dockerfile b/service/stovepipe/server/Dockerfile index adbe1aebb..c5dff5bb1 100644 --- a/service/stovepipe/server/Dockerfile +++ b/service/stovepipe/server/Dockerfile @@ -6,6 +6,7 @@ WORKDIR /root/ # Copy pre-built Linux binary. # Built via: make build-stovepipe-linux COPY .docker-bin/stovepipe ./stovepipe +COPY service/stovepipe/server/queues.yaml ./queues.yaml EXPOSE 8080 diff --git a/service/stovepipe/server/Dockerfile.debug b/service/stovepipe/server/Dockerfile.debug index c18d53c6e..309982790 100644 --- a/service/stovepipe/server/Dockerfile.debug +++ b/service/stovepipe/server/Dockerfile.debug @@ -11,6 +11,7 @@ WORKDIR /root/ # Copy pre-built Linux debug binary. # Built via: make build-stovepipe-linux-debug COPY .docker-bin/stovepipe-debug ./stovepipe +COPY service/stovepipe/server/queues.yaml ./queues.yaml EXPOSE 8080 2345 diff --git a/service/stovepipe/server/main.go b/service/stovepipe/server/main.go index 0a9a0da0c..52a22f00a 100644 --- a/service/stovepipe/server/main.go +++ b/service/stovepipe/server/main.go @@ -18,6 +18,7 @@ import ( "context" "database/sql" "errors" + "flag" "fmt" "net" "os" @@ -66,7 +67,8 @@ import ( fixernoop "github.com/uber/submitqueue/stovepipe/extension/fixer/noop" projectissuesnoop "github.com/uber/submitqueue/stovepipe/extension/projectissues/noop" projectstatusnoop "github.com/uber/submitqueue/stovepipe/extension/projectstatus/noop" - queueconfigdefault "github.com/uber/submitqueue/stovepipe/extension/queueconfig/default" + "github.com/uber/submitqueue/stovepipe/extension/queueconfig" + queueconfigyaml "github.com/uber/submitqueue/stovepipe/extension/queueconfig/yaml" "github.com/uber/submitqueue/stovepipe/extension/sourcecontrol" sourcecontrolfake "github.com/uber/submitqueue/stovepipe/extension/sourcecontrol/fake" "github.com/uber/submitqueue/stovepipe/extension/storage" @@ -114,8 +116,10 @@ func (hookResolver) For(*basehook.HookEvent) []hookext.Hook { } func main() { + configPath := flag.String("config", "queues.yaml", "path to the Stovepipe queue configuration file") + flag.Parse() code := 0 - if err := run(); err != nil { + if err := run(*configPath); err != nil { if errors.Is(err, context.Canceled) { fmt.Println("Stovepipe server stopped by signal") @@ -131,7 +135,7 @@ func main() { os.Exit(code) } -func run() error { +func run(configPath string) error { // Set up signal handling early so retry loops can respond to SIGTERM ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) defer cancel() @@ -143,6 +147,32 @@ func run() error { } defer logger.Sync() + tenants, err := servicemq.ParseRequiredTenants(os.Getenv("MQ_TENANTS")) + if err != nil { + return fmt.Errorf("failed to configure queue subscribers: %w", err) + } + + configs, err := queueconfigyaml.NewStore(configPath) + if err != nil { + return fmt.Errorf("load queue configurations: %w", err) + } + + resolved, err := configs.List(ctx) + if err != nil { + return fmt.Errorf("list queue configurations: %w", err) + } + + names := make([]string, 0, len(resolved)) + for _, cfg := range resolved { + names = append(names, cfg.Name) + } + + if err := servicemq.ValidateTenantSetsEqual("queue configuration", names, "MQ_TENANTS", tenants); err != nil { + return fmt.Errorf("configure queue subscribers: %w", err) + } + + logger.Info("queue configurations loaded", zap.Any("queues", resolved)) + // Initialize metrics scope scope := tally.NewTestScope("stovepipe", nil) metricsStopCh := make(chan interface{}, 1) @@ -205,11 +235,6 @@ func run() error { return fmt.Errorf("failed to configure queue database pool: %w", err) } - tenants, err := servicemq.ParseRequiredTenants(os.Getenv("MQ_TENANTS")) - if err != nil { - return fmt.Errorf("failed to configure queue subscribers: %w", err) - } - mysqlQueue, err := queueMySQL.NewQueue(queueMySQL.Params{ DB: queueDB, Logger: logger, @@ -263,7 +288,20 @@ func run() error { storageFty := storageFactory{backend: store} materializer := requestlog.NewMaterializer(scope) - primaryCount, err := registerPrimaryControllers(primaryConsumer, logger.Sugar(), scope, storageFty, materializer, registry, sourceControl, brf, hookResolver{}, detectorFactory, repairExecutors) + primaryCount, err := registerPrimaryControllers( + primaryConsumer, + logger.Sugar(), + scope, + storageFty, + materializer, + configs, + registry, + sourceControl, + brf, + hookResolver{}, + detectorFactory, + repairExecutors, + ) if err != nil { return err } @@ -385,6 +423,7 @@ func registerPrimaryControllers( scope tally.Scope, store storage.Factory, materializer requestlog.Materializer, + configs queueconfig.Store, registry consumer.TopicRegistry, sourceControl sourcecontrol.Factory, brf buildrunner.Factory, @@ -399,7 +438,7 @@ func registerPrimaryControllers( scope, store, materializer, - queueconfigdefault.NewStore(), + configs, sourceControl, registry, stovepipemq.TopicKeyProcess, diff --git a/service/stovepipe/server/main_test.go b/service/stovepipe/server/main_test.go index b5d1733e4..561418787 100644 --- a/service/stovepipe/server/main_test.go +++ b/service/stovepipe/server/main_test.go @@ -33,6 +33,8 @@ import ( "github.com/uber/submitqueue/stovepipe/core/requestlog" "github.com/uber/submitqueue/stovepipe/entity" buildissuenoop "github.com/uber/submitqueue/stovepipe/extension/buildissue/noop" + "github.com/uber/submitqueue/stovepipe/extension/queueconfig" + queueconfigyaml "github.com/uber/submitqueue/stovepipe/extension/queueconfig/yaml" "github.com/uber/submitqueue/stovepipe/extension/storage" storagemock "github.com/uber/submitqueue/stovepipe/extension/storage/mock" "go.uber.org/mock/gomock" @@ -53,11 +55,25 @@ func (c *recordingConsumer) Start(context.Context) error { return nil } func (c *recordingConsumer) Stop(int64) error { return nil } +func testQueueConfigs(t *testing.T) queueconfig.Store { + t.Helper() + + configs, err := queueconfigyaml.NewStore("queues.yaml") + require.NoError(t, err) + + return configs +} + // registeredControllers runs the host's registration exactly as run() does and // returns the registry it registers against, the primary controllers, and the // DLQ controllers. func registeredControllers(t *testing.T) (consumer.TopicRegistry, []consumer.Controller, []consumer.Controller) { t.Helper() + return registeredControllersWithConfig(t, testQueueConfigs(t)) +} + +func registeredControllersWithConfig(t *testing.T, configs queueconfig.Store) (consumer.TopicRegistry, []consumer.Controller, []consumer.Controller) { + t.Helper() registry, err := newTopicRegistry(nil, "subscriber") require.NoError(t, err) @@ -67,8 +83,20 @@ func registeredControllers(t *testing.T) (consumer.TopicRegistry, []consumer.Con primary := &recordingConsumer{} deadLetter := &recordingConsumer{} - _, err = registerPrimaryControllers(primary, logger, tally.NoopScope, store, requestlog.NewMaterializer(tally.NoopScope), registry, - fakeSourceControlFactory{}, fakeBuildRunnerFactory{}, hookResolver{}, buildissuenoop.New(), noopRepairExecutorFactory{}) + _, err = registerPrimaryControllers( + primary, + logger, + tally.NoopScope, + store, + requestlog.NewMaterializer(tally.NoopScope), + configs, + registry, + fakeSourceControlFactory{}, + fakeBuildRunnerFactory{}, + hookResolver{}, + buildissuenoop.New(), + noopRepairExecutorFactory{}, + ) require.NoError(t, err) _, err = registerDLQControllers(deadLetter, logger, tally.NoopScope, store, requestlog.NewMaterializer(tally.NoopScope), registry, noopRepairExecutorFactory{}) @@ -214,9 +242,20 @@ func TestRegisteredFixControllerRetainsPerExecutorDisposition(t *testing.T) { registry, err := newTopicRegistry(queue, "subscriber") require.NoError(t, err) primary := &recordingConsumer{} - _, err = registerPrimaryControllers(primary, zaptest.NewLogger(t).Sugar(), tally.NoopScope, stores, - requestlog.NewMaterializer(tally.NoopScope), registry, fakeSourceControlFactory{}, fakeBuildRunnerFactory{}, - hookResolver{}, buildissuenoop.New(), noopRepairExecutorFactory{}) + _, err = registerPrimaryControllers( + primary, + zaptest.NewLogger(t).Sugar(), + tally.NoopScope, + stores, + requestlog.NewMaterializer(tally.NoopScope), + testQueueConfigs(t), + registry, + fakeSourceControlFactory{}, + fakeBuildRunnerFactory{}, + hookResolver{}, + buildissuenoop.New(), + noopRepairExecutorFactory{}, + ) require.NoError(t, err) var fixController consumer.Controller for _, controller := range primary.controllers { diff --git a/service/stovepipe/server/queues.yaml b/service/stovepipe/server/queues.yaml new file mode 100644 index 000000000..ad4d31daf --- /dev/null +++ b/service/stovepipe/server/queues.yaml @@ -0,0 +1,17 @@ +defaults: + stages: + process: + maxConcurrent: 1 + gateWaitDelay: 5s + buildSignal: + acceptedPollDelay: 5s + runningPollDelay: 2s + buildAnalysis: + pollDelay: 2m + issueTrack: + refreshDelay: 30s + recoveryWaitDelay: 30s +queues: + - name: monorepo/main + - name: monorepo/release + - name: monorepo/slow?buildrunner-fake=build-slow diff --git a/stovepipe/controller/process/BUILD.bazel b/stovepipe/controller/process/BUILD.bazel index 27fbe8d7d..321fce15c 100644 --- a/stovepipe/controller/process/BUILD.bazel +++ b/stovepipe/controller/process/BUILD.bazel @@ -43,7 +43,7 @@ go_test( "//stovepipe/core/requestlog:go_default_library", "//stovepipe/core/requestlog/mock:go_default_library", "//stovepipe/entity:go_default_library", - "//stovepipe/extension/queueconfig/default:go_default_library", + "//stovepipe/extension/queueconfig/mock:go_default_library", "//stovepipe/extension/sourcecontrol:go_default_library", "//stovepipe/extension/sourcecontrol/mock:go_default_library", "//stovepipe/extension/storage:go_default_library", diff --git a/stovepipe/controller/process/process.go b/stovepipe/controller/process/process.go index 10edcf83c..b39436209 100644 --- a/stovepipe/controller/process/process.go +++ b/stovepipe/controller/process/process.go @@ -229,8 +229,8 @@ func (c *Controller) coalesce(ctx context.Context, store storage.Storage, reques // admitLatestHead holds the delivery while the build-slot gate is closed; otherwise it marks the // request processing, counts its build slot, and publishes it to build. func (c *Controller) admitLatestHead(ctx context.Context, store storage.Storage, delivery consumer.Delivery, request entity.Request, queueRow entity.Queue, cfg entity.QueueConfig) error { - if queueRow.InFlightCount >= cfg.MaxConcurrent { - return c.holdForBuildSlot(ctx, delivery, request, queueRow.InFlightCount, cfg.GateWaitDelayMs) + if queueRow.InFlightCount >= cfg.Stages.Process.MaxConcurrent { + return c.holdForBuildSlot(ctx, delivery, request, queueRow.InFlightCount, cfg.Stages.Process.GateWaitDelayMs) } strategy, baseURI, err := c.deriveBuildStrategy(ctx, queueRow, request) diff --git a/stovepipe/controller/process/process_test.go b/stovepipe/controller/process/process_test.go index ef82e7b14..3fceac6e2 100644 --- a/stovepipe/controller/process/process_test.go +++ b/stovepipe/controller/process/process_test.go @@ -35,7 +35,7 @@ import ( "github.com/uber/submitqueue/stovepipe/core/requestlog" requestlogmock "github.com/uber/submitqueue/stovepipe/core/requestlog/mock" "github.com/uber/submitqueue/stovepipe/entity" - queueconfigdefault "github.com/uber/submitqueue/stovepipe/extension/queueconfig/default" + queueconfigmock "github.com/uber/submitqueue/stovepipe/extension/queueconfig/mock" "github.com/uber/submitqueue/stovepipe/extension/sourcecontrol" sourcecontrolmock "github.com/uber/submitqueue/stovepipe/extension/sourcecontrol/mock" "github.com/uber/submitqueue/stovepipe/extension/storage" @@ -104,12 +104,17 @@ func newControllerWithScope(t *testing.T, ctrl *gomock.Controller, scope tally.S }) require.NoError(t, err) + configs := queueconfigmock.NewMockStore(ctrl) + cfg := entity.QueueConfig{Name: testQueue} + cfg.Stages.Process = entity.ProcessConfig{MaxConcurrent: 1, GateWaitDelayMs: 5000} + configs.EXPECT().Get(gomock.Any(), gomock.Any()).Return(cfg, nil).AnyTimes() + c := NewController( zap.NewNop().Sugar(), scope, staticStorageFactory{store: m.store}, m.materializer, - queueconfigdefault.NewStore(), + configs, m.sourceFactory, registry, stovepipemq.TopicKeyProcess, diff --git a/stovepipe/entity/queue_config.go b/stovepipe/entity/queue_config.go index b6681cd83..05464f91e 100644 --- a/stovepipe/entity/queue_config.go +++ b/stovepipe/entity/queue_config.go @@ -1,4 +1,4 @@ -// Copyright (c) 2025 Uber Technologies, Inc. +// Copyright (c) 2026 Uber Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,16 +14,26 @@ package entity -// QueueConfig holds deployment configuration for a Stovepipe validation queue. -// Mutable runtime state (latest head, in-flight count) lives on the Queue row; -// knobs such as max_concurrent are resolved here at gate-check time. Immutable -// after load. +import "fmt" + +// QueueConfig is an immutable, resolved configuration for a validation queue. type QueueConfig struct { // Name uniquely identifies this queue within the system. - // Referenced by Request.Queue. Name string `json:"name" yaml:"name"` - // MaxConcurrent is the cap on concurrent in-flight validations for the queue. - MaxConcurrent int32 `json:"max_concurrent" yaml:"max_concurrent"` - // GateWaitDelayMs is the redelivery delay while the latest head waits for a slot. - GateWaitDelayMs int64 `json:"gate_wait_delay_ms" yaml:"gate_wait_delay_ms"` + + // Stages contains configuration grouped by pipeline stage. + Stages StageConfig `json:"stages" yaml:"stages"` +} + +// Validate checks queue identity and stage configuration constraints. +func (c QueueConfig) Validate() error { + if c.Name == "" { + return fmt.Errorf("queue name must not be empty") + } + + if err := c.Stages.Validate(); err != nil { + return fmt.Errorf("queue %q: %w", c.Name, err) + } + + return nil } diff --git a/stovepipe/entity/stage_config_test.go b/stovepipe/entity/stage_config_test.go index 0125e27c1..826c4c425 100644 --- a/stovepipe/entity/stage_config_test.go +++ b/stovepipe/entity/stage_config_test.go @@ -50,3 +50,15 @@ func TestStageConfigValidatesEveryStage(t *testing.T) { }) } } + +func TestQueueConfigValidate(t *testing.T) { + cfg := QueueConfig{Name: "known", Stages: testStageConfig()} + require.NoError(t, cfg.Validate()) + + cfg.Name = "" + require.Error(t, cfg.Validate()) + + cfg.Name = "known" + cfg.Stages.BuildAnalysis = BuildAnalysisConfig{} + require.Error(t, cfg.Validate()) +} diff --git a/stovepipe/extension/queueconfig/README.md b/stovepipe/extension/queueconfig/README.md index 40f88558d..e7e848a1d 100644 --- a/stovepipe/extension/queueconfig/README.md +++ b/stovepipe/extension/queueconfig/README.md @@ -1,17 +1,21 @@ -# Queue Config Extension +# Queue configuration -Vendor-agnostic interface for providing Stovepipe queue configurations. +Queue configuration is deployment policy, separate from mutable queue state in storage. The provider interface supplies immutable, fully resolved settings by queue name; it does not imply database persistence. Controllers obtain one configuration snapshot per delivery without knowing how it was loaded. -Pipeline stages read mutable runtime state from storage and read knobs such as `max_concurrent` from a config `Store` at call time, matching the SubmitQueue split documented in [submitqueue/extension/queueconfig/README.md](../../../submitqueue/extension/queueconfig/README.md). +## Stage ownership -## Interfaces +Configuration is grouped by stage: process, build signal, build analysis, and issue tracking. Each stage owns its resolved entity and validation. Source-independent optional overrides live in `stovepipe/core/queueconfig`, with stage-specific application helpers that copy values, convert standard durations to whole milliseconds, and replace only explicitly supplied fields. Providers can use these helpers but are not required to expose or use overrides. Aggregates compose stages rather than inspecting individual settings. -`Store` provides queue configurations by name via `Get` and `List`. See `queueconfig.go`. +The process stage owns concurrency and admission waits. The other current stage settings control build-status polling, build-issue analysis polling, and issue-tracking refresh and recovery waits. Stage configuration can contain both timing and non-timing settings. Immediate batch continuation and consumer error-retry policies remain separate. -## Entities +## YAML provider -Queue configuration entity lives in `stovepipe/entity/queue_config.go` and carries deployment knobs (`max_concurrent`, `gate_wait_delay_ms`) separate from the mutable `Queue` row. +The YAML implementation decodes the shared optional configuration types directly and retains an immutable snapshot of one file read at construction. Shared stage defaults and explicit named queues are declared in that file. Queue-specific settings override shared defaults; omitted values inherit while explicit values follow the owning stage's constraints. Only the resolved queue configurations undergo semantic validation, allowing queues to complete partial defaults. The current concurrency limits and millisecond intervals must be positive. -## Implementations +The provider rejects malformed configuration, unknown fields, duplicate keys or queue names, missing required settings, and multiple YAML documents. It serves only declared queues, returns independent values, and preserves declaration order when listing. It does not watch files, merge multiple files, or supply hardcoded operational defaults. -`default` returns the global wiring defaults for any non-empty queue name until a file- or service-backed store lands. +## Host integration + +Hosts choose and construct the provider and inject the lookup interface. The example server selects a single `queues.yaml`; e2e selects a separate file through the same path. A host using another configuration framework can return the same resolved values without adopting the YAML schema or its defaults mechanism. Messaging tenant registration remains a separate host concern. + +Adding a setting requires updating its stage's resolved value, validation, and optional input with its application logic. The YAML provider does not repeat stage schemas or field mappings. It does not require field-level logic in the lookup interface or the aggregate. diff --git a/stovepipe/extension/queueconfig/default/default.go b/stovepipe/extension/queueconfig/default/default.go deleted file mode 100644 index 5fb696710..000000000 --- a/stovepipe/extension/queueconfig/default/default.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2025 Uber Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package defaultconfig provides a queueconfig.Store that returns global wiring -// defaults for any non-empty queue name. Replace with a YAML- or service-backed -// store when per-queue overrides are needed. -package defaultconfig - -import ( - "context" - - "github.com/uber/submitqueue/stovepipe/entity" - "github.com/uber/submitqueue/stovepipe/extension/queueconfig" -) - -const ( - _defaultMaxConcurrent = 1 - _defaultGateWaitDelayMs = 5000 -) - -// Store is a queueconfig.Store that returns the same defaults for every queue. -type Store struct{} - -// NewStore returns a Store backed by global wiring defaults. -func NewStore() Store { - return Store{} -} - -// Get returns the default configuration for any non-empty queue name. -func (Store) Get(_ context.Context, name string) (entity.QueueConfig, error) { - if name == "" { - return entity.QueueConfig{}, queueconfig.ErrNotFound - } - return entity.QueueConfig{ - Name: name, - MaxConcurrent: _defaultMaxConcurrent, - GateWaitDelayMs: _defaultGateWaitDelayMs, - }, nil -} - -// List returns an empty slice; this store does not enumerate known queues. -func (Store) List(context.Context) ([]entity.QueueConfig, error) { - return nil, nil -} diff --git a/stovepipe/extension/queueconfig/default/default_test.go b/stovepipe/extension/queueconfig/default/default_test.go deleted file mode 100644 index 490ff35a7..000000000 --- a/stovepipe/extension/queueconfig/default/default_test.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2025 Uber Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package defaultconfig - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/uber/submitqueue/stovepipe/extension/queueconfig" -) - -func TestStore_Get(t *testing.T) { - store := NewStore() - - t.Run("returns defaults for named queue", func(t *testing.T) { - cfg, err := store.Get(context.Background(), "monorepo/main") - require.NoError(t, err) - assert.Equal(t, "monorepo/main", cfg.Name) - assert.Equal(t, int32(1), cfg.MaxConcurrent) - assert.Equal(t, int64(5000), cfg.GateWaitDelayMs) - }) - - t.Run("empty name is not found", func(t *testing.T) { - _, err := store.Get(context.Background(), "") - require.ErrorIs(t, err, queueconfig.ErrNotFound) - }) -} - -func TestStore_List(t *testing.T) { - store := NewStore() - - cfg, err := store.List(context.Background()) - require.NoError(t, err) - assert.Empty(t, cfg) -} diff --git a/stovepipe/extension/queueconfig/queueconfig.go b/stovepipe/extension/queueconfig/queueconfig.go index 437d9a2ba..a33cf6c75 100644 --- a/stovepipe/extension/queueconfig/queueconfig.go +++ b/stovepipe/extension/queueconfig/queueconfig.go @@ -26,10 +26,10 @@ import ( // ErrNotFound is returned when the requested queue configuration does not exist. var ErrNotFound = errors.New("queue config not found") -// Store loads and provides queue configurations. +// Store supplies validated, immutable queue configuration snapshots. // Implementations may read from YAML files, databases, remote services, etc. type Store interface { - // Get returns the configuration for a named queue. + // Get returns a fully resolved and validated configuration for a named queue. // Returns ErrNotFound if no configuration exists for the given name. Get(ctx context.Context, name string) (entity.QueueConfig, error) diff --git a/stovepipe/extension/queueconfig/default/BUILD.bazel b/stovepipe/extension/queueconfig/yaml/BUILD.bazel similarity index 77% rename from stovepipe/extension/queueconfig/default/BUILD.bazel rename to stovepipe/extension/queueconfig/yaml/BUILD.bazel index f2c8fc3dc..30fab10f2 100644 --- a/stovepipe/extension/queueconfig/default/BUILD.bazel +++ b/stovepipe/extension/queueconfig/yaml/BUILD.bazel @@ -2,18 +2,20 @@ load("@rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", - srcs = ["default.go"], - importpath = "github.com/uber/submitqueue/stovepipe/extension/queueconfig/default", + srcs = ["yaml.go"], + importpath = "github.com/uber/submitqueue/stovepipe/extension/queueconfig/yaml", visibility = ["//visibility:public"], deps = [ + "//stovepipe/core/queueconfig:go_default_library", "//stovepipe/entity:go_default_library", "//stovepipe/extension/queueconfig:go_default_library", + "@in_gopkg_yaml_v3//:go_default_library", ], ) go_test( name = "go_default_test", - srcs = ["default_test.go"], + srcs = ["yaml_test.go"], embed = [":go_default_library"], deps = [ "//stovepipe/extension/queueconfig:go_default_library", diff --git a/stovepipe/extension/queueconfig/yaml/yaml.go b/stovepipe/extension/queueconfig/yaml/yaml.go new file mode 100644 index 000000000..175c6592c --- /dev/null +++ b/stovepipe/extension/queueconfig/yaml/yaml.go @@ -0,0 +1,154 @@ +// Copyright (c) 2026 Uber Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package yaml provides a startup snapshot of one queue configuration file. +// Shared defaults and per-queue overrides are resolved before validation. +package yaml + +import ( + "context" + "fmt" + "io" + "os" + + configlayer "github.com/uber/submitqueue/stovepipe/core/queueconfig" + "github.com/uber/submitqueue/stovepipe/entity" + "github.com/uber/submitqueue/stovepipe/extension/queueconfig" + yamlv3 "gopkg.in/yaml.v3" +) + +type document struct { + Defaults stageSection `yaml:"defaults"` + Queues []queueSettings `yaml:"queues"` +} + +type stageSection struct { + Stages configlayer.Overrides `yaml:"stages"` +} + +type queueSettings struct { + Name string `yaml:"name"` + stageSection `yaml:",inline"` +} + +// Store holds immutable, resolved settings for explicitly declared queues. +// Get and List return independent values and are safe for concurrent use. +type Store struct { + byName map[string]entity.QueueConfig + all []entity.QueueConfig +} + +var _ queueconfig.Store = Store{} + +// NewStore reads exactly one file at startup; the file is not watched or layered +// over an implicit baseline. Invalid configuration prevents construction. +func NewStore(path string) (Store, error) { + file, err := os.Open(path) + if err != nil { + return Store{}, fmt.Errorf("open queue configuration %q: %w", path, err) + } + defer file.Close() + + cfg, err := decodeDocument(file) + if err != nil { + return Store{}, fmt.Errorf("decode queue configuration %q: %w", path, err) + } + + store, err := resolveQueueConfigs(cfg) + if err != nil { + return Store{}, fmt.Errorf("resolve queue configuration %q: %w", path, err) + } + + return store, nil +} + +func decodeDocument(reader io.Reader) (document, error) { + decoder := yamlv3.NewDecoder(reader) + decoder.KnownFields(true) + + var cfg document + if err := decoder.Decode(&cfg); err != nil { + return document{}, err + } + + var extra any + if err := decoder.Decode(&extra); err != io.EOF { + if err != nil { + return document{}, err + } + + return document{}, fmt.Errorf("configuration must contain exactly one YAML document") + } + + return cfg, nil +} + +func resolveQueueConfigs(cfg document) (Store, error) { + base, err := cfg.Defaults.Stages.Apply(entity.StageConfig{}) + if err != nil { + return Store{}, fmt.Errorf("defaults: %w", err) + } + + if len(cfg.Queues) == 0 { + return Store{}, fmt.Errorf("configuration must declare at least one queue") + } + + store := Store{ + byName: make(map[string]entity.QueueConfig, len(cfg.Queues)), + all: make([]entity.QueueConfig, 0, len(cfg.Queues)), + } + + for _, settings := range cfg.Queues { + if _, exists := store.byName[settings.Name]; exists { + return Store{}, fmt.Errorf("duplicate queue %q", settings.Name) + } + + stages, err := settings.Stages.Apply(base) + if err != nil { + return Store{}, fmt.Errorf("queue %q: %w", settings.Name, err) + } + + resolved := entity.QueueConfig{ + Name: settings.Name, + Stages: stages, + } + + if err := resolved.Validate(); err != nil { + return Store{}, err + } + + store.byName[resolved.Name] = resolved + store.all = append(store.all, resolved) + } + + return store, nil +} + +// Get returns ErrNotFound for queues not declared in the file. +func (s Store) Get(_ context.Context, name string) (entity.QueueConfig, error) { + cfg, ok := s.byName[name] + if !ok { + return entity.QueueConfig{}, queueconfig.ErrNotFound + } + + return cfg, nil +} + +// List returns independent values in declaration order. +func (s Store) List(context.Context) ([]entity.QueueConfig, error) { + configs := make([]entity.QueueConfig, len(s.all)) + copy(configs, s.all) + + return configs, nil +} diff --git a/stovepipe/extension/queueconfig/yaml/yaml_test.go b/stovepipe/extension/queueconfig/yaml/yaml_test.go new file mode 100644 index 000000000..17f59a214 --- /dev/null +++ b/stovepipe/extension/queueconfig/yaml/yaml_test.go @@ -0,0 +1,208 @@ +// Copyright (c) 2026 Uber Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package yaml + +import ( + "context" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/uber/submitqueue/stovepipe/extension/queueconfig" +) + +const testDefaults = `defaults: + stages: + process: + maxConcurrent: 3 + gateWaitDelay: 123ms + buildSignal: + acceptedPollDelay: 234ms + runningPollDelay: 345ms + buildAnalysis: + pollDelay: 456ms + issueTrack: + refreshDelay: 567ms + recoveryWaitDelay: 678ms +` + +func writeTestConfig(t *testing.T, input string) string { + t.Helper() + + path := filepath.Join(t.TempDir(), "queues.yaml") + require.NoError(t, os.WriteFile(path, []byte(input), 0600)) + return path +} + +func TestStageAndQueueOverrides(t *testing.T) { + store, err := NewStore(writeTestConfig(t, testDefaults+`queues: + - name: special + stages: + process: + maxConcurrent: 4 + buildAnalysis: + pollDelay: 2s + - name: ordinary +`)) + require.NoError(t, err) + + ordinary, err := store.Get(context.Background(), "ordinary") + require.NoError(t, err) + + special, err := store.Get(context.Background(), "special") + require.NoError(t, err) + + assert.Equal(t, int32(3), ordinary.Stages.Process.MaxConcurrent) + assert.Equal(t, int64(123), ordinary.Stages.Process.GateWaitDelayMs) + assert.Equal(t, int64(234), ordinary.Stages.BuildSignal.AcceptedPollDelayMs) + assert.Equal(t, int64(345), ordinary.Stages.BuildSignal.RunningPollDelayMs) + assert.Equal(t, int64(456), ordinary.Stages.BuildAnalysis.PollDelayMs) + assert.Equal(t, int64(567), ordinary.Stages.IssueTrack.RefreshDelayMs) + assert.Equal(t, int64(678), ordinary.Stages.IssueTrack.RecoveryWaitDelayMs) + + assert.Equal(t, int32(4), special.Stages.Process.MaxConcurrent) + assert.Equal(t, ordinary.Stages.Process.GateWaitDelayMs, special.Stages.Process.GateWaitDelayMs) + assert.Equal(t, int64(2000), special.Stages.BuildAnalysis.PollDelayMs) + assert.Equal(t, ordinary.Stages.BuildSignal, special.Stages.BuildSignal) + assert.Equal(t, ordinary.Stages.IssueTrack, special.Stages.IssueTrack) +} + +func TestValidationUsesResolvedQueueSettings(t *testing.T) { + for _, tt := range []struct { + name string + input string + }{ + { + name: "queue completes partial defaults", + input: strings.Replace(testDefaults, " pollDelay: 456ms\n", "", 1) + `queues: + - name: known + stages: + buildAnalysis: + pollDelay: 2s +`, + }, + { + name: "queue overrides invalid default", + input: strings.Replace(testDefaults, "pollDelay: 456ms", "pollDelay: 0s", 1) + `queues: + - name: known + stages: + buildAnalysis: + pollDelay: 2s +`, + }, + { + name: "complete queue does not need defaults", + input: "queues:\n - name: known\n " + strings.ReplaceAll(strings.TrimPrefix(testDefaults, "defaults:\n"), "\n", "\n "), + }, + } { + t.Run(tt.name, func(t *testing.T) { + store, err := NewStore(writeTestConfig(t, tt.input)) + require.NoError(t, err) + + cfg, err := store.Get(context.Background(), "known") + require.NoError(t, err) + require.NoError(t, cfg.Validate()) + }) + } +} + +func TestRejectsInvalidConfiguration(t *testing.T) { + valid := testDefaults + "queues:\n - name: known\n" + + for _, tt := range []struct { + name string + input string + }{ + {"empty", ""}, + {"empty document", "{}"}, + {"missing queues", testDefaults}, + {"empty queues", testDefaults + "queues: []"}, + {"missing settings", "queues: [{name: known}]"}, + {"unknown section", valid + "default: {}"}, + {"unknown defaults field", strings.Replace(valid, " stages:", " stagez:", 1)}, + {"unknown stage", strings.Replace(valid, " process:", " unknown:", 1)}, + {"unknown process field", strings.Replace(valid, "maxConcurrent:", "maxConcurent:", 1)}, + {"unknown signal field", strings.Replace(valid, "acceptedPollDelay:", "pollDelay:", 1)}, + {"unknown analysis field", strings.Replace(valid, "pollDelay:", "polDelay:", 1)}, + {"unknown tracking field", strings.Replace(valid, "refreshDelay:", "pollDelay:", 1)}, + {"unknown queue field", valid + " stagez: {}"}, + {"unknown queue stage", valid + " stages: {unknown: {}}"}, + {"duplicate key", strings.Replace(valid, "maxConcurrent: 3", "maxConcurrent: 3\n maxConcurrent: 4", 1)}, + {"duplicate queue", valid + " - name: known\n"}, + {"empty name", strings.Replace(valid, "name: known", "name: ''", 1)}, + {"missing name", testDefaults + "queues: [{}]"}, + {"zero concurrency", strings.Replace(valid, "maxConcurrent: 3", "maxConcurrent: 0", 1)}, + {"zero wait", strings.Replace(valid, "pollDelay: 456ms", "pollDelay: 0s", 1)}, + {"negative wait", strings.Replace(valid, "refreshDelay: 567ms", "refreshDelay: -1s", 1)}, + {"invalid duration", strings.Replace(valid, "gateWaitDelay: 123ms", "gateWaitDelay: soon", 1)}, + {"submillisecond", strings.Replace(valid, "acceptedPollDelay: 234ms", "acceptedPollDelay: 1us", 1)}, + {"fractional millisecond", strings.Replace(valid, "recoveryWaitDelay: 678ms", "recoveryWaitDelay: 1500us", 1)}, + {"invalid queue override", valid + " stages: {process: {gateWaitDelay: 0s}}"}, + {"incomplete sibling queue", strings.Replace(testDefaults, " pollDelay: 456ms\n", "", 1) + `queues: + - name: complete + stages: {buildAnalysis: {pollDelay: 1s}} + - name: incomplete +`}, + {"second document", valid + "---\n{}"}, + {"malformed second document", valid + "---\n["}, + } { + t.Run(tt.name, func(t *testing.T) { + _, err := NewStore(writeTestConfig(t, tt.input)) + require.Error(t, err) + }) + } +} + +func TestStoreSnapshotAndIsolation(t *testing.T) { + ctx := context.Background() + path := writeTestConfig(t, testDefaults+"queues: [{name: second}, {name: first}]") + store, err := NewStore(path) + require.NoError(t, err) + + want, err := store.Get(ctx, "second") + require.NoError(t, err) + + require.NoError(t, os.WriteFile(path, []byte("invalid replacement"), 0600)) + + got := want + got.Stages.Process.MaxConcurrent = 99 + + listed, err := store.List(ctx) + require.NoError(t, err) + require.Len(t, listed, 2) + assert.Equal(t, []string{"second", "first"}, []string{listed[0].Name, listed[1].Name}) + listed[0] = got + + again, err := store.Get(ctx, "second") + require.NoError(t, err) + assert.Equal(t, want, again) + + listedAgain, err := store.List(ctx) + require.NoError(t, err) + assert.Equal(t, want, listedAgain[0]) + + for _, name := range []string{"", "unknown"} { + _, err := store.Get(ctx, name) + require.ErrorIs(t, err, queueconfig.ErrNotFound) + } +} + +func TestMissingFileFails(t *testing.T) { + _, err := NewStore(filepath.Join(t.TempDir(), "missing")) + require.ErrorIs(t, err, os.ErrNotExist) +} diff --git a/test/e2e/stovepipe/BUILD.bazel b/test/e2e/stovepipe/BUILD.bazel index 3c50b0508..da329ba8f 100644 --- a/test/e2e/stovepipe/BUILD.bazel +++ b/test/e2e/stovepipe/BUILD.bazel @@ -16,6 +16,8 @@ go_test( "suite_test.go", ], data = [ + "docker-compose.e2e.yml", + "queues.yaml", "//platform/extension/counter/mysql/schema", "//platform/extension/messagequeue/mysql/schema", "//service/stovepipe:docker-compose.yml", diff --git a/test/e2e/stovepipe/docker-compose.e2e.yml b/test/e2e/stovepipe/docker-compose.e2e.yml new file mode 100644 index 000000000..bc8d59501 --- /dev/null +++ b/test/e2e/stovepipe/docker-compose.e2e.yml @@ -0,0 +1,8 @@ +services: + stovepipe-service: + command: ["./stovepipe", "-config", "/etc/stovepipe/queues.yaml"] + volumes: + - type: bind + source: ${REPO_ROOT}/test/e2e/stovepipe/queues.yaml + target: /etc/stovepipe/queues.yaml + read_only: true diff --git a/test/e2e/stovepipe/queues.yaml b/test/e2e/stovepipe/queues.yaml new file mode 100644 index 000000000..06adb7e30 --- /dev/null +++ b/test/e2e/stovepipe/queues.yaml @@ -0,0 +1,30 @@ +defaults: + stages: + process: + maxConcurrent: 1 + gateWaitDelay: 5s + buildSignal: + acceptedPollDelay: 5s + runningPollDelay: 2s + buildAnalysis: + pollDelay: 2m + issueTrack: + refreshDelay: 30s + recoveryWaitDelay: 30s +queues: + - name: monorepo/main + - name: monorepo/release + - name: monorepo/slow?buildrunner-fake=build-slow + - name: e2e-stovepipe/list-pagination + - name: e2e-stovepipe/list-time-bounds + - name: e2e-stovepipe/list-primary + - name: e2e-stovepipe/list-other + - name: e2e-stovepipe/list-validation + - name: e2e-stovepipe/queue-state + - name: e2e-stovepipe/issue-tracking + - name: e2e-stovepipe/issue-tracking-dlq + - name: e2e-stovepipe/open-issues + - name: e2e-stovepipe/request-issues + - name: e2e-stovepipe/project-issues + - name: e2e-stovepipe/project-analysis + - name: e2e-stovepipe/project-analysis-dlq diff --git a/test/e2e/stovepipe/suite_test.go b/test/e2e/stovepipe/suite_test.go index 09f8aa8bc..be87dd328 100644 --- a/test/e2e/stovepipe/suite_test.go +++ b/test/e2e/stovepipe/suite_test.go @@ -71,11 +71,20 @@ func (s *StovepipeE2ESuite) SetupSuite() { s.log.Logf("Starting Stovepipe e2e test suite using docker-compose") composeFile := testutil.Runfile("service/stovepipe/docker-compose.yml") - s.stack = testutil.NewComposeStack(t, s.log, s.ctx, composeFile, "e2e-stovepipe", + s.stack = testutil.NewComposeStack( + t, + s.log, + s.ctx, + composeFile, + "e2e-stovepipe", + testutil.WithOverlay(testutil.Runfile("test/e2e/stovepipe/docker-compose.e2e.yml")), testutil.WithBuildContext(map[string]string{ - ".docker-bin/stovepipe": "service/stovepipe/server/stovepipe_linux", - "service/stovepipe/server/Dockerfile": "service/stovepipe/server/Dockerfile", - })) + ".docker-bin/stovepipe": "service/stovepipe/server/stovepipe_linux", + "service/stovepipe/server/Dockerfile": "service/stovepipe/server/Dockerfile", + "service/stovepipe/server/queues.yaml": "service/stovepipe/server/queues.yaml", + "test/e2e/stovepipe/queues.yaml": "test/e2e/stovepipe/queues.yaml", + }), + ) err := s.stack.Up("mysql-app", "mysql-queue") require.NoError(t, err, "failed to start compose stack") diff --git a/test/integration/stovepipe/suite_test.go b/test/integration/stovepipe/suite_test.go index 3a9084921..974224fb4 100644 --- a/test/integration/stovepipe/suite_test.go +++ b/test/integration/stovepipe/suite_test.go @@ -73,8 +73,9 @@ func (s *StovepipeIntegrationSuite) SetupSuite() { composeFile := testutil.Runfile("service/stovepipe/docker-compose.yml") s.stack = testutil.NewComposeStack(t, s.log, s.ctx, composeFile, "svc-stovepipe", testutil.WithBuildContext(map[string]string{ - ".docker-bin/stovepipe": "service/stovepipe/server/stovepipe_linux", - "service/stovepipe/server/Dockerfile": "service/stovepipe/server/Dockerfile", + ".docker-bin/stovepipe": "service/stovepipe/server/stovepipe_linux", + "service/stovepipe/server/Dockerfile": "service/stovepipe/server/Dockerfile", + "service/stovepipe/server/queues.yaml": "service/stovepipe/server/queues.yaml", })) err := s.stack.Up("mysql-app", "mysql-queue") diff --git a/web/test/e2e/stovepipe/BUILD.bazel b/web/test/e2e/stovepipe/BUILD.bazel index 7e1c791a5..7604b24de 100644 --- a/web/test/e2e/stovepipe/BUILD.bazel +++ b/web/test/e2e/stovepipe/BUILD.bazel @@ -27,9 +27,19 @@ pkg_files( renames = {":stovepipe_linux": "stovepipe"}, ) +pkg_files( + name = "stovepipe_config", + srcs = ["queues.yaml"], + attributes = pkg_attributes(mode = "0444"), + prefix = "app", +) + pkg_tar( name = "stovepipe_layer", - srcs = [":stovepipe_binary"], + srcs = [ + ":stovepipe_binary", + ":stovepipe_config", + ], ) oci_image( diff --git a/web/test/e2e/stovepipe/queues.yaml b/web/test/e2e/stovepipe/queues.yaml new file mode 100644 index 000000000..c184ec436 --- /dev/null +++ b/web/test/e2e/stovepipe/queues.yaml @@ -0,0 +1,17 @@ +defaults: + stages: + process: + maxConcurrent: 1 + gateWaitDelay: 5s + buildSignal: + acceptedPollDelay: 5s + runningPollDelay: 2s + buildAnalysis: + pollDelay: 2m + issueTrack: + refreshDelay: 30s + recoveryWaitDelay: 30s +queues: + - name: monorepo/main + - name: web/pagination + - name: web/empty