Skip to content

feat: increase resolver worker queue length from 100 to 1000#2085

Merged
frewilhelm merged 3 commits into
open-component-model:mainfrom
frewilhelm:increase-worker-queue
Mar 27, 2026
Merged

feat: increase resolver worker queue length from 100 to 1000#2085
frewilhelm merged 3 commits into
open-component-model:mainfrom
frewilhelm:increase-worker-queue

Conversation

@frewilhelm

Copy link
Copy Markdown
Contributor

Summary

  • Increases the default resolver worker queue buffer from 100 to 1000 work items
  • Updates Go binary defaults and Helm chart values to match

Motivation

With large OCM installations managing many component versions, the resolver
worker pool queue can fill up at 100 items, causing reconciliation failures
with work queue is full; cannot resolve requests for <component>. Increasing
the buffer to 1000 allows the system to absorb larger bursts of resolution
requests without dropping them, while keeping the same number of worker
goroutines (10).

Changes

  • kubernetes/controller/cmd/main.go — Update --resolver-worker-queue-length flag default from 100 → 1000
  • kubernetes/controller/internal/resolution/workerpool/workerpool.go — Update NewWorkerPool fallback default from 100 → 1000
  • kubernetes/controller/chart/values.yaml — Update Helm default from 100 → 1000
  • kubernetes/controller/chart/test-values.yaml — Update test values from 100 → 1000
  • kubernetes/controller/chart/README.md — Regenerated to reflect new default

Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
@frewilhelm frewilhelm requested a review from a team as a code owner March 27, 2026 13:14
@github-actions github-actions Bot added the kind/feature new feature, enhancement, improvement, extension label Mar 27, 2026
@coderabbitai

coderabbitai Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR increases the default worker queue length for component version resolution from 100 to 1000 across Helm chart configuration files, CLI defaults, and the underlying workerpool implementation, with a minor documentation clarification to CRD schema.

Changes

Cohort / File(s) Summary
Helm Chart Configuration
kubernetes/controller/chart/values.yaml, kubernetes/controller/chart/test-values.yaml, kubernetes/controller/chart/README.md
Updated default manager.resolver.workerQueueLength from 100 to 1000 in both production and test configurations, with documentation synchronized.
CLI and Workerpool Implementation
kubernetes/controller/cmd/main.go, kubernetes/controller/internal/resolution/workerpool/workerpool.go
Updated CLI flag resolver-worker-queue-length and NewWorkerPool default QueueSize initialization from 100 to 1000.
CRD Schema Documentation
kubernetes/controller/chart/templates/crd/resources.delivery.ocm.software.yaml
Refined spec.verificationPolicy field description to state that the controller will "log and continue" instead of "log a warning and continue" when no processor plugin is found.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

size/s

Suggested reviewers

  • fabianburth
  • jakobmoellerdev
  • morri-son

Poem

🐰✨ A queue grows long, from hundred to grand,
A thousand tasks now at hand!
Through helm, through code, the change flows clean,
The simplest diff you've ever seen! 📊

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title clearly and concisely summarizes the main change: increasing the resolver worker queue length from 100 to 1000, which is the primary objective of the changeset.
Description check ✅ Passed The pull request description provides comprehensive context about the change, including motivation (addressing queue overflow issues in large installations), a clear summary of what is being increased, and a detailed list of all modified files with specific changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the size/s Small label Mar 27, 2026
@matthiasbruns

Copy link
Copy Markdown
Contributor

I mean sure, but wouldn't it make more sense in the future to have two options?

  • workerQueueSize
  • burstWorkerQueueSize

where we allocate workerQueueSize by default and burstWorkerQueueSize only when needed - and then go down back to workerQueueSize?

This has nothing to do with this PR, just an idea for future fine-tuning

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
kubernetes/controller/internal/resolution/workerpool/workerpool.go (1)

128-130: Fallback default alignment looks good; add saturation alerting if not already present.

The fallback to 1000 matches CLI/Helm defaults and avoids mismatched behavior paths. Non-blocking suggestion: consider alert thresholds on queue depth/backlog duration now that buffering is deeper.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kubernetes/controller/internal/resolution/workerpool/workerpool.go` around
lines 128 - 130, The current fallback sets opts.QueueSize to 1000 but lacks
saturation/backlog alerts; add configurable alerting that monitors queue depth
and backlog duration using the same QueueSize value: introduce threshold
constants or config (e.g., QueueAlertThresholdPct) and emit metrics/log warnings
when current queue length (from the workerpool's work queue) exceeds threshold
or when items wait longer than a configurable maxBacklogDuration; implement this
in the workerpool run/dispatcher loop (where the queue is enqueued/dequeued) and
expose Prometheus/Golang metrics (gauge for queue_depth, counter/histogram for
backlog_time) and warning logs so operators get alerted before saturation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@kubernetes/controller/internal/resolution/workerpool/workerpool.go`:
- Around line 128-130: The current fallback sets opts.QueueSize to 1000 but
lacks saturation/backlog alerts; add configurable alerting that monitors queue
depth and backlog duration using the same QueueSize value: introduce threshold
constants or config (e.g., QueueAlertThresholdPct) and emit metrics/log warnings
when current queue length (from the workerpool's work queue) exceeds threshold
or when items wait longer than a configurable maxBacklogDuration; implement this
in the workerpool run/dispatcher loop (where the queue is enqueued/dequeued) and
expose Prometheus/Golang metrics (gauge for queue_depth, counter/histogram for
backlog_time) and warning logs so operators get alerted before saturation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 99066bae-9bbd-4671-9bc7-eb2b8b82390f

📥 Commits

Reviewing files that changed from the base of the PR and between 18fca4d and 77d9758.

📒 Files selected for processing (6)
  • kubernetes/controller/chart/README.md
  • kubernetes/controller/chart/templates/crd/resources.delivery.ocm.software.yaml
  • kubernetes/controller/chart/test-values.yaml
  • kubernetes/controller/chart/values.yaml
  • kubernetes/controller/cmd/main.go
  • kubernetes/controller/internal/resolution/workerpool/workerpool.go

Comment thread kubernetes/controller/internal/resolution/workerpool/workerpool.go
@frewilhelm frewilhelm merged commit 047711f into open-component-model:main Mar 27, 2026
44 of 48 checks passed
@frewilhelm frewilhelm deleted the increase-worker-queue branch March 30, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature new feature, enhancement, improvement, extension size/s Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants