Skip to content

OCPBUGS-82505: Re-enable add-flow-ci.feature e2e tests disabled for createRoot adoption#16285

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
jhadvig:OCPBUGS-82505
May 20, 2026
Merged

OCPBUGS-82505: Re-enable add-flow-ci.feature e2e tests disabled for createRoot adoption#16285
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
jhadvig:OCPBUGS-82505

Conversation

@jhadvig
Copy link
Copy Markdown
Member

@jhadvig jhadvig commented Apr 15, 2026

Attempt to fix:

  • Catalog "CI/CD"
  • Catalog "Databases"

Summary by CodeRabbit

Release Notes

  • Refactor

    • Improved catalog search responsiveness through optimized handling of search keyword updates and URL navigation.
    • Enhanced filtering efficiency by restructuring how search, sorting, and attribute filtering operations are computed.
  • Tests

    • Updated test execution configurations to expand automated test coverage.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 15, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@jhadvig: This pull request references Jira Issue OCPBUGS-82505, which is invalid:

  • expected the bug to target either version "5.0." or "openshift-5.0.", but it targets "4.23.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Attempt to fix:

  • Catalog "CI/CD"
  • Catalog "Databases"

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 cajieh and sanketpathak April 15, 2026 11:05
@openshift-ci openshift-ci Bot added component/dev-console Related to dev-console component/shared Related to console-shared approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 15, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 15, 2026

📝 Walkthrough

Walkthrough

This pull request refactors the catalog filtering logic to improve rendering performance using React's concurrent rendering features. The search keyword update is now wrapped in startTransition() to deprioritize URL parameter updates. Filtering computation is split into two separate memos for search/category operations and attribute filtering. Filter count state updates are extracted from the memos into a dedicated useEffect hook, shifting from synchronous computation to effect-driven updates. Additionally, a test feature file's tag set is modified to include the feature in additional test suite runs.

🚥 Pre-merge checks | ✅ 10
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the PR's main objective: re-enabling previously disabled e2e tests (add-flow-ci.feature) as part of addressing createRoot adoption issues (OCPBUGS-82505).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed PR modifies only React/TypeScript component and Cucumber feature file; no Ginkgo test files present, making this check not applicable.
Test Structure And Quality ✅ Passed The custom check for Ginkgo test code is not applicable to this PR, which modifies a React component and Gherkin feature file specification using a Cypress-based BDD testing approach, not Ginkgo (Go testing framework).
Microshift Test Compatibility ✅ Passed PR does not introduce new Ginkgo e2e tests. Changes include a React component modification and removal of @to-do tag from a Cucumber feature file, neither of which triggers this Ginkgo-specific check.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR does not introduce new Ginkgo e2e tests. Changes consist of React component refactoring and re-enabling a Gherkin feature file, neither of which are Ginkgo test patterns.
Topology-Aware Scheduling Compatibility ✅ Passed Pull request contains only React/TypeScript frontend UI component refactoring and test configuration changes with no Kubernetes scheduling constraints, topology-dependent logic, or deployment manifests.
Ote Binary Stdout Contract ✅ Passed OTE Binary Stdout Contract check is inapplicable. PR modifies TypeScript React components and Gherkin feature files only, with no Go code or test binaries subject to stdout JSON communication contracts.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR does not add or modify any Ginkgo e2e tests, making the custom check not applicable.

✏️ 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
Contributor

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

Caution

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

⚠️ Outside diff range comments (1)
frontend/packages/console-shared/src/components/catalog/catalog-view/CatalogView.tsx (1)

202-264: ⚠️ Potential issue | 🟠 Major

Remove debug logging before merge — this will execute in production.

The console.log and console.table calls within this memo will fire in production whenever a user applies search keywords or attribute filters. This:

  1. Exposes internal implementation details (relevance scoring algorithm, Red Hat priority logic)
  2. Leaks catalog metadata to the browser console (provider names, item types)
  3. Adds performance overhead — building tableData array and serializing to console on every filter action

If this instrumentation is needed for the e2e test debugging referenced in the PR, consider gating it behind a process.env.NODE_ENV === 'development' check or a feature flag. Better yet, remove it entirely and rely on React DevTools or dedicated test logging.

🔧 Proposed fix to remove debug logging
   const filteredItems: CatalogItem[] = useMemo(() => {
     const filteredByAttributes = filterByAttributes(filteredBySearchItems, activeFilters);
-
-    // Console table for final filtered results (only for operators)
-    if (filteredByAttributes.length > 0) {
-      // Check if we have active filters beyond just search and category
-      const hasAttributeFilters = Object.values(activeFilters).some((filterGroup) =>
-        Object.values(filterGroup).some((filter) => filter.active),
-      );
-
-      // Only show console.table if we have search term or attribute filters
-      if (activeSearchKeyword || hasAttributeFilters) {
-        const REDHAT_PRIORITY = {
-          EXACT_MATCH: 2,
-          CONTAINS_REDHAT: 1,
-          NON_REDHAT: 0,
-        };
-
-        const tableData = filteredByAttributes.map((item) => {
-          // Ensure we have the scoring properties, calculate them if missing
-          const relevanceScore = activeSearchKeyword
-            ? (item as any).relevanceScore ??
-              calculateCatalogItemRelevanceScore(activeSearchKeyword, item)
-            : 'N/A (No search)';
-          const redHatPriority = (item as any).redHatPriority ?? getRedHatPriority(item);
-
-          return {
-            Title: item.name || 'N/A',
-            'Search Relevance Score': relevanceScore,
-            'Is Red Hat Provider (Priority)':
-              redHatPriority === REDHAT_PRIORITY.EXACT_MATCH
-                ? `Exact Match (${REDHAT_PRIORITY.EXACT_MATCH})`
-                : redHatPriority === REDHAT_PRIORITY.CONTAINS_REDHAT
-                ? `Contains Red Hat (${REDHAT_PRIORITY.CONTAINS_REDHAT})`
-                : `Non-Red Hat (${REDHAT_PRIORITY.NON_REDHAT})`,
-            Provider: item.attributes?.provider || item.provider || 'N/A',
-            Type: item.type || 'N/A',
-          };
-        });
-
-        // Build filter description
-        const activeFilterDescriptions = [];
-        if (activeSearchKeyword) activeFilterDescriptions.push(`Search: "${activeSearchKeyword}"`);
-        if (activeCategoryId !== 'all')
-          activeFilterDescriptions.push(`Category: ${activeCategoryId}`);
-
-        Object.entries(activeFilters).forEach(([filterType, filterGroup]) => {
-          const activeFilterValues = Object.entries(filterGroup)
-            .filter(([, filter]) => filter.active)
-            .map(([, filter]) => filter.label || filter.value);
-          if (activeFilterValues.length > 0) {
-            activeFilterDescriptions.push(`${filterType}: [${activeFilterValues.join(', ')}]`);
-          }
-        });
-
-        const filterDescription =
-          activeFilterDescriptions.length > 0 ? activeFilterDescriptions.join(' + ') : 'No filters';
-
-        // eslint-disable-next-line no-console
-        console.log(
-          `\n🎯 FINAL Catalog Results: ${filterDescription} (${filteredByAttributes.length} matches)`,
-        );
-        // eslint-disable-next-line no-console
-        console.table(tableData);
-      }
-    }
-
     return filteredByAttributes;
-  }, [activeCategoryId, activeFilters, activeSearchKeyword, filteredBySearchItems]);
+  }, [activeFilters, filteredBySearchItems]);

Note: If the debug logging is removed, activeCategoryId and activeSearchKeyword can also be dropped from the dependency array since they're only used in the logging block.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@frontend/packages/console-shared/src/components/catalog/catalog-view/CatalogView.tsx`
around lines 202 - 264, Remove the production debug logging in the CatalogView
memo: eliminate the console.log and console.table calls (and the tableData
construction if only used for logging) inside the filteredByAttributes block, or
gate them behind a dev-only check (e.g., process.env.NODE_ENV === 'development'
or a feature flag) so they never run in production; update the CatalogView logic
that builds tableData and the activeFilterDescriptions accordingly and, if you
remove the logging and tableData entirely, also remove activeCategoryId and
activeSearchKeyword from the memo dependency array and any related unused
variables (references: CatalogView component, filteredByAttributes,
activeSearchKeyword, activeFilters, activeCategoryId, tableData).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In
`@frontend/packages/console-shared/src/components/catalog/catalog-view/CatalogView.tsx`:
- Around line 202-264: Remove the production debug logging in the CatalogView
memo: eliminate the console.log and console.table calls (and the tableData
construction if only used for logging) inside the filteredByAttributes block, or
gate them behind a dev-only check (e.g., process.env.NODE_ENV === 'development'
or a feature flag) so they never run in production; update the CatalogView logic
that builds tableData and the activeFilterDescriptions accordingly and, if you
remove the logging and tableData entirely, also remove activeCategoryId and
activeSearchKeyword from the memo dependency array and any related unused
variables (references: CatalogView component, filteredByAttributes,
activeSearchKeyword, activeFilters, activeCategoryId, tableData).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: d74c5176-da75-4993-9bbc-d3bfb58cd086

📥 Commits

Reviewing files that changed from the base of the PR and between 6a8db8b and 8363a01.

📒 Files selected for processing (2)
  • frontend/packages/console-shared/src/components/catalog/catalog-view/CatalogView.tsx
  • frontend/packages/dev-console/integration-tests/features/e2e/add-flow-ci.feature
📜 Review details
🧰 Additional context used
🔀 Multi-repo context openshift/console-operator

[::openshift/console-operator::] pkg/console/subresource/consoleserver/types.go: lines ~112-170 — definitions/comments for developerCatalog / CatalogTypesState / DeveloperConsoleCatalogTypes (server-side console config that controls shown developer catalog categories/types).

[::openshift/console-operator::] pkg/console/subresource/consoleserver/config_builder_test.go: multiple tests (see hits at ~lines 363, 396, 435, 516, 556 and duplicates at ~1205, 1231, 1262, 1327, 1362) exercising config builder behavior for developer catalog categories/types.

[::openshift/console-operator::] vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_console_01_consoles.crd.yaml: lines ~158-247 — CRD manifests documenting developerCatalog fields (categories/types enabled/disabled).

[::openshift/console-operator::] vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go and vendor/github.com/openshift/api/console/v1/* — generated API docs referencing "developerCatalog", "catalog types", and sample/catalog-related fields.

Summary / impact:

  • I did not find any frontend TypeScript/React consumers (e.g., CatalogView, CatalogQueryParams, add-flow-ci) in this repository. The console-operator repo contains server-side configuration and CRD artifacts for developerCatalog categories/types that influence what appears in the frontend catalog, but no direct code that would break from the CatalogView render/URL update changes in the PR.
  • Relevant cross-repo artifacts: CRD docs and server config builder tests around developerCatalog that could affect catalog availability (categories/types), but they do not reference the frontend component APIs changed in this PR.
🔇 Additional comments (5)
frontend/packages/dev-console/integration-tests/features/e2e/add-flow-ci.feature (1)

1-1: Tag update correctly re-enables this feature in active suites.

Switching to @add-flow @smoke`` is aligned with the stated goal of bringing this E2E back into regular CI coverage.

frontend/packages/console-shared/src/components/catalog/catalog-view/CatalogView.tsx (4)

2-2: LGTM — correct import for concurrent features.

The startTransition API is appropriate for React 18's concurrent rendering model and aligns with the fix described in the PR objectives.


138-149: Good use of startTransition for input handling.

Wrapping the URL update in startTransition correctly deprioritizes the navigation side-effect, preventing React from interrupting user input with a synchronous re-render. The inline comment provides solid rationale for future maintainers.

This pattern ensures the SearchInput component remains stable during rapid typing—critical for both UX and e2e test stability under Cypress.


269-280: Sound architectural fix — note the async timing behavior.

Moving setFilterGroupCounts and setCatalogTypeCounts out of the memo into a useEffect correctly addresses the anti-pattern of calling setState during render. Under React 18's concurrent model, this was causing the DOM instability described in the PR.

One subtlety: counts now update asynchronously after render, so there's a brief window where catalogTypeCounts is {}. The CatalogTypeSelector component (from context snippet 4) gates tab rendering on typeCount > 0, meaning type tabs won't render during that first frame. In practice this is likely imperceptible, and the trade-off is acceptable given the concurrent rendering fix.

If the flash becomes noticeable in testing, useLayoutEffect would run synchronously before paint—though useEffect is the right default here.


194-197: Clean separation of filtering stages.

Extracting the category + keyword filtering into filteredBySearchItems provides a clear intermediate result that both filteredItems (for display) and the count computation useEffect can depend on. This avoids duplicating the filtering logic and makes the data flow explicit.

@jhadvig
Copy link
Copy Markdown
Member Author

jhadvig commented Apr 15, 2026

/retest

2 similar comments
@jhadvig
Copy link
Copy Markdown
Member Author

jhadvig commented Apr 16, 2026

/retest

@jhadvig
Copy link
Copy Markdown
Member Author

jhadvig commented Apr 16, 2026

/retest

@openshift-ci openshift-ci Bot added the component/core Related to console core functionality label Apr 17, 2026
@jhadvig
Copy link
Copy Markdown
Member Author

jhadvig commented Apr 20, 2026

/retest

1 similar comment
@jhadvig
Copy link
Copy Markdown
Member Author

jhadvig commented Apr 20, 2026

/retest

…reateRoot adoption

Replace setState-inside-useMemo anti-pattern in CatalogView with derived
useMemo values, preventing extra render cycles that detach DOM nodes during
Cypress interactions. Wrap search keyword URL updates in startTransition,
fix ConsoleSelect prop→state feedback loop, and use startTransition for
ImageSearch field resets. Split .clear().type() chains in catalog and
topology search helpers so Cypress re-queries the DOM between operations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci openshift-ci Bot added the component/topology Related to topology label Apr 22, 2026
@logonoff
Copy link
Copy Markdown
Member

logonoff commented May 1, 2026

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 1, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@logonoff: This pull request references Jira Issue OCPBUGS-82505, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

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.

@logonoff
Copy link
Copy Markdown
Member

/test all

@logonoff
Copy link
Copy Markdown
Member

wtf it passed??

/lgtm
/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 19, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@logonoff: This PR has been marked as verified by CI.

Details

In response to this:

wtf it passed??

/lgtm
/verified by CI

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 added the lgtm Indicates that a PR is ready to be merged. label May 19, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 19, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig, logonoff

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

@logonoff
Copy link
Copy Markdown
Member

/test all

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 19, 2026

@jhadvig: 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 ba72ee3 into openshift:main May 20, 2026
8 of 9 checks passed
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@jhadvig: Jira Issue Verification Checks: Jira Issue OCPBUGS-82505
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-82505 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

Attempt to fix:

  • Catalog "CI/CD"
  • Catalog "Databases"

Summary by CodeRabbit

Release Notes

  • Refactor

  • Improved catalog search responsiveness through optimized handling of search keyword updates and URL navigation.

  • Enhanced filtering efficiency by restructuring how search, sorting, and attribute filtering operations are computed.

  • Tests

  • Updated test execution configurations to expand automated test coverage.

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.

@logonoff
Copy link
Copy Markdown
Member

/cherry-pick release-4.22

@openshift-cherrypick-robot
Copy link
Copy Markdown

@logonoff: new pull request created: #16468

Details

In response to this:

/cherry-pick release-4.22

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.

@openshift-merge-robot
Copy link
Copy Markdown
Contributor

Fix included in release 5.0.0-0.nightly-2026-05-20-101113

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. component/core Related to console core functionality component/dev-console Related to dev-console component/shared Related to console-shared component/topology Related to topology jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants