Skip to content

feat:minor key changes for tags - #5981

Merged
openshift-merge-bot[bot] merged 1 commit into
opendatahub-io:mainfrom
claudialphonse78:feat/fs-global-search-tags
Jan 13, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
opendatahub-io:mainfrom
claudialphonse78:feat/fs-global-search-tags

Conversation

@claudialphonse78

@claudialphonse78 claudialphonse78 commented Jan 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR contains minor key changes from matched_tag to matched_tags wrt Feast global search changes
with support for single and multiple tags

Screenshot 2026-01-13 at 9 20 33 PM

How Has This Been Tested?

  1. Search for changes on the global search available on the overview or the feature store resource pages.

Test Impact

  1. Tests changes added

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)
  • The code follows our Best Practices (React coding standards, PatternFly usage, performance considerations)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

@coderabbitai

coderabbitai Bot commented Jan 13, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This pull request renames the matched_tag field to matched_tags across the feature store codebase. The changes include updates to type definitions, mock data, component implementations, hooks, and test files. The rename is applied consistently across seven files: the core type definition in search.ts, the public API hook useFeatureStoreSearch.ts, the interface ISearchItem in useSearchHandlers.ts, the mock data provider, the component that renders search results, test utilities, and both unit and end-to-end test files. No changes to control flow, logic, or surrounding functionality are introduced.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description addresses what was changed and includes a screenshot, but lacks detailed testing instructions and leaves the UX team tagging unchecked. Clarify: (1) specific test steps/commands run, (2) test environment details, (3) whether UX team tagging was intentionally skipped, and (4) confirmation of cluster testing completion.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat:minor key changes for tags' accurately captures the main change: renaming matched_tag to matched_tags across the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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


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.

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/feature-store/src/components/FeatureStoreGlobalSearch/utils/__tests__/searchUtils.spec.ts (1)

467-543: Update test descriptions and comments to reflect the renamed property.

The test descriptions and inline comments still reference matched_tag (singular), but the property has been renamed to matched_tags (plural). Update these for consistency:

  • Line 467: "should preserve matched_tags property when grouping items"
  • Line 506: // Verify matched_tags is preserved for first item
  • Line 511: // Verify matched_tags is preserved for second item
  • Line 519: // Verify item without matched_tags doesn't have it
  • Line 525: "should handle items with empty matched_tags object"
📝 Suggested updates
-    it('should preserve matched_tag property when grouping items', () => {
+    it('should preserve matched_tags property when grouping items', () => {
-      // Verify matched_tag is preserved for first item
+      // Verify matched_tags is preserved for first item
-      // Verify matched_tag is preserved for second item
+      // Verify matched_tags is preserved for second item
-      // Verify item without matched_tag doesn't have it
+      // Verify item without matched_tags doesn't have it
-    it('should handle items with empty matched_tag object', () => {
+    it('should handle items with empty matched_tags object', () => {
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e354626 and 7c04162.

📒 Files selected for processing (7)
  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
  • packages/feature-store/src/__mocks__/mockGlobalSearch.ts
  • packages/feature-store/src/apiHooks/useFeatureStoreSearch.ts
  • packages/feature-store/src/components/FeatureStoreGlobalSearch/GlobalSearchInput.tsx
  • packages/feature-store/src/components/FeatureStoreGlobalSearch/hooks/useSearchHandlers.ts
  • packages/feature-store/src/components/FeatureStoreGlobalSearch/utils/__tests__/searchUtils.spec.ts
  • packages/feature-store/src/types/search.ts
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/cypress-e2e.mdc)

**/*.{ts,tsx}: Run linting from the packages/cypress directory with npm run lint -- --fix before claiming test is complete - all linting errors must be fixed
Use object destructuring for variables, proper formatting and spacing, no unused variables or imports, avoid any types unless absolutely necessary, and follow existing code patterns

Files:

  • packages/feature-store/src/components/FeatureStoreGlobalSearch/hooks/useSearchHandlers.ts
  • packages/feature-store/src/apiHooks/useFeatureStoreSearch.ts
  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
  • packages/feature-store/src/components/FeatureStoreGlobalSearch/GlobalSearchInput.tsx
  • packages/feature-store/src/components/FeatureStoreGlobalSearch/utils/__tests__/searchUtils.spec.ts
  • packages/feature-store/src/types/search.ts
  • packages/feature-store/src/__mocks__/mockGlobalSearch.ts
**/*.{cy.ts,ts}

📄 CodeRabbit inference engine (.cursor/rules/cypress-e2e.mdc)

Never hardcode namespaces in tests or utilities - always derive namespaces from test variables using Cypress.env('APPLICATIONS_NAMESPACE') or similar environment variables loaded from test-variables.yml

Files:

  • packages/feature-store/src/components/FeatureStoreGlobalSearch/hooks/useSearchHandlers.ts
  • packages/feature-store/src/apiHooks/useFeatureStoreSearch.ts
  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
  • packages/feature-store/src/components/FeatureStoreGlobalSearch/utils/__tests__/searchUtils.spec.ts
  • packages/feature-store/src/types/search.ts
  • packages/feature-store/src/__mocks__/mockGlobalSearch.ts
**/*.{tsx,ts}

📄 CodeRabbit inference engine (.cursor/rules/cypress-mock.mdc)

Use data-testid attributes with kebab-case naming (e.g., message-input, delete-button, user-settings-form) on all interactive elements, buttons, inputs, forms, modals, and key UI components

Files:

  • packages/feature-store/src/components/FeatureStoreGlobalSearch/hooks/useSearchHandlers.ts
  • packages/feature-store/src/apiHooks/useFeatureStoreSearch.ts
  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
  • packages/feature-store/src/components/FeatureStoreGlobalSearch/GlobalSearchInput.tsx
  • packages/feature-store/src/components/FeatureStoreGlobalSearch/utils/__tests__/searchUtils.spec.ts
  • packages/feature-store/src/types/search.ts
  • packages/feature-store/src/__mocks__/mockGlobalSearch.ts
**/*.{ts,tsx,cy.ts}

📄 CodeRabbit inference engine (.cursor/rules/cypress-mock.mdc)

Use selector priority in order: (1) data-testid (REQUIRED), (2) findByLabelText/findByRole (only if testID cannot be added), (3) Text content (only for non-interactive elements), NEVER use DOM structure, CSS classes, or placeholders

Files:

  • packages/feature-store/src/components/FeatureStoreGlobalSearch/hooks/useSearchHandlers.ts
  • packages/feature-store/src/apiHooks/useFeatureStoreSearch.ts
  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
  • packages/feature-store/src/components/FeatureStoreGlobalSearch/GlobalSearchInput.tsx
  • packages/feature-store/src/components/FeatureStoreGlobalSearch/utils/__tests__/searchUtils.spec.ts
  • packages/feature-store/src/types/search.ts
  • packages/feature-store/src/__mocks__/mockGlobalSearch.ts
**/*.cy.ts

📄 CodeRabbit inference engine (.cursor/rules/cypress-e2e.mdc)

**/*.cy.ts: Load test variables using cy.getTestConfig().then((config) => { ... }) pattern
Load fixtures using cy.fixture('e2e/path/file.yaml') pattern
Use descriptive test file names matching feature area, e.g., testFeatureName.cy.ts for main functionality
Specify tags in the test file within the it() block options, e.g., it('...', { tags: ['@Tag'] }, ...) - never in fixture files
Never use cy.findByTestId() directly in tests - all UI interactions must go through page objects
Never use cy.findByRole() directly in tests - all UI interactions must go through page objects
Do not call cy.get() directly in test files; use it only inside page-object find... helper methods
All UI interactions must go through page objects - if a test ID exists but no page object, create the page object method; if test ID doesn't exist, create both the test ID and page object method
Use .navigate() methods when available instead of cy.visit() for navigation
Use cy.step('Description') instead of cy.log() for test documentation - steps auto-number and provide better test reporting
Never use cy.wait(milliseconds) for arbitrary time periods - use OC commands to wait for resource state changes or wait for specific UI elements with proper selectors
Use OC commands to wait for resource readiness, e.g., cy.exec('oc wait --for=condition=Ready pod/my-pod --timeout=300s')
Prefer test ID validation over text validation - use data-testid attributes for validation when possible; avoid text-based assertions unless absolutely necessary
Add [Product Bug: JIRA-XXXXX] prefix to describe block when quarantining a test due to a product bug, e.g., describe('[Product Bug: RHOAIENG-12345] Feature Name', () => { ... })
Add [Automation Bug: JIRA-XXXXX] prefix to describe block when quarantining a test due to an automation issue, e.g., describe('[Automation Bug: RHOAIENG-12345] Feature Name', () => { ... })
Add @Bug tag to the tags array when quarantining a test due to a pr...

Files:

  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
packages/cypress/cypress/tests/mocked/**/*.cy.ts

📄 CodeRabbit inference engine (.cursor/rules/cypress-mock.mdc)

packages/cypress/cypress/tests/mocked/**/*.cy.ts: Organize mock tests in packages/cypress/cypress/tests/mocked/ directory with file naming like featureName.cy.ts and one file per page or feature area
Use MANDATORY describe/it structure with beforeEach for common setup. Avoid using tags or cy.step() in mock tests (exception: GenAI module uses tags and cy.step() per team decision)
Always mock ALL network requests - use cy.interceptOdh() for Dashboard API endpoints, cy.interceptK8s() for single Kubernetes resources, cy.interceptK8sList() for Kubernetes lists. Never make real network requests in mock tests.
Use proper describe/it structure with specific validation in wait methods. Always validate specific text content in wait methods, not just existence: cy.findByTestId('app-page-title').should('have.text', 'User management')
Validate actual request payloads in interceptors using JSONPath operations: expect(interception.request.body).to.eql([{ value: [...], op: 'replace', path: '...' }])
Test access control by creating separate tests: one outside describe block with non-admin users, and a describe block with admin-only tests. Use appropriate user mocks: asProductAdminUser(), asProjectAdminUser(), asProjectEditUser()
Test feature flags by mocking dashboard config with disabled flags: mockDashboardConfig({ disableFeatureName: true })
Test error handling by mocking failed API responses and validating error messages are displayed to users
Include accessibility testing in all tests by calling cy.testA11y() in page object wait methods and after page state changes
Apply minimal mocking principle: only mock endpoints necessary for the test. Don't over-mock endpoints that aren't used.
Never use tags or cy.step() in mock tests for general dashboard features. Exception: GenAI module uses tags and cy.step() in mock tests (team decision).
For table sorting tests, use helper utilities: `table.findTableHeaderButton('Name').should(be.sortAscendin...

Files:

  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
packages/cypress/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/cypress-mock.mdc)

Always run linting before claiming test is complete: cd packages/cypress && npm run lint -- --fix. Fix ALL linting errors including object destructuring, formatting, unused variables, and proper TypeScript types.

Files:

  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
packages/cypress/cypress/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/cypress-mock.mdc)

Create test helper functions for repeated test patterns. Use initIntercepts() pattern to consolidate multiple cy.intercept* calls into single function for reusability across tests.

Files:

  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
🧠 Learnings (5)
📚 Learning: 2025-12-09T21:53:53.864Z
Learnt from: DaoDaoNoCode
Repo: opendatahub-io/odh-dashboard PR: 5521
File: packages/kserve/src/hardware.ts:1-33
Timestamp: 2025-12-09T21:53:53.864Z
Learning: Guideline: In TypeScript, you can use import type { foo } and reference it as Parameters<typeof foo> or ReturnType<typeof foo> in type-only positions (e.g., return types, type aliases). This compiles when typeof foo is used exclusively in type positions and the runtime code does not reference the imported symbol. Use this to avoid pulling runtime values into emitted code while preserving function type information. Apply to all TypeScript files (/**/*.ts) where function types are needed for type utilities.

Applied to files:

  • packages/feature-store/src/components/FeatureStoreGlobalSearch/hooks/useSearchHandlers.ts
  • packages/feature-store/src/apiHooks/useFeatureStoreSearch.ts
  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
  • packages/feature-store/src/components/FeatureStoreGlobalSearch/utils/__tests__/searchUtils.spec.ts
  • packages/feature-store/src/types/search.ts
  • packages/feature-store/src/__mocks__/mockGlobalSearch.ts
📚 Learning: 2026-01-09T09:09:00.525Z
Learnt from: ChughShilpa
Repo: opendatahub-io/odh-dashboard PR: 5898
File: packages/cypress/cypress/tests/e2e/modelTraining/testTrainjobProgression.cy.ts:112-179
Timestamp: 2026-01-09T09:09:00.525Z
Learning: In Cypress tests under packages/cypress, use cy.log() for conditional informational messages (such as skip notices) and use cy.step() to document actual test steps and actions. This distinguishes setup/conditions from the steps that define test execution, improving readability and traceability of test flows across the Cypress test suite.

Applied to files:

  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
📚 Learning: 2026-01-09T21:21:06.041Z
Learnt from: nananosirova
Repo: opendatahub-io/odh-dashboard PR: 5631
File: packages/cypress/cypress/pages/pipelines/mlflowExperiments.ts:3-4
Timestamp: 2026-01-09T21:21:06.041Z
Learning: Enforce architectural boundaries in Cypress test packages by disallowing imports from frontend/source code (e.g., frontend/src) in tests under packages/cypress. This includes constants; use shared test utilities or mock data instead. This restriction is enforced by ESLint rules (no-restricted-syntax) to prevent triggering restricted syntax patterns and to maintain separation between Cypress tests and frontend implementation. Apply this pattern to all TypeScript files under packages/cypress (e.g., packages/cypress/**/*.ts, and extend to ts/tsx as needed).

Applied to files:

  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
📚 Learning: 2026-01-09T21:22:33.830Z
Learnt from: nananosirova
Repo: opendatahub-io/odh-dashboard PR: 5631
File: packages/cypress/cypress/tests/mocked/pipelines/mlflowExperiments.cy.ts:6-9
Timestamp: 2026-01-09T21:22:33.830Z
Learning: In the odh-dashboard repository, Cypress tests under packages/cypress must not import constants or implementation code from frontend/src due to eslint no-restricted-syntax rules that enforce test isolation. If a value is needed in tests, duplicate simple constants within the test file instead of importing from frontend. This preserves test isolation and prevents cross-package coupling.

Applied to files:

  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
📚 Learning: 2026-01-09T21:22:40.332Z
Learnt from: nananosirova
Repo: opendatahub-io/odh-dashboard PR: 5631
File: packages/cypress/cypress/pages/pipelines/mlflowExperiments.ts:3-4
Timestamp: 2026-01-09T21:22:40.332Z
Learning: In the odh-dashboard repository, Cypress tests under packages/cypress must not import frontend code (e.g., odh-dashboard/internal or frontend/src). Enforce this with eslint no-restricted-syntax rules to maintain architectural boundaries. If a constant is needed in tests, duplicate a simple constant instead of importing or disabling the rule; prefer maintainability and avoid cross-layer imports.

Applied to files:

  • packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Type-Check
  • GitHub Check: Get-Test-Groups
  • GitHub Check: Lint
  • GitHub Check: Cypress-Setup
🔇 Additional comments (9)
packages/feature-store/src/types/search.ts (1)

3-11: LGTM!

The type rename from matched_tag to matched_tags is semantically correct—the Record<string, string> type inherently supports multiple key-value pairs, and the plural naming better reflects this capability. The change aligns with the upstream Feast API changes.

packages/feature-store/src/components/FeatureStoreGlobalSearch/hooks/useSearchHandlers.ts (1)

6-15: LGTM!

The ISearchItem interface correctly mirrors the GlobalSearchResult type rename. The property change is consistent with the core type definition.

packages/feature-store/src/components/FeatureStoreGlobalSearch/GlobalSearchInput.tsx (1)

286-307: LGTM!

The property access is correctly updated to use matched_tags. The conditional rendering and iteration logic remain sound.

Note: The data-testid attribute global-search-matched-tag-${key} uses singular "tag" which is appropriate since each rendered label represents a single key-value pair.

packages/cypress/cypress/tests/mocked/featureStore/featureEntities.cy.ts (2)

635-666: LGTM!

The test correctly verifies single matched tag display. The mock data modification at line 643 properly uses the renamed matched_tags property, and the assertions validate both visibility and content.


668-709: LGTM!

The test for multiple matched tags is well-structured—it covers displaying several tags simultaneously and validates each one individually. The test data at line 676-680 demonstrates proper usage of the matched_tags object with multiple entries.

packages/feature-store/src/__mocks__/mockGlobalSearch.ts (1)

90-109: LGTM!

The transformToSearchItems function correctly updates both the return type annotation (line 99) and the property mapping (line 108) to use matched_tags. The pass-through of the optional property is appropriate—tests can inject matched_tags via the partial parameter when needed.

packages/feature-store/src/apiHooks/useFeatureStoreSearch.ts (1)

16-16: LGTM! Property rename is consistent with the Feast API changes.

The rename from matched_tag to matched_tags is correctly applied in both the return type definition and the data transformation logic. The ESLint disable comment is appropriate since the property name follows the API's snake_case convention.

Also applies to: 60-61

packages/feature-store/src/components/FeatureStoreGlobalSearch/utils/__tests__/searchUtils.spec.ts (2)

89-108: LGTM! Test helper updated correctly.

The createMockSearchItem helper function is properly updated to use matched_tags in both the parameter name and the returned object property.


506-542: LGTM! Test assertions correctly updated.

The assertions properly verify the matched_tags property, including cases for:

  • Single tag object
  • Multiple tags object
  • Undefined (when not provided)
  • Empty object

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

/lgtm

@codecov

codecov Bot commented Jan 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.37%. Comparing base (72d6a43) to head (7c04162).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5981   +/-   ##
=======================================
  Coverage   64.37%   64.37%           
=======================================
  Files        2389     2389           
  Lines       71176    71176           
  Branches    17819    17819           
=======================================
+ Hits        45820    45823    +3     
+ Misses      25356    25353    -3     
Files with missing lines Coverage Δ
...eature-store/src/apiHooks/useFeatureStoreSearch.ts 60.43% <ø> (ø)
...nts/FeatureStoreGlobalSearch/GlobalSearchInput.tsx 88.76% <100.00%> (ø)
...eatureStoreGlobalSearch/hooks/useSearchHandlers.ts 98.59% <ø> (ø)

... and 19 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72d6a43...7c04162. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@openshift-ci

openshift-ci Bot commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dpanshug, manaswinidas

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-merge-bot
openshift-merge-bot Bot merged commit 505c7a4 into opendatahub-io:main Jan 13, 2026
52 checks passed
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