Skip to content

ROX-33544: Add Tailored Profile tab to compliance coverage#19575

Draft
bradr5 wants to merge 1 commit intomasterfrom
bradr/ROX-33544_add_tailored_profile_tab_compliance_coverage
Draft

ROX-33544: Add Tailored Profile tab to compliance coverage#19575
bradr5 wants to merge 1 commit intomasterfrom
bradr/ROX-33544_add_tailored_profile_tab_compliance_coverage

Conversation

@bradr5
Copy link
Contributor

@bradr5 bradr5 commented Mar 24, 2026

Description

Adds a Tailored Profiles tab to compliance coverage so tailored profiles are separated from benchmark-based profiles.

Notes:

  • Tailored profiles (TAILORED_PROFILE) now show under a dedicated tab
  • Standard tabs still come from standard.shortName
  • Only show Other / Tailored Profiles when there are profiles for them
  • Centralized tab logic in getProfileTab / getStandardTabs
  • Fallback still uses profiles[0], not “first tab / first profile”
    • This will be changed in a future PR
  • Handle stale URL when the selected profile is no longer in the list (e.g. scan schedule filter applied)

The source of truth here is a little awkward because the API returns a flat list of profiles, while the UI groups those profiles into tabs by derived benchmark name. In other words, the tabs do not exist in the response shape and have to be built on the client from operatorKind and standards[].

That also means the route is still profile-first even though the UI feels tab-first. The selected tab is derived from the selected profile, so there is not really a single backend-provided source of truth for the tab state itself.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

Screenshot 2026-03-24 at 12 47 53 PM

Manual testing

  • PROFILE / OPERATOR_KIND_UNSPECIFIED

    • With a standard → shows under the benchmark tab (standard.shortName)
    • Without a standard → falls back to Other
    • Verified empty shortName values are ignored
  • TAILORED_PROFILE

    • Shows under Tailored Profiles only (not in benchmark tabs or Other)
  • Mixed profile list

    • Verified correct combination of benchmark tabs + Tailored Profiles + Other
    • Verified benchmark tabs are sorted and others are appended only when applicable
  • Conditional tabs

    • "Tailored Profiles" only shown when tailored profiles exist
    • "Other" only shown when at least one profile does not have a standard attached
  • Scan schedule filter change

    • If selected profile no longer exists, falls back to first available profile and updates tab

@openshift-ci
Copy link

openshift-ci bot commented Mar 24, 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

@bradr5
Copy link
Contributor Author

bradr5 commented Mar 24, 2026

Leaving this as a draft PR until I split up / move some of the logic and add automated test.

@rhacs-bot
Copy link
Contributor

Images are ready for the commit at 6402861.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-430-g6402861be3.

@codecov
Copy link

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.26%. Comparing base (123b457) to head (6402861).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19575   +/-   ##
=======================================
  Coverage   49.25%   49.26%           
=======================================
  Files        2735     2735           
  Lines      206138   206138           
=======================================
+ Hits       101539   101544    +5     
+ Misses      97051    97047    -4     
+ Partials     7548     7547    -1     
Flag Coverage Δ
go-unit-tests 49.26% <ø> (+<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.

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.

2 participants