Skip to content

ROX-37158: rename workload type exclusion to kind - #23242

Merged
clickboo merged 1 commit into
masterfrom
boo-rename-workload-kind-exclusion
Oct 5, 2026
Merged

clickboo merged 1 commit into
masterfrom
boo-rename-workload-kind-exclusion

Conversation

@clickboo

@clickboo clickboo commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Description

Renames the workload exclusion feature flag and Sensor capability from Type to Kind. The exclusion applies to Kubernetes kinds (Job, CronJob), and Kind is the chosen term.

  • ROX_POLICY_WORKLOAD_TYPE_EXCLUSION → ROX_POLICY_WORKLOAD_KIND_EXCLUSION
  • PolicyWorkloadTypeExclusion → PolicyWorkloadKindExclusion
  • WorkloadTypeExclusion → WorkloadKindExclusion

The flag is still off by default, so the capability string change does not affect released Sensors.

Follow-up stack PRs (#22961–#22965) still use Type in proto, validation, sync, UI, and e2e names.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

Rename only. The flag remains off by default. CI covers compilation of the renamed identifiers.

Made with Cursor

…en terminology over Type

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci

openshift-ci Bot commented Oct 5, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Build Images Ready

Images are ready for commit c099890. To use with deploy scripts:

export MAIN_IMAGE_TAG=5.1.x-171-gc0998905a7

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Central YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f57df9f1-b1f9-4c7c-9c68-8899c382cd60
📥 Commits

Reviewing files that changed from the base of the PR and between 5079dcc and 8cd4b09.

📒 Files selected for processing (5)
  • pkg/centralsensor/caps_list.go
  • pkg/features/list.go
  • sensor/common/detector/detector.go
  • tests/e2e/lib-compat.sh
  • tests/e2e/lib.sh

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Updates
    • Workload exclusion terminology now uses “kind” rather than “type” across the related feature setting.
    • Policies with workload exclusion rules are synchronized according to whether the receiving Sensor supports exclusion by kind. Central removes those rules when syncing to Sensors without that capability.
    • The feature’s environment variable name has changed to use KIND instead of TYPE; update existing configuration accordingly.

Walkthrough

The workload exclusion feature flag and Sensor capability were renamed from workload type to workload kind. End-to-end environment setup now uses the renamed flag.

Changes

Workload Kind Exclusion

Layer / File(s) Summary
Feature flag and capability declarations
pkg/features/list.go, pkg/centralsensor/caps_list.go
The feature flag and Sensor capability use workload-kind naming. Their descriptions refer to excluding workloads by Kubernetes kind.
Sensor capability and test environment wiring
sensor/common/detector/detector.go, tests/e2e/lib-compat.sh, tests/e2e/lib.sh
Sensor capability detection and end-to-end environment setup use PolicyWorkloadKindExclusion and ROX_POLICY_WORKLOAD_KIND_EXCLUSION.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: vikin91

Merge Risk: ⚪ Minimal · up to 8cd4b

No actionable merge-blocking risk is established by the reviewed changes.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files.
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.
Title check ✅ Passed The title clearly and concisely describes the rename from workload type exclusion to workload kind exclusion.
Description check ✅ Passed The description explains the rename, addresses documentation and feature-flag gating, and states that the change is rename-only with CI covering compilation. CI inspection and automated tests are not …
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@codecov

codecov Bot commented Oct 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.94%. Comparing base (a2f484e) to head (8cd4b09).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
sensor/common/detector/detector.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #23242      +/-   ##
==========================================
- Coverage   51.97%   51.94%   -0.03%     
==========================================
  Files        2908     2908              
  Lines      183034   183034              
==========================================
- Hits        95123    95070      -53     
- Misses      79587    79624      +37     
- Partials     8324     8340      +16     
Flag Coverage Δ
go-unit-tests 51.94% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dvail dvail 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.

LGTM 🚢

@clickboo
clickboo enabled auto-merge (squash) October 5, 2026 19:59
@clickboo
clickboo merged commit c099890 into master Oct 5, 2026
133 of 145 checks passed
@clickboo
clickboo deleted the boo-rename-workload-kind-exclusion branch October 5, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants