Skip to content

Port rate limiter to experimental charts#4478

Open
nikola-jokic wants to merge 2 commits intomasterfrom
nikola-jokic/workqueue-rl
Open

Port rate limiter to experimental charts#4478
nikola-jokic wants to merge 2 commits intomasterfrom
nikola-jokic/workqueue-rl

Conversation

@nikola-jokic
Copy link
Copy Markdown
Collaborator

Port rate limiter in experimental chart on top of #4451

Copilot AI review requested due to automatic review settings April 30, 2026 11:43
@github-actions
Copy link
Copy Markdown
Contributor

Hello! Thank you for your contribution.

Please review our contribution guidelines to understand the project's testing and code conventions.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ports the controller’s new --workqueue-rate-limiter configuration into the experimental Helm chart so operators can select between the default bucket limiter and the per-item typed limiter.

Changes:

  • Documented a new controller.manager.config.rateLimiter.name value in the experimental chart’s values.yaml.
  • Rendered --workqueue-rate-limiter=<name> into the controller Deployment args when configured.
  • Replaced the removed Go template test with a helm-unittest suite covering the new flag rendering behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
charts/gha-runner-scale-set-controller-experimental/values.yaml Adds documented values for configuring the workqueue rate limiter.
charts/gha-runner-scale-set-controller-experimental/templates/_controller_template.tpl Renders --workqueue-rate-limiter when controller.manager.config.rateLimiter.name is set.
charts/gha-runner-scale-set-controller-experimental/tests/template_test.go Removes Go-based chart rendering test from the experimental chart.
charts/gha-runner-scale-set-controller-experimental/tests/controller_deployment_rate_limiter_test.yaml Adds helm-unittest coverage for default omission + explicit rate limiter arg rendering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +12 to +15
content: "--workqueue-rate-limiter=bucket_rate_limiter"
- notContains:
path: spec.template.spec.containers[0].args
content: "--workqueue-rate-limiter=typed_rate_limiter"
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default-case test only asserts the args list does not contain the two specific values. This would still pass if the chart accidentally rendered something like --workqueue-rate-limiter= (or a future third value). To actually verify the flag is omitted by default, assert that no arg contains the --workqueue-rate-limiter= prefix (e.g., via a single notContains on the prefix or a regex-based assertion, depending on helm-unittest capabilities).

Suggested change
content: "--workqueue-rate-limiter=bucket_rate_limiter"
- notContains:
path: spec.template.spec.containers[0].args
content: "--workqueue-rate-limiter=typed_rate_limiter"
content: "--workqueue-rate-limiter="

Copilot uses AI. Check for mistakes.
Comment on lines +47 to +66
- it: should render both config and extraArgs in deterministic order
set:
controller:
manager:
config:
rateLimiter:
name: "bucket_rate_limiter"
container:
extraArgs:
- "--workqueue-rate-limiter=typed_rate_limiter"
release:
name: "test-arc"
namespace: "test-ns"
asserts:
- contains:
path: spec.template.spec.containers[0].args
content: "--workqueue-rate-limiter=bucket_rate_limiter"
- contains:
path: spec.template.spec.containers[0].args
content: "--workqueue-rate-limiter=typed_rate_limiter"
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test claims to verify deterministic ordering between the config-generated flag and extraArgs, but it only checks that both values are present. Since duplicate flags are order-sensitive (the last one typically wins), this test should assert the relative order in the rendered args list (or rename the test to avoid implying ordering is verified).

Copilot uses AI. Check for mistakes.
@nikola-jokic nikola-jokic force-pushed the nikola-jokic/workqueue-rl branch from 94f98df to 8958d25 Compare May 2, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants