Skip to content

CNV-83773: VirtualMachineTemplates filter fixes#3819

Open
adamviktora wants to merge 2 commits intokubevirt-ui:mainfrom
adamviktora:vmtemplates-fixes
Open

CNV-83773: VirtualMachineTemplates filter fixes#3819
adamviktora wants to merge 2 commits intokubevirt-ui:mainfrom
adamviktora:vmtemplates-fixes

Conversation

@adamviktora
Copy link
Copy Markdown
Member

@adamviktora adamviktora commented Apr 20, 2026

📝 Description

Fixes for VirtualMachineTemplates:

  • display Architecture cell for VM templates + fix Architecture filter
  • show resource badge for Type filter (T and VMT) - design doc
  • reenable and adjust cypress tests for template filters

🎥 Demo

Before:

Screen.Recording.2026-04-20.at.15.17.31.mov

After:

Screen.Recording.2026-04-20.at.15.16.41.mov

Summary by CodeRabbit

  • New Features

    • VM Templates feature toggle for testing and managing template visibility
    • Type filter that appears when VM Templates is enabled to distinguish OpenShift vs VM templates
    • Template list now includes request-derived entries when VM Templates is enabled; Architecture column consistently shows template architecture
    • Filter items support richer labels (icons and custom content)
  • Tests

    • Gated template filtering tests added, Provider/OS filter tests re-enabled, and test helper for toggling VM Templates added

@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

openshift-ci-robot commented Apr 20, 2026

@adamviktora: This pull request references CNV-83773 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 task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

📝 Description

Fixes for VirtualMachineTemplates:

  • display Architecture cell for VM templates + fix Architecture filter
  • show resource badge for Type filter (T and VMT)
  • reenable and adjust cypress tests for template filters

🎥 Demo

Please add a video or an image of the behavior/changes

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.

@openshift-ci openshift-ci Bot requested review from rszwajko and upalatucci April 20, 2026 13:15
@openshift-ci openshift-ci Bot added the approved This issue is something we want to fix label Apr 20, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2031fd9b-a84e-48e1-b65f-a382889b37e1

📥 Commits

Reviewing files that changed from the base of the PR and between d760d97 and 460a83a.

📒 Files selected for processing (2)
  • cypress/support/commands.ts
  • cypress/tests/gating/template-list.cy.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • cypress/support/commands.ts
  • cypress/tests/gating/template-list.cy.ts

📝 Walkthrough

Walkthrough

Adds a Cypress command to toggle the VM templates preview feature and updates gating tests; extends row-filter types to allow optional item content; introduces template-specific architecture helpers and unique-architecture utilities; separates templates from requests in aggregation and gates the Type filter by the VM templates feature flag.

Changes

Cohort / File(s) Summary
Cypress feature toggle & tests
cypress/support/commands.ts, cypress/tests/gating/template-list.cy.ts
Added toggleVMTemplatesFeature(enable: boolean) Cypress command that navigates settings, toggles the vmTemplates preview switch, and asserts state; updated gating tests to enable/disable the feature, adapt filter interactions (use row .click() and dropdown sequencing), unskip two tests, and add an after hook to disable the feature.
ListPageFilter types & rendering
src/utils/components/ListPageFilter/types.ts, src/utils/components/ListPageFilter/ListPageFilter.tsx, src/utils/components/ListPageFilter/components/RowFilters.tsx, src/utils/components/ListPageFilter/utils.ts
Introduced ExtendedRowFilterItem (content?: ReactNode) and ExtendedRowFilter; updated components/util to accept ExtendedRowFilter[]; RowFilters renders labels using item.content ?? item.title.
Template architecture helpers
src/views/templates/utils/utils.ts, src/utils/utils/architecture.ts
Added getTemplateArchitecture and getUniqueTemplateArchitectures; renamed getArchitecture parameter from resourcesresource and updated callers; template-specific helpers used for template architecture resolution.
Template filters & feature gating
src/views/templates/list/filters/useTypeFilter.tsx, src/views/templates/list/filters/useTypeFilter.ts (deleted), src/views/templates/list/filters/useArchitectureFilter.ts, src/views/templates/list/filters/useVirtualMachineTemplatesFilters.ts
Deleted old useTypeFilter.ts; added useTypeFilter(featureEnabled) which returns null when the VM templates feature is disabled and otherwise provides a type RowFilter with ExtendedRowFilterItems (including ResourceIcon); useArchitectureFilter now uses template-specific architecture helpers; useVirtualMachineTemplatesFilters reads the VM template feature flag and passes it to useTypeFilter.
Template resource aggregation & consumers
src/views/templates/list/hooks/useAllTemplateResources.ts, src/views/templates/list/VirtualMachineTemplatesList.tsx, src/views/templates/list/virtualMachineTemplatesDefinition.tsx
Changed aggregation: allTemplates is now Template[] (requests excluded); introduced allTemplatesWithRequests: TemplateOrRequest[] which includes requests; consumers switched filtering to use allTemplatesWithRequests; Architecture column now always uses getTemplateArchitecture.
SettingsTab minor change
src/views/settings/SettingsTab.tsx
Destructured dataTest in tab configs and adjusted data-test attribute usage on rendered tab content; rendering logic and exports unchanged.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description includes a bullet-point list of specific fixes and provides demo videos showing before/after behavior, but lacks structured sections following the template format. Add a structured format matching the template with clear '📝 Description' and '🎥 Demo' sections; consider expanding the description section with more technical details about the changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: filter fixes for VirtualMachineTemplates, which aligns with the primary objectives of fixing Architecture filter, Type filter display, and Cypress tests.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
src/views/templates/utils/utils.ts (1)

46-47: Return type may include undefined values.

getTemplateArchitecture can return undefined, so the mapped array type is (string | undefined)[]. The Set will preserve undefined as a distinct value, and Array.from will include it. The return type string[] is technically incorrect.

The consumer (useArchitectureFilter) applies .filter(Boolean) to handle this, but the type annotation here could mislead other consumers.

♻️ Suggested type correction
-export const getUniqueTemplateArchitectures = (templates: Template[]): string[] =>
-  Array.from(new Set(templates.map((template) => getTemplateArchitecture(template))));
+export const getUniqueTemplateArchitectures = (templates: Template[]): (string | undefined)[] =>
+  Array.from(new Set(templates.map((template) => getTemplateArchitecture(template))));

Or filter out undefined values inside the function:

-export const getUniqueTemplateArchitectures = (templates: Template[]): string[] =>
-  Array.from(new Set(templates.map((template) => getTemplateArchitecture(template))));
+export const getUniqueTemplateArchitectures = (templates: Template[]): string[] =>
+  Array.from(new Set(templates.map((template) => getTemplateArchitecture(template)).filter(Boolean))) as string[];
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/views/templates/utils/utils.ts` around lines 46 - 47,
getUniqueTemplateArchitectures currently maps templates via
getTemplateArchitecture which can return undefined, so the Set/Array.from may
include undefined while the function is typed as string[]; update the function
to exclude undefined values before creating the Set (e.g., map then
filter(Boolean) or use reduce) so its actual return type is string[] and callers
like useArchitectureFilter don't need to coerce; ensure you reference
getTemplateArchitecture and preserve uniqueness via Set after filtering.
src/views/templates/list/filters/useTypeFilter.tsx (1)

28-52: Move typeFilterItems inside useMemo or memoize separately.

typeFilterItems is recreated on every render since it's defined outside useMemo. This causes the useMemo at line 54 to recompute on each render despite featureEnabled being unchanged, negating the memoization benefit.

♻️ Suggested refactor
 const useTypeFilter = (featureEnabled: boolean): null | RowFilter<TemplateOrRequest> => {
   const { t } = useKubevirtTranslation();
 
-  const openShiftTemplateTitle = t('OpenShift templates');
-  const virtualMachineTemplateTitle = t('VirtualMachine templates');
-
-  const typeFilterItems: ExtendedRowFilterItem[] = [
-    {
-      content: (
-        <>
-          <ResourceIcon groupVersionKind={TemplateModelGroupVersionKind} />
-          {openShiftTemplateTitle}
-        </>
-      ),
-      id: TEMPLATE_TYPE.OPENSHIFT,
-      title: openShiftTemplateTitle,
-    },
-    {
-      content: (
-        <>
-          <ResourceIcon groupVersionKind={VirtualMachineTemplateGroupVersionKind} />
-          {virtualMachineTemplateTitle}
-        </>
-      ),
-      id: TEMPLATE_TYPE.VM,
-      title: virtualMachineTemplateTitle,
-    },
-  ];
-
   return useMemo(() => {
     if (!featureEnabled) return null;
 
+    const openShiftTemplateTitle = t('OpenShift templates');
+    const virtualMachineTemplateTitle = t('VirtualMachine templates');
+
+    const typeFilterItems: ExtendedRowFilterItem[] = [
+      {
+        content: (
+          <>
+            <ResourceIcon groupVersionKind={TemplateModelGroupVersionKind} />
+            {openShiftTemplateTitle}
+          </>
+        ),
+        id: TEMPLATE_TYPE.OPENSHIFT,
+        title: openShiftTemplateTitle,
+      },
+      {
+        content: (
+          <>
+            <ResourceIcon groupVersionKind={VirtualMachineTemplateGroupVersionKind} />
+            {virtualMachineTemplateTitle}
+          </>
+        ),
+        id: TEMPLATE_TYPE.VM,
+        title: virtualMachineTemplateTitle,
+      },
+    ];
+
     return {
       filter: (types, obj) => includeFilter(types, typeFilterItems, getTemplateType(obj)),
       filterGroupName: t('Type'),
       items: typeFilterItems,
       reducer: (obj) => getTemplateType(obj),
       type: 'type',
     };
-  }, [featureEnabled, typeFilterItems, t]);
+  }, [featureEnabled, t]);
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/views/templates/list/filters/useTypeFilter.tsx` around lines 28 - 52,
typeFilterItems is recreated every render outside the useMemo, causing the memo
that depends on featureEnabled to always recompute; move or memoize
typeFilterItems so it is stable. Wrap the typeFilterItems array creation in
useMemo (or include it inside the existing useMemo that returns the filters) and
ensure its dependencies include TemplateModelGroupVersionKind,
VirtualMachineTemplateGroupVersionKind, TEMPLATE_TYPE, and any i18n titles
(openShiftTemplateTitle, virtualMachineTemplateTitle) so the
ExtendedRowFilterItem objects are only recreated when those values change,
preserving the intended memoization around featureEnabled.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cypress/support/commands.ts`:
- Around line 118-127: The toggleVMTemplatesFeature command currently toggles
the vmTemplates switch but does not assert the resulting state, which can cause
flaky tests; after the conditional click inside the
Cypress.Commands.add('toggleVMTemplatesFeature', ...) block, re-query the
[data-test-id="vmTemplates"] element and assert that its aria-checked equals the
desired enable value (use
cy.get('[data-test-id="vmTemplates"]').should('have.attr', 'aria-checked',
String(enable))) so the command only resolves when the switch is in the expected
state.

In `@src/views/templates/list/filters/useArchitectureFilter.ts`:
- Around line 31-35: The architecture filter currently omits requests because
getTemplateArchitecture(obj) can be undefined for VirtualMachineTemplateRequest,
getItemNameWithOther(..., architectureItems) maps that to OTHER but
architectureItems (built via getUniqueTemplateArchitectures and
.filter(Boolean)) never contains OTHER; update the filter generation so
architectureItems always includes an "Other/Unknown" entry (or explicitly append
an OTHER item) so includeFilter(availableArchitectures, architectureItems,
getTemplateArchitecture(obj)) and reducer: getItemNameWithOther(...) will match
requests, or alternatively change the filter predicate (the filter property
using includeFilter) to treat undefined architectures as always allowed when
compareData.selected has selections; adjust the code around architectureItems,
getUniqueTemplateArchitectures, getTemplateArchitecture and getItemNameWithOther
accordingly.

---

Nitpick comments:
In `@src/views/templates/list/filters/useTypeFilter.tsx`:
- Around line 28-52: typeFilterItems is recreated every render outside the
useMemo, causing the memo that depends on featureEnabled to always recompute;
move or memoize typeFilterItems so it is stable. Wrap the typeFilterItems array
creation in useMemo (or include it inside the existing useMemo that returns the
filters) and ensure its dependencies include TemplateModelGroupVersionKind,
VirtualMachineTemplateGroupVersionKind, TEMPLATE_TYPE, and any i18n titles
(openShiftTemplateTitle, virtualMachineTemplateTitle) so the
ExtendedRowFilterItem objects are only recreated when those values change,
preserving the intended memoization around featureEnabled.

In `@src/views/templates/utils/utils.ts`:
- Around line 46-47: getUniqueTemplateArchitectures currently maps templates via
getTemplateArchitecture which can return undefined, so the Set/Array.from may
include undefined while the function is typed as string[]; update the function
to exclude undefined values before creating the Set (e.g., map then
filter(Boolean) or use reduce) so its actual return type is string[] and callers
like useArchitectureFilter don't need to coerce; ensure you reference
getTemplateArchitecture and preserve uniqueness via Set after filtering.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3aeeebeb-5b94-4f30-98d1-1b4602b92347

📥 Commits

Reviewing files that changed from the base of the PR and between aede747 and 300be53.

📒 Files selected for processing (15)
  • cypress/support/commands.ts
  • cypress/tests/gating/template-list.cy.ts
  • src/utils/components/ListPageFilter/ListPageFilter.tsx
  • src/utils/components/ListPageFilter/components/RowFilters.tsx
  • src/utils/components/ListPageFilter/types.ts
  • src/utils/components/ListPageFilter/utils.ts
  • src/utils/utils/architecture.ts
  • src/views/templates/list/VirtualMachineTemplatesList.tsx
  • src/views/templates/list/filters/useArchitectureFilter.ts
  • src/views/templates/list/filters/useTypeFilter.ts
  • src/views/templates/list/filters/useTypeFilter.tsx
  • src/views/templates/list/filters/useVirtualMachineTemplatesFilters.ts
  • src/views/templates/list/hooks/useAllTemplateResources.ts
  • src/views/templates/list/virtualMachineTemplatesDefinition.tsx
  • src/views/templates/utils/utils.ts
💤 Files with no reviewable changes (1)
  • src/views/templates/list/filters/useTypeFilter.ts

Comment thread cypress/support/commands.ts
Comment thread src/views/templates/list/filters/useArchitectureFilter.ts
Comment thread src/views/templates/utils/utils.ts
Copy link
Copy Markdown
Member

@galkremer1 galkremer1 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Passed code review, ready for merge label Apr 20, 2026
@openshift-ci openshift-ci Bot removed the lgtm Passed code review, ready for merge label Apr 20, 2026
Copy link
Copy Markdown
Member

@galkremer1 galkremer1 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Passed code review, ready for merge label Apr 20, 2026
@galkremer1
Copy link
Copy Markdown
Member

/retest

1 similar comment
@upalatucci
Copy link
Copy Markdown
Member

/retest

@adamviktora
Copy link
Copy Markdown
Member Author

I will need to fix the e2e tests.

@openshift-ci openshift-ci Bot removed the lgtm Passed code review, ready for merge label Apr 21, 2026
- display Architecture cell for VM templates, fix Architecture filter
- show resource badge for Type filter (T and VMT)
- reenable and adjust cypress tests for template filters
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
src/views/settings/SettingsTab.tsx (1)

30-36: Optional: replace map(... ? ... : null) with direct active-tab selection.

Current logic works, but selecting the active tab once is simpler to read and avoids iterating with mostly null returns.

♻️ Proposed refactor
-          {tabs.map(({ Component, name }) =>
-            activeTab === name ? (
-              <div className="settings-tab__content" key={name}>
-                <Component />
-              </div>
-            ) : null,
-          )}
+          {(() => {
+            const active = tabs.find(({ name }) => name === activeTab);
+            if (!active) return null;
+            const { Component } = active;
+            return (
+              <div className="settings-tab__content">
+                <Component />
+              </div>
+            );
+          })()}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/views/settings/SettingsTab.tsx` around lines 30 - 36, The current
rendering iterates tabs with tabs.map(({ Component, name }) => activeTab ===
name ? <div className="settings-tab__content" key={name}><Component /></div> :
null), which is noisy; replace it by selecting the active tab once (e.g., const
active = tabs.find(t => t.name === activeTab)) and then render a single
conditional block like active ? <div
className="settings-tab__content"><active.Component /></div> to avoid mapping to
many nulls and simplify logic; reference the tabs array, activeTab variable, and
the Component/name properties when making this change.
src/views/templates/list/filters/useArchitectureFilter.ts (1)

16-21: Optional cleanup: remove unreachable nullish fallback in architecture item mapping.

Because the list is already filtered with .filter(Boolean), arch ?? OTHER and arch ?? t(OTHER) are not hit in practice. You can simplify this for readability.

♻️ Suggested simplification
-      getUniqueTemplateArchitectures(templates)
-        .filter(Boolean)
-        .map((arch) => ({
-          id: arch ?? OTHER,
-          title: arch ?? t(OTHER),
-        })),
+      getUniqueTemplateArchitectures(templates)
+        .filter((arch): arch is string => Boolean(arch))
+        .map((arch) => ({
+          id: arch,
+          title: arch,
+        })),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/views/templates/list/filters/useArchitectureFilter.ts` around lines 16 -
21, The mapping over architectures in
getUniqueTemplateArchitectures(templates).filter(Boolean).map(...) contains
unreachable nullish fallbacks (arch ?? OTHER and arch ?? t(OTHER)); remove the
?? fallbacks and map using arch directly so each item becomes { id: arch, title:
arch && t ? t(arch) : arch } or simply { id: arch, title: t ? t(arch) : arch }
depending on where translation is expected; update the map in
useArchitectureFilter.ts to use arch directly and drop the OTHER fallback to
improve readability and avoid redundant checks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/views/settings/SettingsTab.tsx`:
- Around line 30-36: The current rendering iterates tabs with tabs.map(({
Component, name }) => activeTab === name ? <div
className="settings-tab__content" key={name}><Component /></div> : null), which
is noisy; replace it by selecting the active tab once (e.g., const active =
tabs.find(t => t.name === activeTab)) and then render a single conditional block
like active ? <div className="settings-tab__content"><active.Component /></div>
to avoid mapping to many nulls and simplify logic; reference the tabs array,
activeTab variable, and the Component/name properties when making this change.

In `@src/views/templates/list/filters/useArchitectureFilter.ts`:
- Around line 16-21: The mapping over architectures in
getUniqueTemplateArchitectures(templates).filter(Boolean).map(...) contains
unreachable nullish fallbacks (arch ?? OTHER and arch ?? t(OTHER)); remove the
?? fallbacks and map using arch directly so each item becomes { id: arch, title:
arch && t ? t(arch) : arch } or simply { id: arch, title: t ? t(arch) : arch }
depending on where translation is expected; update the map in
useArchitectureFilter.ts to use arch directly and drop the OTHER fallback to
improve readability and avoid redundant checks.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1ba411ac-1225-4e9f-837e-3f7a7be85595

📥 Commits

Reviewing files that changed from the base of the PR and between eb8433e and 0347275.

📒 Files selected for processing (16)
  • cypress/support/commands.ts
  • cypress/tests/gating/template-list.cy.ts
  • src/utils/components/ListPageFilter/ListPageFilter.tsx
  • src/utils/components/ListPageFilter/components/RowFilters.tsx
  • src/utils/components/ListPageFilter/types.ts
  • src/utils/components/ListPageFilter/utils.ts
  • src/utils/utils/architecture.ts
  • src/views/settings/SettingsTab.tsx
  • src/views/templates/list/VirtualMachineTemplatesList.tsx
  • src/views/templates/list/filters/useArchitectureFilter.ts
  • src/views/templates/list/filters/useTypeFilter.ts
  • src/views/templates/list/filters/useTypeFilter.tsx
  • src/views/templates/list/filters/useVirtualMachineTemplatesFilters.ts
  • src/views/templates/list/hooks/useAllTemplateResources.ts
  • src/views/templates/list/virtualMachineTemplatesDefinition.tsx
  • src/views/templates/utils/utils.ts
💤 Files with no reviewable changes (1)
  • src/views/templates/list/filters/useTypeFilter.ts
✅ Files skipped from review due to trivial changes (2)
  • src/utils/utils/architecture.ts
  • src/views/templates/list/VirtualMachineTemplatesList.tsx
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/utils/components/ListPageFilter/utils.ts
  • cypress/tests/gating/template-list.cy.ts
  • src/utils/components/ListPageFilter/ListPageFilter.tsx
  • src/views/templates/utils/utils.ts
  • src/views/templates/list/filters/useTypeFilter.tsx
  • src/utils/components/ListPageFilter/types.ts

@upalatucci
Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Passed code review, ready for merge label Apr 21, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 21, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adamviktora, galkremer1, upalatucci

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:
  • OWNERS [adamviktora,galkremer1,upalatucci]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@adamviktora
Copy link
Copy Markdown
Member Author

/retest

1 similar comment
@upalatucci
Copy link
Copy Markdown
Member

/retest

@openshift-ci openshift-ci Bot removed the lgtm Passed code review, ready for merge label Apr 21, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 21, 2026

New changes are detected. LGTM label has been removed.

@upalatucci
Copy link
Copy Markdown
Member

/retest

1 similar comment
@galkremer1
Copy link
Copy Markdown
Member

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 25, 2026

@adamviktora: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/kubevirt-e2e-aws 460a83a link true /test kubevirt-e2e-aws

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.

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ CI Failure Escalation

Automated regex triage could not classify this failure.

@coderabbitai Please analyze the build logs linked below.
If you determine the root cause is an infrastructure issue, network timeout,
or environment setup flake, please reply with exactly /retest on a new line.
Otherwise, explain the code failure.

Build Logs

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
curl -s "https://storage.googleapis.com/test-platform-results/pr-logs/pull/kubevirt-ui_kubevirt-plugin/3819/pull-ci-kubevirt-ui-kubevirt-plugin-main-kubevirt-e2e-aws/2047827144553271296/build-log.txt" | tail -300

Length of output: 17086


@adamviktora — The CI run completed successfully for most tests (46/59 passing), but there are 3 real failures — this is not an infrastructure or flake-only issue, so I won't issue /retest. Here's the breakdown:


❌ Failure 1 — filter templates by Provider (template-list.cy.ts:42)

AssertionError: Timed out retrying after 60000ms:
Expected <a.co-resource-item__resource-name> not to exist in the DOM,
but it was continuously found.

This test was previously skipped and is now re-enabled in this PR. The filter appears to apply but does not remove unmatched template rows from view within 60 seconds. This may be related to the switch from checkbox.check({ force: true }) to .click() on the filter row — the click may not be reliably triggering the filter, or there's a debounce/render delay that requires an additional wait or UI interaction (e.g., a dropdown close step).


❌ Failure 2 — Type filter should work after enabling VM templates feature (template-list.cy.ts:70)

AssertionError: Timed out retrying after 60000ms:
Expected to find element: `[data-test-id="rhel9-server-small"]`, but never found it.

This is a new test introduced in this PR and it's failing. After cy.toggleVMTemplatesFeature(true) and navigating back to the templates page, selecting the templates type filter doesn't surface the expected rhel9-server-small entry. Possible root causes:

  • The toggleVMTemplatesFeature command isn't fully waiting for the feature flag to propagate before navigation resumes.
  • The page may not be re-fetching/re-rendering templates after the feature flag is toggled, requiring a manual reload.
  • The useTypeFilter(featureEnabled) logic or the underlying useListPageFilter using allTemplatesWithRequests may not be filtering correctly when the feature is enabled mid-session.

⚠️ Failure 3 — verify live migration limits in HCO (commands.ts:36)

AssertionError: expected '2' to include '1'

This is checking an HCO live migration value and getting '2' instead of '1'. This appears to be a pre-existing flake caused by test environment state (the prior test sets parallelOutboundMigrationsPerNode to 2, and the verification may be reading a stale or different field). This is likely unrelated to this PR and may resolve on retest — but the other two failures need code fixes first.


Summary:

# Test Root Cause Related to PR?
1 filter templates by Provider Filter click interaction not working Yes (test changes)
2 Type filter with VM templates feature Feature toggle / filter logic issue Yes (new test + new code)
3 verify live migration limits in HCO Env state / pre-existing flake Unlikely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved This issue is something we want to fix jira/valid-reference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants