Set controller UsePriorityQueue to false. Field defaults to true star…#1635
Conversation
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
📝 WalkthroughWalkthroughFour controller reconcilers now explicitly disable controller-runtime's priority queue by passing ChangesPriority queue configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 winUpdate 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 winUpdate 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 winUpdate 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
📒 Files selected for processing (4)
controllers/backupcronjob/backupcronjob_controller.gocontrollers/cleanupcronjob/cleanupcronjob_controller.gocontrollers/controller/devworkspacerouting/devworkspacerouting_controller.gocontrollers/workspace/devworkspace_controller.go
…ting from controller-runtime v0.23.x. Signed-off-by: dkwon17 <dakwon@redhat.com>
There was a problem hiding this comment.
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 winBring 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 winUpdate 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 winUpdate 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
📒 Files selected for processing (4)
controllers/backupcronjob/backupcronjob_controller.gocontrollers/cleanupcronjob/cleanupcronjob_controller.gocontrollers/controller/devworkspacerouting/devworkspacerouting_controller.gocontrollers/workspace/devworkspace_controller.go
…ting from controller-runtime v0.23.x. (#1635) Signed-off-by: dkwon17 <dakwon@redhat.com>
…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
/test v8-devworkspace-operator-e2e, v8-che-happy-pathto trigger)v8-devworkspace-operator-e2e: DevWorkspace e2e testv8-che-happy-path: Happy path for verification integration with CheSummary by CodeRabbit