You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Workers currently omit SectionQueues from their service-scoped configuration. As a result, a distributed run using dag.enqueue can fail with queues are disabled in configuration even when queues are enabled (including by default).
Changes
Load SectionQueues for ServiceWorker.
Update the service comment and add regression coverage for default, explicitly enabled, and explicitly disabled queues, including a named queue with max_concurrency: 2.
For example, with the following configuration, a worker previously saw Queues.Enabled == false and no named queue settings; after the fix it sees true and the configured queue limit of 2:
The existing queue loader then runs for workers, as it already does for other execution services. The dag.enqueue executor's existing enabled check can therefore use the actual worker configuration.
Testing
Tested on upstream main at 6a72fdbe41bea54e6fa076092c16ce4d236c2dd4, Go 1.27.4, darwin/arm64.
Independent reproduction: apply only the internal/cmn/config/loader_test.go portion of this PR, then run:
go test ./internal/cmn/config -run '^TestLoad_WorkerQueueConfig$' -count=1 -v
Before the fix: exit 1; all three subtests failed. Default and explicitly enabled queues were false, and named queue configuration was nil.
After applying the loader change: exit 0; all three subtests passed.
go test ./internal/cmn/config -count=1: PASS (2.318s).
go test -race ./internal/cmn/config -count=1: PASS (10.348s).
gofmt and git diff --check: clean for both changed files.
The regression tests the service-scoped loader directly; a full distributed end-to-end run was not performed. The package tests were run directly instead of through the make test wrapper, which also builds the entire binary. Repository-wide make fmt was not run.
Related Issues
Related changes: #1467 (service-scoped configuration) and #2163 (dag.enqueue). No matching open issue or duplicate PR was found in the targeted search.
Performance
No material performance risk: the worker loads the existing queue configuration at startup; no new polling, per-run work, messages, or persisted data are introduced.
Compatibility
No new configuration keys or wire-format changes. Existing queue settings, including explicitly disabled queues, retain their meaning. This change does not alter the coordinator/worker protocol or the persisted state format; mixed-version execution was not tested.
Checklist
Code follows the project style guidelines
Self-review of the code has been performed
Tests have been added or updated as needed
Documentation has been updated as needed (service comment)
Changes have been tested locally
Summary by cubic
Fixes worker queue configuration loading so dag.enqueue works in distributed runs.
Workers previously omitted SectionQueues from their service-scoped configuration, causing dag.enqueue to fail with "queues are disabled in configuration" even when queues were enabled (including by default). The loader now includes the queues section for workers, and regression tests cover default, explicitly enabled, and explicitly disabled queues, including a named queue with max_concurrency: 2.
Written for commit 7ac1a24. Summary will update on new commits.
Summary by CodeRabbit
Configuration
Worker configurations now load queue settings, including whether queues are enabled and their configured limits. Queues are enabled by default.
No actionable comments were generated in the recent review.
Walkthrough
The worker configuration loader now requires the Queues section. Tests cover the default queue setting and YAML configurations with queues enabled or disabled.
The worker service now requires the Queues section. Tests verify that queue lookup returns the configured queue when enabled and does not return it when disabled.
Workers now load queue settings, so distributed runs that enqueue DAGs should no longer see queues as disabled. The change is small and covered by targeted regression tests, and no merge-blocking risk is apparent.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "config: load queue settings for workers" matches the main change: the loader now includes SectionQueues for ServiceWorker so worker configuration loads queue settings. It is short, specific…
Description check
The description follows the template well. It has Summary, Changes, Core change (with a short diff and file/line reference), Testing (before/after results), Related Issues, Performance, Compatibility,…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "config: load queue settings for workers" matches the main change: the loader now includes SectionQueues for ServiceWorker so worker configuration loads queue settings. It is short, specific, and follows the conventional prefix style.
Full details: Description check
Explanation
The description follows the template well. It has Summary, Changes, Core change (with a short diff and file/line reference), Testing (before/after results), Related Issues, Performance, Compatibility, and a completed Checklist. It explains the problem, the user-visible effect with YAML, and the test evidence. The Security and Out of scope sections are optional and not needed. The Related Issues section does not use the 'Closes #' form, but it gives related issue numbers and states that no matching issue exists, which is acceptable.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: d07464f6-b844-4ac5-b066-9eae9f9d663f
Commits
Reviewing files that changed from the base of the PR and between 6a72fdb and 7ac1a24.
Files selected for processing: 2
internal/cmn/config/loader.go
internal/cmn/config/loader_test.go
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
Thanks for the PR. Not sure what workflow this is trying to unblock. Did you hit queues are disabled in configuration on a real worker? If so, what DAG and setup?
Also, getting past this check doesn't look like enough. The worker builds its sub-workflow runner without a queue store or DAG-run repository (remote_handler.go:835), so dag.enqueue would just fail next with dag.enqueue requires a DAG-run repository (local.go:333).
Mind opening an issue with the repro first? That way we can agree on where enqueue from a worker should be handled before changing the config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Workers currently omit
SectionQueuesfrom their service-scoped configuration. As a result, a distributed run usingdag.enqueuecan fail withqueues are disabled in configurationeven when queues are enabled (including by default).Changes
SectionQueuesforServiceWorker.max_concurrency: 2.For example, with the following configuration, a worker previously saw
Queues.Enabled == falseand no named queue settings; after the fix it seestrueand the configured queue limit of 2:Core change
internal/cmn/config/loader.go:154adds the queue section to the worker's existing service requirements:The existing queue loader then runs for workers, as it already does for other execution services. The
dag.enqueueexecutor's existing enabled check can therefore use the actual worker configuration.Testing
Tested on upstream
mainat6a72fdbe41bea54e6fa076092c16ce4d236c2dd4, Go 1.27.4, darwin/arm64.Independent reproduction: apply only the
internal/cmn/config/loader_test.goportion of this PR, then run:go test ./internal/cmn/config -count=1: PASS (2.318s).go test -race ./internal/cmn/config -count=1: PASS (10.348s).gofmtandgit diff --check: clean for both changed files.The regression tests the service-scoped loader directly; a full distributed end-to-end run was not performed. The package tests were run directly instead of through the
make testwrapper, which also builds the entire binary. Repository-widemake fmtwas not run.Related Issues
Related changes: #1467 (service-scoped configuration) and #2163 (
dag.enqueue). No matching open issue or duplicate PR was found in the targeted search.Performance
No material performance risk: the worker loads the existing queue configuration at startup; no new polling, per-run work, messages, or persisted data are introduced.
Compatibility
No new configuration keys or wire-format changes. Existing queue settings, including explicitly disabled queues, retain their meaning. This change does not alter the coordinator/worker protocol or the persisted state format; mixed-version execution was not tested.
Checklist
Summary by cubic
Fixes worker queue configuration loading so
dag.enqueueworks in distributed runs.Workers previously omitted
SectionQueuesfrom their service-scoped configuration, causingdag.enqueueto fail with "queues are disabled in configuration" even when queues were enabled (including by default). The loader now includes the queues section for workers, and regression tests cover default, explicitly enabled, and explicitly disabled queues, including a named queue withmax_concurrency: 2.Written for commit 7ac1a24. Summary will update on new commits.
Summary by CodeRabbit