Skip to content

ROX-32569: Align layer type filter with backend search term#18422

Merged
sachaudh merged 2 commits intomasterfrom
ROX-32569-fix-layer-type-filter
Jan 12, 2026
Merged

ROX-32569: Align layer type filter with backend search term#18422
sachaudh merged 2 commits intomasterfrom
ROX-32569-fix-layer-type-filter

Conversation

@sachaudh
Copy link
Contributor

@sachaudh sachaudh commented Jan 9, 2026

Description

Fixes ROX-32569

The Layer type filter was silently failing because:

  • UI sent: Component Layer Type with APPLICATION/BASE_IMAGE
  • Backend expects: Component From Base Image with true/false

Changes:

  • Updated searchTerm to match backend field
  • Changed filter values from enums to booleans

User-facing documentation

  • CHANGELOG.md update not needed (bug fix, no user-facing behavior change)
  • Documentation PR not needed

Testing and quality

  • Production ready: gated by ROX_BASE_IMAGE_DETECTION feature flag

Automated testing

  • No automated tests added - filter attribute is a simple config object

How I validated my change

  • Verified search term matches backend proto definition (from_base_image field in image_component.proto)
  • Confirmed no TypeScript or linting errors

The Layer type filter was sending "Component Layer Type" with enum
values (APPLICATION/BASE_IMAGE), but the backend expects "Component
From Base Image" with boolean values (true/false).

This mismatch caused the filter to silently fail when filtering
components in Workload CVEs.

Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Jan 9, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@sachaudh sachaudh changed the title ROX-32569: align layer type filter with backend search term ROX-32569: Align layer type filter with backend search term Jan 9, 2026
@sachaudh sachaudh marked this pull request as ready for review January 9, 2026 16:01
@sachaudh sachaudh requested a review from a team as a code owner January 9, 2026 16:02
@rhacs-bot
Copy link
Contributor

rhacs-bot commented Jan 9, 2026

Images are ready for the commit at 598fe99.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.10.x-740-g598fe99ade.

@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.89%. Comparing base (f7aed22) to head (598fe99).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #18422      +/-   ##
==========================================
- Coverage   48.89%   48.89%   -0.01%     
==========================================
  Files        2629     2629              
  Lines      197912   197912              
==========================================
- Hits        96775    96764      -11     
- Misses      93756    93765       +9     
- Partials     7381     7383       +2     
Flag Coverage Δ
go-unit-tests 48.89% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sachaudh sachaudh requested a review from a team as a code owner January 9, 2026 17:52
Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>
@sachaudh sachaudh force-pushed the ROX-32569-fix-layer-type-filter branch from f41dd16 to 598fe99 Compare January 9, 2026 17:53
@sachaudh
Copy link
Contributor Author

sachaudh commented Jan 9, 2026

The layer type filter test was using filterChipGroupForCategory selectors which target .pf-v5-c-chip-group, but CompoundSearchFilterLabels renders filters using PatternFly's LabelGroup (.pf-v5-c-label-group). Updated to use the existing filterLabelGroup* selectors.

@openshift-ci
Copy link

openshift-ci bot commented Jan 9, 2026

@sachaudh: 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/ocp-4-12-nongroovy-e2e-tests 598fe99 link false /test ocp-4-12-nongroovy-e2e-tests

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.

@sachaudh sachaudh merged commit 0041570 into master Jan 12, 2026
89 of 90 checks passed
@sachaudh sachaudh deleted the ROX-32569-fix-layer-type-filter branch January 12, 2026 15:03
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