Skip to content

fix: restrict external DevWorkspaceOperatorConfig references to allowed namespaces - #1696

Closed
rohanKanojia wants to merge 1 commit into
devfile:mainfrom
rohankanojia-forks:pr/dwoc-references-namespace-fix
Closed

fix: restrict external DevWorkspaceOperatorConfig references to allowed namespaces#1696
rohanKanojia wants to merge 1 commit into
devfile:mainfrom
rohankanojia-forks:pr/dwoc-references-namespace-fix

Conversation

@rohanKanojia

Copy link
Copy Markdown
Member

What does this PR do?

Limits controller.devfile.io/devworkspace-config so a DevWorkspace can only reference a DevWorkspaceOperatorConfig in its own namespace or the operator namespace.

Workspace-local DWOCs still merge operational settings (for example imagePullPolicy and PVC name). Pod-level fields such as security context, service account, runtime class, default template, pod annotations, and scheduler name are applied only when the referenced DWOC is in the operator namespace.

What issues does this PR fix or reference?

N/A

Is it tested? How?

TODO: Will share a test plan soon

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

@openshift-ci

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

@openshift-ci

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rohanKanojia
Once this PR has been reviewed and has the lgtm label, please assign dkwon17 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
auto_review:
drafts: true

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.

@rohanKanojia
rohanKanojiaforce-pushed the pr/dwoc-references-namespace-fix branch from 0932bf2 to 5e6617aCompareAugust 24, 2026 11:18
@codecov

codecovBot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.04878% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.56%. Comparing base (5684f19) to head (33d485e).

Files with missing linesPatch %Lines
pkg/config/sync.go78.04%6 Missing and 3 partials ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #1696 +/- ##
==========================================
+ Coverage 40.46% 40.56% +0.09% 
==========================================
Files 172 172 Lines 15634 15674 +40 ==========================================
+ Hits 6327 6358 +31 - Misses 8920 8926 +6 - Partials 387 390 +3 

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rohanKanojia
rohanKanojiaforce-pushed the pr/dwoc-references-namespace-fix branch 2 times, most recently from 7738161 to e6d461cCompareAugust 24, 2026 11:49
…ed namespaces
Workspace-local operator configs continue to override operational settings, while pod-level
fields are taken only from configs in the operator namespace.
Assisted-by: Cursor Grok 4.6
Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@rohanKanojia
rohanKanojiaforce-pushed the pr/dwoc-references-namespace-fix branch from 619d297 to a5e4fdcCompareAugust 24, 2026 13:46
@rohanKanojia
rohanKanojia deleted the pr/dwoc-references-namespace-fix branch August 24, 2026 14:18
Sign up for freeto 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.

1 participant

@rohanKanojia