Skip to content

OCPNETUI-21, OCPNETUI-25: made form for creating services - #453

Merged
openshift-merge-bot[bot] merged 10 commits into
openshift:mainfrom
Parthivk100:service-form
Jul 31, 2026
Merged

OCPNETUI-21, OCPNETUI-25: made form for creating services#453
openshift-merge-bot[bot] merged 10 commits into
openshift:mainfrom
Parthivk100:service-form

Conversation

@Parthivk100

@Parthivk100 Parthivk100 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

created form for making services utilizing SyncedEditor.
Design Document

Screenshare.-.2026-07-30.4_49_25.PM.mp4

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • Added form-based Service creation and editing pages with an optional YAML view for advanced configuration.
    • Enhanced the Service form with “matching pods” selector preview plus richer guidance for selector, ExternalName, ports, and protocols.
  • Bug Fixes
    • Service navigation now reliably opens the appropriate form (instead of the YAML editor).
    • Improved validation feedback for selector formatting, port mapping rules, and DNS-label requirements.
  • Documentation
    • Updated UI/help and validation messages across supported languages, including clearer parameterized matching list/empty-state text.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 27, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 27, 2026

Copy link
Copy Markdown

@Parthivk100: This pull request references OCPNETUI-21 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

This pull request references OCPNETUI-25 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

created form for making services utilizing SyncedEditor.

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 openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds Service creation and editing forms with validation, routing, YAML fallback, selector previews, port parsing, and localized networking-console messages. Shared selector preview logic now scopes resource queries by namespace and supports parameterized resource names.

Changes

Service form workflow

Layer / File(s) Summary
Service form contracts, parsing, and validation
src/views/services/form/utils/*, src/views/services/form/ExternalNameField.tsx, src/views/services/form/ServiceSelectorField.tsx, src/views/services/form/ServiceTypeFields.tsx, src/views/services/form/ServiceForm.tsx
Adds Service parsing, payload construction, translated selector/port/external-name validation, controlled fields, and type-specific form state.
Service form pages and routing
src/views/services/form/*, src/views/services/manifest.ts, src/views/services/list/ServiceList.tsx, src/views/services/actions/*, src/views/services/details/*
Adds create/edit pages, form actions, type selection, route registrations, and navigation to form views.
Selector preview consolidation
src/utils/components/SelectorPreview/*, src/utils/utils/selector.ts, src/utils/resources/shared.ts
Parameterizes preview resource names, removes namespace-selector watches, adds resource-list paths, and updates label filtering links.
NetworkPolicy preview integration
src/views/networkpolicies/new/components/NetworkPolicySelectorPreview/*
Updates pod grouping, preview limits, selector utility imports, and result links.
Rendering support and localized messages
src/utils/components/FormGroupHelperText/*, src/utils/components/StatusBox/*, locales/*/plugin__networking-console-plugin.json
Allows optional helper content and loaded-state children, and adds Service field, port, selector, external-name, preview, and required-field messages across six locales.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: metalice, batyana

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the main change: adding a service creation form.
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.
Stable And Deterministic Test Names ✅ Passed No test files or Ginkgo titles were changed; the PR only touches locale and service UI/utility code.
Test Structure And Quality ✅ Passed The PR only changes a non-test constant file; no Ginkgo test code was added or modified.
Microshift Test Compatibility ✅ Passed Only a TypeScript constants file changed; no new Ginkgo tests or MicroShift-relevant APIs/features were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo/e2e tests were added; HEAD only changes src/views/services/form/utils/constants.ts, with no It/Describe/Context/When blocks or test files touched.
Topology-Aware Scheduling Compatibility ✅ Passed Only a Service-form regex constant changed; no manifests, controllers, affinity, replicas, or topology-aware scheduling logic were added.
Ote Binary Stdout Contract ✅ Passed Reviewed the added service-form/components/utilities; no main/TestMain/BeforeSuite/top-level stdout writes or process.stdout/console.log in setup code were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS: The change set contains app/locale code only; no new Ginkgo e2e tests or test/spec files were added, and no IPv4 or external-network assumptions were found.
No-Weak-Crypto ✅ Passed Scanned the modified files; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, crypto APIs, custom crypto, or secret/token timing comparisons were found.
Container-Privileges ✅ Passed No changed manifest introduces privileged settings; the only K8s securityContext found sets allowPrivilegeEscalation:false, runAsNonRoot:true, and drops ALL caps.
No-Sensitive-Data-In-Logs ✅ Passed Searched all touched files and found no console/logger calls or other added logging; error state is shown in UI only, not written to logs.
✨ 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.

@openshift-ci
openshift-ci Bot requested review from batyana and metalice July 27, 2026 19:41
@openshift-ci

openshift-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Parthivk100

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 27, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🧹 Nitpick comments (1)
src/views/services/form/generateDefaultService.ts (1)

12-16: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Avoid suppressing the targetPort type with a double cast.

9376 as unknown as string does not convert the runtime number; it only hides the generated model contract. Use the actual model type and keep portsToText/textToPorts consistent with it.

🤖 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 `@src/views/services/form/generateDefaultService.ts` around lines 12 - 16,
Update the default service port definition in generateDefaultService to use the
generated model’s actual targetPort type instead of the double cast on 9376.
Ensure portsToText and textToPorts use the same targetPort representation
consistently, preserving the intended numeric port value at runtime.
🤖 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.

Inline comments:
In `@locales/es/plugin__networking-console-plugin.json`:
- Line 70: Translate the newly added entries in the Spanish networking console
locale, including the keys at the referenced locations, instead of retaining
their English source text. Preserve each existing key and JSON structure while
providing accurate, natural Spanish translations for the validation, help, and
form strings.

In `@locales/fr/plugin__networking-console-plugin.json`:
- Line 70: Translate all newly added Service-form validation and help-text keys
from English into the appropriate language in
locales/fr/plugin__networking-console-plugin.json lines 70-70,
locales/ja/plugin__networking-console-plugin.json lines 68-68,
locales/ko/plugin__networking-console-plugin.json lines 68-68, and
locales/zh/plugin__networking-console-plugin.json lines 68-68; preserve the
existing keys and JSON structure.

In `@src/views/services/form/constants.ts`:
- Line 7: Remove ExternalName from SERVICE_TYPES in the constants definition
unless the form is being fully extended to collect externalName and omit
selector and ports for that type. Ensure ServiceForm validation and submission
cannot produce an invalid ExternalName Service.

In `@src/views/services/form/ServiceForm.tsx`:
- Around line 14-15: Remove the unused Content and ContentVariants imports from
the import list in ServiceForm.tsx, preserving the remaining imports and their
valid ordering to resolve the ESLint errors.
- Around line 88-128: Update the onSubmit handler to return the k8sPromise
chain, including the existing navigation and error handling, so handleSubmit can
keep isSubmitting active until the create or update request completes. Preserve
the current k8sCreate/k8sUpdate selection and setError behavior.

In `@src/views/services/form/ServiceFormPage.tsx`:
- Line 55: Reformat the long translation call in the service form view by
wrapping the t(...) invocation according to the repository’s Prettier rules,
without changing its text or behavior.

In `@src/views/services/form/ServiceTypeSelect.tsx`:
- Around line 23-57: Update the Controller render in ServiceTypeSelect to
destructure fieldState.error and pass its presence to the surrounding FormGroup
as the validation error state, including a localized required-field message.
Keep rules={{ required: true }} so clearing spec.type remains invalid and
visibly reported.

In `@src/views/services/form/utils.ts`:
- Around line 95-112: Update validatePortsText to validate the optional parsed
protocol against the Service-supported allow-list TCP, UDP, and SCTP before
accepting the entry; reject any other protocol while preserving the existing
port and target-port validation behavior and the textToPorts output contract.
- Around line 23-50: The portsToText/textToPorts conversion currently loses
Service port names, making multi-port submissions invalid. Extend the text
format handled by portsToText and textToPorts to serialize and parse each port’s
name, preserving existing names and emitting valid dns-label names for
multi-port Services; retain current protocol and targetPort behavior.

---

Nitpick comments:
In `@src/views/services/form/generateDefaultService.ts`:
- Around line 12-16: Update the default service port definition in
generateDefaultService to use the generated model’s actual targetPort type
instead of the double cast on 9376. Ensure portsToText and textToPorts use the
same targetPort representation consistently, preserving the intended numeric
port value at runtime.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1e4a18e2-762d-4ddf-86d3-902e036cac27

📥 Commits

Reviewing files that changed from the base of the PR and between 2d8f85d and 592f04d.

📒 Files selected for processing (20)
  • locales/en/plugin__networking-console-plugin.json
  • locales/es/plugin__networking-console-plugin.json
  • locales/fr/plugin__networking-console-plugin.json
  • locales/ja/plugin__networking-console-plugin.json
  • locales/ko/plugin__networking-console-plugin.json
  • locales/zh/plugin__networking-console-plugin.json
  • src/utils/components/FormGroupHelperText/FormGroupHelperText.tsx
  • src/utils/components/StatusBox/StatusBox.tsx
  • src/views/services/actions/hooks/useServiceActions.tsx
  • src/views/services/form/EditService.tsx
  • src/views/services/form/ServiceForm.tsx
  • src/views/services/form/ServiceFormActions.tsx
  • src/views/services/form/ServiceFormPage.tsx
  • src/views/services/form/ServiceTypeSelect.tsx
  • src/views/services/form/constants.ts
  • src/views/services/form/generateDefaultService.ts
  • src/views/services/form/useIsCreationForm.tsx
  • src/views/services/form/utils.ts
  • src/views/services/list/ServiceList.tsx
  • src/views/services/manifest.ts

Comment thread locales/es/plugin__networking-console-plugin.json
Comment thread locales/fr/plugin__networking-console-plugin.json
Comment thread src/views/services/form/constants.ts Outdated
Comment thread src/views/services/form/ServiceForm.tsx Outdated
Comment thread src/views/services/form/ServiceForm.tsx
Comment thread src/views/services/form/ServiceFormPage.tsx Outdated
Comment thread src/views/services/form/ServiceTypeSelect.tsx Outdated
Comment thread src/views/services/form/utils.ts Outdated
Comment thread src/views/services/form/utils.ts Outdated

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

Please also go through the CodeRabbit comments.

Comment thread src/views/services/form/generateDefaultService.ts Outdated
Comment thread src/views/services/form/utils/constants.ts
Comment thread src/views/services/form/utils.ts Outdated
Comment thread src/views/services/form/utils.ts Outdated
Comment thread src/views/services/form/utils.ts Outdated
Comment thread src/views/services/form/ServiceForm.tsx Outdated
Comment thread src/views/services/form/ServiceFormPage.tsx Outdated
Comment thread src/views/services/form/ServiceFormPage.tsx Outdated
Comment thread src/views/services/form/ServiceFormPage.tsx Outdated
Comment thread src/views/services/form/hooks/useIsCreationForm.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (2)
src/views/services/form/ServiceFormPage.tsx (1)

45-58: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Description text always says "Create," even when editing.

The Title correctly branches between "Edit"/"Create" (Lines 49-52), but the paragraph below is static and always reads "Create a Service using the form..." even when isEditing is true.

✏️ Proposed fix
         <Content component={ContentVariants.p}>
-          {t(
-            'Create a Service using the form. Switch to YAML view for full control, including fields not shown in the form.',
-          )}
+          {isEditing
+            ? t(
+                'Edit this Service using the form. Switch to YAML view for full control, including fields not shown in the form.',
+              )
+            : t(
+                'Create a Service using the form. Switch to YAML view for full control, including fields not shown in the form.',
+              )}
         </Content>
🤖 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 `@src/views/services/form/ServiceFormPage.tsx` around lines 45 - 58, Update the
paragraph translation in the ServiceFormPage render to branch on isEditing,
using edit wording when editing and preserving the existing create wording for
new services. Keep the Title behavior and YAML-view guidance unchanged.
src/views/services/form/ServiceTypeSelect.tsx (1)

22-73: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Type field shows a "danger" toggle but no visible error message.

error is now wired into aria-invalid/status on the MenuToggle, but unlike every other field in this form (Name, Namespace, Selector, Ports, ExternalName), there's no FormGroupHelperText rendering error.message. Users get a red toggle with no explanation of what's wrong.

✏️ Proposed fix
           </Dropdown>
+          <FormGroupHelperText validated={error ? ValidatedOptions.error : ValidatedOptions.default}>
+            {error?.message}
+          </FormGroupHelperText>
         </FormGroup>
🤖 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 `@src/views/services/form/ServiceTypeSelect.tsx` around lines 22 - 73, Add the
type validation message to the FormGroup containing the `ServiceTypeSelect`
dropdown by rendering `FormGroupHelperText` with `error.message`, matching the
error-display pattern used by the other form fields while preserving the
existing toggle error styling.
🤖 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.

Inline comments:
In `@src/views/services/form/utils/utils.ts`:
- Around line 55-62: The PORT_LINE_REGEX validation currently accepts invalid
symbolic targetPort values; update the port-line parsing or validation using
PORT_LINE_REGEX so nonnumeric targetPort values must satisfy the Kubernetes
service port-name constraint (DNS_LABEL-compatible), while preserving numeric
targetPort handling and valid optional protocols.

---

Outside diff comments:
In `@src/views/services/form/ServiceFormPage.tsx`:
- Around line 45-58: Update the paragraph translation in the ServiceFormPage
render to branch on isEditing, using edit wording when editing and preserving
the existing create wording for new services. Keep the Title behavior and
YAML-view guidance unchanged.

In `@src/views/services/form/ServiceTypeSelect.tsx`:
- Around line 22-73: Add the type validation message to the FormGroup containing
the `ServiceTypeSelect` dropdown by rendering `FormGroupHelperText` with
`error.message`, matching the error-display pattern used by the other form
fields while preserving the existing toggle error styling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bc83ddd5-8531-4da9-a444-ce1a89df8c9c

📥 Commits

Reviewing files that changed from the base of the PR and between 592f04d and 0af6c5a.

📒 Files selected for processing (17)
  • locales/en/plugin__networking-console-plugin.json
  • locales/es/plugin__networking-console-plugin.json
  • locales/fr/plugin__networking-console-plugin.json
  • locales/ja/plugin__networking-console-plugin.json
  • locales/ko/plugin__networking-console-plugin.json
  • locales/zh/plugin__networking-console-plugin.json
  • src/views/services/actions/hooks/useServiceActions.tsx
  • src/views/services/details/components/ServiceDetailsPageTitle.tsx
  • src/views/services/form/EditService.tsx
  • src/views/services/form/ExternalNameField.tsx
  • src/views/services/form/ServiceForm.tsx
  • src/views/services/form/ServiceFormPage.tsx
  • src/views/services/form/ServiceTypeSelect.tsx
  • src/views/services/form/hooks/useIsCreationForm.tsx
  • src/views/services/form/utils/constants.ts
  • src/views/services/form/utils/utils.ts
  • src/views/services/form/utils/validationUtils.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/views/services/form/EditService.tsx
  • src/views/services/actions/hooks/useServiceActions.tsx

Comment thread src/views/services/form/utils/utils.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🤖 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.

Inline comments:
In `@locales/es/plugin__networking-console-plugin.json`:
- Line 225: Update the Spanish translation for “List of pods matching” to refer
to matching pods rather than groups, using the established “pods” terminology
such as “Lista de pods coincidentes.”

In `@src/utils/components/SelectorPreview/hooks/useSelectorPreviewData.ts`:
- Around line 40-55: The useSelectorPreviewData watch currently broadens to all
resources when either selector is invalid. Update the flow around
safeNsSelector, offendingNsSelector, safeLabelSelector, and
offendingLabelSelector to disable or return a no-match state before
useK8sWatchResource runs whenever either selector is invalid; preserve normal
watching and selector error behavior for valid selectors.

In `@src/utils/components/SelectorPreview/SelectorPreviewContent.tsx`:
- Around line 116-124: Update the “show more” link in SelectorPreviewContent so
its destination preserves the active namespaceSelector filtering used for the
preview. Encode the selector in the URL using the existing supported query
mechanism, or suppress the link when the selector cannot be represented; retain
the current namespace and label filtering behavior.

In `@src/utils/components/SelectorPreview/utils/const.ts`:
- Line 10: Update the allowedSelector regular expression to remove the backslash
from its permitted character class, while retaining the documented allow-list of
alphanumerics, hyphens, underscores, slashes, and periods and preserving the
existing boundary rules.

In `@src/views/services/form/ServiceSelectorField.tsx`:
- Around line 32-44: The onPairsChange handler must prevent stale spec.selector
values from being submitted when validateSelectorPairs reports invalid input,
including an entirely cleared selector. Update the surrounding
ServiceSelectorField/ServiceForm form state so invalid raw pairs register a
blocking validation error (or otherwise prevent submission), and clear that
error only when the pairs become valid while preserving the existing valid
setValue behavior.
- Line 26: Update ServiceSelectorField’s rendered selector preview trigger near
the SelectorPreview usage to add an accessible button element and attach
podsPreviewPopoverRef via its ref prop. Keep passing the ref to SelectorPreview
through triggerRef, and ensure the button provides the trigger interaction
needed to open the popover.

In `@src/views/services/form/utils/validationUtils.ts`:
- Around line 53-54: Update validateSelectorPairs so it ignores only rows where
both selector fields are empty, while retaining partially filled rows such as an
empty key with a non-empty value for validation to reject. Ensure
labelPairsToRecord cannot silently omit any row containing a value without a
key.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c92407d3-2593-498c-b7fe-a742c5a8b21f

📥 Commits

Reviewing files that changed from the base of the PR and between 0af6c5a and 1504924.

📒 Files selected for processing (17)
  • locales/en/plugin__networking-console-plugin.json
  • locales/es/plugin__networking-console-plugin.json
  • locales/fr/plugin__networking-console-plugin.json
  • locales/ja/plugin__networking-console-plugin.json
  • locales/ko/plugin__networking-console-plugin.json
  • locales/zh/plugin__networking-console-plugin.json
  • src/utils/components/SelectorPreview/SelectorPreview.tsx
  • src/utils/components/SelectorPreview/SelectorPreviewContent.tsx
  • src/utils/components/SelectorPreview/hooks/useSelectorPreviewData.ts
  • src/utils/components/SelectorPreview/index.ts
  • src/utils/components/SelectorPreview/utils/const.ts
  • src/utils/components/SelectorPreview/utils/types.ts
  • src/utils/components/SelectorPreview/utils/utils.ts
  • src/views/services/form/ServiceForm.tsx
  • src/views/services/form/ServiceSelectorField.tsx
  • src/views/services/form/utils/utils.ts
  • src/views/services/form/utils/validationUtils.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • locales/ja/plugin__networking-console-plugin.json
  • locales/fr/plugin__networking-console-plugin.json
  • locales/ko/plugin__networking-console-plugin.json

Comment thread locales/es/plugin__networking-console-plugin.json
Comment thread src/utils/components/SelectorPreview/hooks/useSelectorPreviewData.ts Outdated
Comment thread src/utils/components/SelectorPreview/SelectorPreviewContent.tsx Outdated
Comment thread src/utils/components/SelectorPreview/utils/const.ts Outdated
Comment thread src/views/services/form/ServiceSelectorField.tsx
Comment thread src/views/services/form/ServiceSelectorField.tsx
Comment thread src/views/services/form/utils/validationUtils.ts Outdated

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

Please address any new CodeRabbit comments.

Comment thread src/utils/components/SelectorPreview/hooks/useSelectorPreviewData.ts Outdated
Comment thread src/utils/components/SelectorPreview/utils/const.ts Outdated
Comment thread src/utils/components/SelectorPreview/utils/utils.ts Outdated
Comment thread src/utils/components/SelectorPreview/index.ts Outdated
Comment thread src/utils/components/SelectorPreview/SelectorPreviewContent.tsx Outdated
Comment thread src/views/services/form/utils/validationUtils.ts Outdated
Comment thread src/views/services/form/utils/validationUtils.ts Outdated
Comment thread src/views/services/form/utils/validationUtils.ts Outdated
Comment thread src/views/services/form/utils/validationUtils.ts Outdated
Comment thread src/views/services/form/ServiceForm.tsx Outdated
Comment thread src/views/services/form/utils/utils.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (1)
locales/ja/plugin__networking-console-plugin.json (1)

68-73: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate the new strings in the Japanese catalog.

All changed values remain English, so Japanese users will see untranslated service-form guidance, validation errors, and selector-preview messages. Translate the right-hand values while preserving placeholders such as {{resourceName}} and <2>...</2>.

Also applies to: 105-105, 162-167, 221-222, 245-247, 266-266, 290-290, 310-328, 374-377, 391-391, 405-405, 440-440

🤖 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 `@locales/ja/plugin__networking-console-plugin.json` around lines 68 - 73,
Translate every newly added English value in the Japanese locale catalog to
natural Japanese, including the listed ranges and the shown entries. Preserve
each translation key, interpolation such as {{resourceName}}, and markup
placeholders such as <2>...</2> exactly while changing only the right-hand
values.
🤖 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.

Inline comments:
In `@src/views/services/form/utils/constants.ts`:
- Around line 13-14: Update EXTERNAL_NAME_HOSTNAME_REGEX to match Kubernetes
ExternalName validation: use a case-sensitive RFC-1123 hostname pattern, allow
single-label hostnames such as “host,” reject uppercase characters, and preserve
the API’s hostname length limits if enforced by this validation.

---

Outside diff comments:
In `@locales/ja/plugin__networking-console-plugin.json`:
- Around line 68-73: Translate every newly added English value in the Japanese
locale catalog to natural Japanese, including the listed ranges and the shown
entries. Preserve each translation key, interpolation such as {{resourceName}},
and markup placeholders such as <2>...</2> exactly while changing only the
right-hand values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 614ffb80-2f5a-4052-a2f1-6e0f9f467e6a

📥 Commits

Reviewing files that changed from the base of the PR and between 1504924 and 5c204d7.

📒 Files selected for processing (24)
  • locales/en/plugin__networking-console-plugin.json
  • locales/es/plugin__networking-console-plugin.json
  • locales/fr/plugin__networking-console-plugin.json
  • locales/ja/plugin__networking-console-plugin.json
  • locales/ko/plugin__networking-console-plugin.json
  • locales/zh/plugin__networking-console-plugin.json
  • src/utils/components/SelectorPreview/SelectorPreview.tsx
  • src/utils/components/SelectorPreview/SelectorPreviewContent.tsx
  • src/utils/components/SelectorPreview/hooks/useSelectorPreviewData.ts
  • src/utils/components/SelectorPreview/utils/utils.ts
  • src/utils/resources/shared.ts
  • src/utils/utils/selector.ts
  • src/views/networkpolicies/new/components/NetworkPolicySelectorPreview/components/NetworkPolicyPodsPreview.tsx
  • src/views/networkpolicies/new/components/NetworkPolicySelectorPreview/components/hooks/useNetworkPolicyPodPreviewData.ts
  • src/views/networkpolicies/new/components/NetworkPolicySelectorPreview/utils/const.ts
  • src/views/networkpolicies/new/components/NetworkPolicySelectorPreview/utils/types.ts
  • src/views/services/form/ExternalNameField.tsx
  • src/views/services/form/ServiceForm.tsx
  • src/views/services/form/ServiceSelectorField.tsx
  • src/views/services/form/ServiceTypeFields.tsx
  • src/views/services/form/utils/constants.ts
  • src/views/services/form/utils/types.ts
  • src/views/services/form/utils/utils.ts
  • src/views/services/form/utils/validationUtils.ts
💤 Files with no reviewable changes (2)
  • src/views/networkpolicies/new/components/NetworkPolicySelectorPreview/utils/types.ts
  • src/views/networkpolicies/new/components/NetworkPolicySelectorPreview/utils/const.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • locales/fr/plugin__networking-console-plugin.json
  • locales/es/plugin__networking-console-plugin.json
  • locales/ko/plugin__networking-console-plugin.json
  • locales/en/plugin__networking-console-plugin.json
  • locales/zh/plugin__networking-console-plugin.json

Comment thread src/views/services/form/utils/constants.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@src/views/services/form/utils/constants.ts`:
- Around line 12-14: The EXTERNAL_NAME_HOSTNAME_REGEX used by
validateExternalName must enforce Kubernetes limits in addition to format:
restrict each hostname label to at most 63 characters and the full hostname to
at most 253 characters. Update the regex or validation logic accordingly, and
add boundary tests covering 63/64-character labels and 253/254-character
hostnames.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 00e2309f-0165-43e3-bc3c-08a6b889dc4e

📥 Commits

Reviewing files that changed from the base of the PR and between 5c204d7 and 866ce10.

📒 Files selected for processing (1)
  • src/views/services/form/utils/constants.ts

Comment thread src/views/services/form/utils/constants.ts Outdated
@pcbailey

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e

@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown

@Parthivk100: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@openshift-merge-bot
openshift-merge-bot Bot merged commit d5113fb into openshift:main Jul 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants