Skip to content

ACM-34294 Missing UI Validation on Empty Policy Template Submission#6308

Merged
openshift-merge-bot[bot] merged 1 commit into
stolostron:mainfrom
oksanabaza:ACM-34294
Jun 8, 2026
Merged

ACM-34294 Missing UI Validation on Empty Policy Template Submission#6308
openshift-merge-bot[bot] merged 1 commit into
stolostron:mainfrom
oksanabaza:ACM-34294

Conversation

@oksanabaza

@oksanabaza oksanabaza commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

📝 Summary

When creating a new policy, the default data has spec: { disabled: false } but NO policy-templates field. This means:
If user never touches templates →spec.policy-templatesisundefined→ API error
If user adds then removes all templates →spec.policy-templatesis[]→ API accepts it

Ticket Summary (Title):

ACM-34294 Missing UI Validation on Empty Policy Template Submission

Ticket Link:

https://redhat.atlassian.net/browse/ACM-34294

Type of Change:

  • 🐞 Bug Fix
  • ✨ Feature
  • 🔧 Refactor
  • 💸 Tech Debt
  • 🧪 Test-related
  • 📄 Docs

✅ Checklist

General

  • PR title follows the convention (e.g. ACM-12340 Fix bug with...)
  • Code builds and runs locally without errors
  • No console logs, commented-out code, or unnecessary files
  • All commits are meaningful and well-labeled
  • All new display strings are externalized for localization (English only)
  • (Nice to have) JSDoc comments added for new functions and interfaces

If Feature

  • UI/UX reviewed (if applicable)
  • All acceptance criteria met
  • Unit test coverage added or updated
  • Relevant documentation or comments included

If Bugfix

  • Root cause and fix summary are documented in the ticket (for future reference / errata)
  • Fix tested thoroughly and resolves the issue
  • Test(s) added to prevent regression

🗒️ Notes for Reviewers

Before:

2026-06-07.2.03.48.PM.mov

After:

2026-06-07.2.01.40.PM.mov

Signed-off-by: Oksana Bazylieva <obazylie@redhat.com>
@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@oksanabaza, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 29 minutes and 56 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b0d49471-1129-4c30-bcaf-160996531398

📥 Commits

Reviewing files that changed from the base of the PR and between 3bce542 and adc140f.

📒 Files selected for processing (2)
  • frontend/packages/react-form-wizard/wizards/Policy/PolicyWizard.tsx
  • frontend/src/wizards/Governance/Policy/PolicyWizard.tsx
✨ 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.

@fxiang1

fxiang1 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fxiang1, oksanabaza

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

@sonarqubecloud

sonarqubecloud Bot commented Jun 8, 2026

Copy link
Copy Markdown

@openshift-merge-bot openshift-merge-bot Bot merged commit 5a8a5ce into stolostron:main Jun 8, 2026
17 checks passed
@oksanabaza

Copy link
Copy Markdown
Contributor Author

/cherry-pick release-2.17

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@oksanabaza: new pull request created: #6321

Details

In response to this:

/cherry-pick release-2.17

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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.

3 participants