Skip to content

Set controller UsePriorityQueue to false. Field defaults to true star…#1635

Merged
dkwon17 merged 1 commit into
devfile:mainfrom
dkwon17:priority-queue
May 22, 2026
Merged

Set controller UsePriorityQueue to false. Field defaults to true star…#1635
dkwon17 merged 1 commit into
devfile:mainfrom
dkwon17:priority-queue

Conversation

@dkwon17
Copy link
Copy Markdown
Collaborator

@dkwon17 dkwon17 commented May 22, 2026

…ting from controller-runtime v0.23.x.

What does this PR do?

Sets the UsePriorityQueue field to false when setting up a new controller. The default value was set to true since the controller-runtime v0.23.0 release: https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.23.0.

This PR reverts the value to match pre v0.23.0 functionality.

What issues does this PR fix or reference?

n/a

Is it tested? How?

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

Summary by CodeRabbit

  • Refactor
    • Standardized controller behavior across backup, cleanup, workspace routing, and workspace components by disabling priority-queue handling in their configurations. This aligns request processing strategies across controllers and clarifies reconciliation behavior, helping improve predictability of background operations without changing public APIs.

Review Change Stack

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 22, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dkwon17

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

📝 Walkthrough

Walkthrough

Four controller reconcilers now explicitly disable controller-runtime's priority queue by passing controller.Options{UsePriorityQueue: false} (using pointer helpers) into each controller's SetupWithManager, preserving existing concurrency settings.

Changes

Priority queue configuration

Layer / File(s) Summary
Disable priority queue in all controllers
controllers/backupcronjob/backupcronjob_controller.go, controllers/cleanupcronjob/cleanupcronjob_controller.go, controllers/controller/devworkspacerouting/devworkspacerouting_controller.go, controllers/workspace/devworkspace_controller.go
Add controller imports and pointer utilities, then configure each controller's WithOptions(controller.Options{UsePriorityQueue: false}) during SetupWithManager, keeping MaxConcurrentReconciles unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Four controllers hush the queue at night,
Options set so events flow light,
Pointers whisper false and calm,
Concurrency holds its steady charm,
A quiet hop, the reconcile's right.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly reflects the main change: disabling UsePriorityQueue across multiple controllers to revert to pre-v0.23.0 behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
controllers/cleanupcronjob/cleanupcronjob_controller.go (1)

2-2: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Update the copyright header year to 2026.

The file header ends at 2024, which is out of date per repository policy.

As per coding guidelines, **/*.go: "All Go source files MUST start with the copyright header: '// Copyright (c) 2019-{CURRENT_YEAR} Red Hat, Inc.' ..."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@controllers/cleanupcronjob/cleanupcronjob_controller.go` at line 2, Update
the top-of-file copyright header in cleanupcronjob_controller.go from "//
Copyright (c) 2019-2024 Red Hat, Inc." to "// Copyright (c) 2019-2026 Red Hat,
Inc." so it matches the repository policy; edit the first comment block at the
very top of the file (the file header) to change only the year range and keep
the exact comment formatting.
controllers/controller/devworkspacerouting/devworkspacerouting_controller.go (1)

2-2: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Update the copyright header year to 2026.

The header currently ends at 2025 and should be bumped to current year.

As per coding guidelines, **/*.go: "All Go source files MUST start with the copyright header: '// Copyright (c) 2019-{CURRENT_YEAR} Red Hat, Inc.' ..."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@controllers/controller/devworkspacerouting/devworkspacerouting_controller.go`
at line 2, Update the copyright header line in
controllers/controller/devworkspacerouting/devworkspacerouting_controller.go by
changing the trailing year from "2019-2025" to "2019-2026" so the file starts
with "// Copyright (c) 2019-2026 Red Hat, Inc."; locate the existing header
string "// Copyright (c) 2019-2025 Red Hat, Inc." and replace the year only,
preserving the rest of the line and file encoding.
controllers/backupcronjob/backupcronjob_controller.go (1)

2-2: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Update the copyright header year to 2026.

This file header still ends at 2025; the repository rule requires 2019-{CURRENT_YEAR}.

As per coding guidelines, **/*.go: "All Go source files MUST start with the copyright header: '// Copyright (c) 2019-{CURRENT_YEAR} Red Hat, Inc.' ..."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@controllers/backupcronjob/backupcronjob_controller.go` at line 2, Update the
file header comment in backupcronjob_controller.go so it follows the repository
rule by changing the copyright year range from "2019-2025" to "2019-2026";
locate the top-of-file comment starting with "// Copyright (c) 2019-2025 Red
Hat, Inc." and replace the end year with 2026.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@controllers/backupcronjob/backupcronjob_controller.go`:
- Line 2: Update the file header comment in backupcronjob_controller.go so it
follows the repository rule by changing the copyright year range from
"2019-2025" to "2019-2026"; locate the top-of-file comment starting with "//
Copyright (c) 2019-2025 Red Hat, Inc." and replace the end year with 2026.

In `@controllers/cleanupcronjob/cleanupcronjob_controller.go`:
- Line 2: Update the top-of-file copyright header in
cleanupcronjob_controller.go from "// Copyright (c) 2019-2024 Red Hat, Inc." to
"// Copyright (c) 2019-2026 Red Hat, Inc." so it matches the repository policy;
edit the first comment block at the very top of the file (the file header) to
change only the year range and keep the exact comment formatting.

In
`@controllers/controller/devworkspacerouting/devworkspacerouting_controller.go`:
- Line 2: Update the copyright header line in
controllers/controller/devworkspacerouting/devworkspacerouting_controller.go by
changing the trailing year from "2019-2025" to "2019-2026" so the file starts
with "// Copyright (c) 2019-2026 Red Hat, Inc."; locate the existing header
string "// Copyright (c) 2019-2025 Red Hat, Inc." and replace the year only,
preserving the rest of the line and file encoding.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b815786e-6a23-4208-9f9e-e0f4cc682043

📥 Commits

Reviewing files that changed from the base of the PR and between 842e945 and 46e24ed.

📒 Files selected for processing (4)
  • controllers/backupcronjob/backupcronjob_controller.go
  • controllers/cleanupcronjob/cleanupcronjob_controller.go
  • controllers/controller/devworkspacerouting/devworkspacerouting_controller.go
  • controllers/workspace/devworkspace_controller.go

…ting from controller-runtime v0.23.x.

Signed-off-by: dkwon17 <dakwon@redhat.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
controllers/cleanupcronjob/cleanupcronjob_controller.go (1)

2-2: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Bring the copyright header up to 2026.

Line 2 is 2019-2024, which does not satisfy the required current-year header format for changed Go files.

As per coding guidelines, "**/*.go: All Go source files MUST start with the copyright header: '// Copyright (c) 2019-{CURRENT_YEAR} Red Hat, Inc.' followed by Apache License 2.0 license text".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@controllers/cleanupcronjob/cleanupcronjob_controller.go` at line 2, Update
the copyright header in the top of the file from "2019-2024" to "2019-2026" so
the Go source begins with the required current-year header; ensure the rest of
the Apache License 2.0 header text remains unchanged at the top of
controllers/cleanupcronjob/cleanupcronjob_controller.go (i.e., adjust only the
year in the existing header).
controllers/backupcronjob/backupcronjob_controller.go (1)

2-2: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Update copyright year range to include 2026.

Line 2 still uses 2019-2025, but this file is changed in 2026 and should match the required header format.

As per coding guidelines, "**/*.go: All Go source files MUST start with the copyright header: '// Copyright (c) 2019-{CURRENT_YEAR} Red Hat, Inc.' followed by Apache License 2.0 license text".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@controllers/backupcronjob/backupcronjob_controller.go` at line 2, Update the
copyright header at the top of
controllers/backupcronjob/backupcronjob_controller.go by replacing the year
range "2019-2025" with "2019-2026" so the file starts with the required "//
Copyright (c) 2019-2026 Red Hat, Inc." header; ensure the rest of the Apache
License 2.0 header text remains unchanged.
controllers/controller/devworkspacerouting/devworkspacerouting_controller.go (1)

2-2: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Update the copyright header to the current year.

Line 2 uses 2019-2025; for 2026 changes this should be updated to match repository policy.

As per coding guidelines, "**/*.go: All Go source files MUST start with the copyright header: '// Copyright (c) 2019-{CURRENT_YEAR} Red Hat, Inc.' followed by Apache License 2.0 license text".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@controllers/controller/devworkspacerouting/devworkspacerouting_controller.go`
at line 2, Update the top-of-file copyright header comment that currently reads
'// Copyright (c) 2019-2025 Red Hat, Inc.' to use the current year, changing it
to '// Copyright (c) 2019-2026 Red Hat, Inc.' so the file's header matches
repository policy and the mandated Go source file copyright format.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@controllers/backupcronjob/backupcronjob_controller.go`:
- Line 2: Update the copyright header at the top of
controllers/backupcronjob/backupcronjob_controller.go by replacing the year
range "2019-2025" with "2019-2026" so the file starts with the required "//
Copyright (c) 2019-2026 Red Hat, Inc." header; ensure the rest of the Apache
License 2.0 header text remains unchanged.

In `@controllers/cleanupcronjob/cleanupcronjob_controller.go`:
- Line 2: Update the copyright header in the top of the file from "2019-2024" to
"2019-2026" so the Go source begins with the required current-year header;
ensure the rest of the Apache License 2.0 header text remains unchanged at the
top of controllers/cleanupcronjob/cleanupcronjob_controller.go (i.e., adjust
only the year in the existing header).

In
`@controllers/controller/devworkspacerouting/devworkspacerouting_controller.go`:
- Line 2: Update the top-of-file copyright header comment that currently reads
'// Copyright (c) 2019-2025 Red Hat, Inc.' to use the current year, changing it
to '// Copyright (c) 2019-2026 Red Hat, Inc.' so the file's header matches
repository policy and the mandated Go source file copyright format.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 637b9df8-1f71-49ea-b304-afbf3844a1e1

📥 Commits

Reviewing files that changed from the base of the PR and between 46e24ed and f4d101a.

📒 Files selected for processing (4)
  • controllers/backupcronjob/backupcronjob_controller.go
  • controllers/cleanupcronjob/cleanupcronjob_controller.go
  • controllers/controller/devworkspacerouting/devworkspacerouting_controller.go
  • controllers/workspace/devworkspace_controller.go

@dkwon17 dkwon17 merged commit 113b402 into devfile:main May 22, 2026
12 checks passed
dkwon17 added a commit that referenced this pull request May 22, 2026
…ting from controller-runtime v0.23.x. (#1635)

Signed-off-by: dkwon17 <dakwon@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant