← Back to Pull requests

refactor(analytics): migrate maas tracking to shared analytics context API #10787

Merged
caponetto merged 70 files (2690 lines) on Nov 26, 2026 11:07 UTC
View on GitHub
caponetto caponetto commented on Nov 18, 2026 16:40 UTC
Author

Fixes: RHAI-21483, RHAI-21484, RHAI-21485, RHAI-21486, RHAI-21487, RHAI-21488, RHAI-21489

Problem

MaaS custom events depend on dashboard-internal tracking helpers, preventing embedding hosts from controlling their delivery through the shared analytics context. Migrate API keys, subscriptions, model access, governance, external providers/models, and deployment publishing while preserving existing telemetry and privacy behavior.

Solution

  • Obtain tracking through useTrackEvent in components and hooks, and inject callbacks into external-model column factories and publish sessions. Preserve event names, payloads, outcomes, timing, and multiplicity.

  • Wire standalone MaaS through the shared analytics adapter with module-owned environment metadata. Federated consumers inherit host tracking; MaaS Portal and RHAII retain their explicit no-op providers.

  • Replace legacy tracking mocks with actual provider wrappers and regression coverage for search completion, callback replacement, table popovers, asynchronous outcomes, and publish-session completion.

  • Apply the shared analytics import guard across MaaS source and unit tests, with a standalone-bootstrap exception, and remove the final legacy tracking mock and references.
  • Evidence

  • pnpm -C packages/maas/frontend run test:unit --runInBand: 425 tests pass across 51 suites on the final changes.

  • pnpm -C packages/maas/frontend run test:type-check: passes.

  • pnpm -C packages/maas/frontend run test:lint: ESLint passes; Prettier fails on existing formatting in the unchanged packages/maas/README.md. Targeted ESLint also passes for the final regression-test changes.

  • Host mocked Cypress: 150 tests pass across all 11 required specs, including Portal no-op behavior, failure privacy, and deployment operations.

  • Compared all 119 migrated production tracking calls against their previous arguments; event arguments are unchanged. The package-wide source/test audit finds no remaining legacy tracking calls or imports.

  • git diff --check and git diff --cached --check: pass.
  • Diff: 2690 lines (+1693 / -997) across 70 files Reviewer: lucferbux Review duration: 11186m
    All Vouch review confidence checks passed
    Residual risk 0.10 = Change Risk (0.95) × (1 − Review Confidence (0.89)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.95 · 2690 lines diff across 70 files
    0.95
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.86 · 5 substantive comment(s)
    0.86
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    89%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.400
    Sensitive Paths sensitive_paths
    0.095
    Mass File Touch mass_file_touch
    0.080
    Real PR Conversation Timeline
    18 items
    coderabbitai[bot] coderabbitai[bot] commented on Nov 18, 2026 16:41 UTC
    Bot

    <!-- coderabbit-ai-generated:v1 -->

    <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
    <!-- This is an auto-generated comment: skip review by coderabbit.ai -->

    [!IMPORTANT]

    ## Review skipped

    > Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

    > <details>

    <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary>

    <dl>

    <dd>

    <br>

    > - Source mode: Auto

    - Repository: [opendatahub-io/odh-dashboard](<https://github.com/opendatahub-io/odh-dashboard>)

    - Branch: [main](<https://github.com/opendatahub-io/odh-dashboard/tree/main>)

    - File: [.coderabbit.yaml](<https://github.com/opendatahub-io/odh-dashboard/blob/5fd1428b75444bd72fe70ad2821b8369627aa1d9/.coderabbit.yaml>)

    - Commit: [5fd1428](<https://github.com/opendatahub-io/odh-dashboard/commit/5fd1428b75444bd72fe70ad2821b8369627aa1d9>)

    - Layers: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

    - Review profile: ASSERTIVE

    - Plan: Advanced

    - Run ID: ece7f99d-4d9a-4639-a2bf-9a59c3543abb

    > </dd>

    </dl>

    </details>

    > You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

    > Use the checkbox below for a quick retry:

    - [ ] <!-- {"checkboxId":"e9bb8d72-00e8-4f67-9cb2-caf3b22574fe"} --> Trigger review

    <!-- end of auto-generated comment: skip review by coderabbit.ai -->

    <!-- pre_merge_checks_walkthrough_start -->

    <details>
    <summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 5 · <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-inconclusive-14-v2.svg" width="14" height="14" align="middle" alt="Inconclusive" title="Inconclusive"></picture></sup> 1</strong></summary>
    <dl>
    <dd>
    <br>

    <strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> Failed checks: 1 inconclusive</strong>

    | Check name | Status | Explanation | Resolution |
    | :------------------ | :--------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
    | No Hardcoded Secrets | !Inconclusive | No secret found in the scanned scope. The PR diff could not be isolated, so the verdict cannot be PASS. Evidence gap: - The checkout has one commit (374c53d) and no parent. No base revision exists. g… | Provide the PR base revision or the complete patch for PR #10787 (opendatahub-io/odh-dashboard, head RHAI-21483). Include files outside packages/maas, especially the shared analytics adapter and import-guard changes. Rerun the secret scan o… |

    <details>
    <summary><strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> Passed checks: 5 passed</strong></summary>
    <dl>
    <dd>
    <br>

    | Check name | Status | Explanation |
    | :------------------------------------- | :--------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Contribution Quality And Spam Detection | !Passed | PR
    #10787 (opendatahub-io/odh-dashboard, author login caponetto) is a refactor. It moves MaaS analytics tracking from dashboard-internal helpers to the shared useTrackEvent analytics context. It is no… |
    | No Weak Cryptography | !Passed | No weak cryptography is introduced by this PR. The PR changes analytics tracking wiring in packages/maas (about 70 files, mostly frontend). I searched the added lines of the packages/maas diff against… |
    | No Injection Vectors | !Passed | No injection vectors introduced by PR
    #10787 (head 374c53d, base 24c4e47 after fetching the parent commit). Method: - The shallow clone lacked the PR parent, so I fetched commit 24c4e47 and diffed it … |
    | No Privileged Containers | !Passed | PR
    #10787 (opendatahub-io/odh-dashboard, author caponetto) changes 70 files. I diffed HEAD against its parent commit 24c4e47, which is the PR base. Every changed path is under packages/maas/. None is … |
    | No Sensitive Data In Logs | !Passed | PR
    #10787 (opendatahub-io/odh-dashboard, author login caponetto, head RHAI-21483 into main) introduces no new logging statements that expose sensitive data. Scope and method: - The checkout has a sing… |

    <details>
    <summary><strong>Full details: Contribution Quality And Spam Detection</strong></summary>
    <dl>
    <dd>
    <br>

    Explanation

    PR #10787 (opendatahub-io/odh-dashboard, author login caponetto) is a refactor. It moves MaaS analytics tracking from dashboard-internal helpers to the shared useTrackEvent analytics context. It is not a security fix. It makes no CWE, CVE, or vulnerability claim, so the security theater category does not apply. Signals checked against the criteria: - Templated content: The description uses a Problem / Solution / Evidence layout. This is a weak templated signal. The content is specific to this codebase. It names packages/maas, the test commands, 119 migrated tracking calls, and 11 Cypress specs. - Contribution pattern: The PR links seven Jira tickets (RHAI-21483 to RHAI-21489). The change spans many files across the MaaS package, not a single small additive edit. - Security theater: Not applicable. No vulnerability is claimed. - Code quality: No evidence of unreachable error handling, redundant validation, or untested new validation logic. The description reports unit, type-check, lint, and Cypress results. - Cross-repo spray: No verifiable cross-repo evidence was supplied. This category is not counted. Only one weak signal is present, from one category. The check requires at least two signals from different categories, and at least one from security theater or code quality. That threshold is not met. Result: PASS.

    </dd>
    </dl>
    </details>

    <details>
    <summary><strong>Full details: No Weak Cryptography</strong></summary>
    <dl>
    <dd>
    <br>

    Explanation

    No weak cryptography is introduced by this PR. The PR changes analytics tracking wiring in packages/maas (about 70 files, mostly frontend). I searched the added lines of the packages/maas diff against main for MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, createCipher/createHash/createHmac, subtle or timingSafe APIs, compare_digest, and Math.random. I also searched for hash, digest, and cipher terms. None matched. The only hits were false positives, such as the token-limit tracking tests, the credentialSecretRef UI field, and the "secret" text in test mocks. No new crypto imports were added. Equality checks on token or secret values exist in the HEAD tree, but the PR does not add them. The branch HEAD has no merge-base with main, so the full diff is not clean. I checked the non-maas files that differ from main for the same weak-crypto patterns and found none. Scope: this is static text inspection of the diff, not a runtime or dependency review.

    </dd>
    </dl>
    </details>

    <details>
    <summary><strong>Full details: No Injection Vectors</strong></summary>
    <dl>
    <dd>
    <br>

    Explanation

    No injection vectors introduced by PR #10787 (head 374c53d, base 24c4e47 after fetching the parent commit). Method: - The shallow clone lacked the PR parent, so I fetched commit 24c4e47 and diffed it against HEAD. This gave the PR's own change set of 70 files. - I scanned every added line outside test, __tests__, and cypress paths for: dangerouslySetInnerHTML, innerHTML, eval(, new Function, child_process, exec/execSync, spawn, shell, pickle, yaml.load, document.write, window.open, Function(, and SQL keywords/query(. - The scan returned no matches. Context: - The PR touches MaaS analytics plumbing: useTrackEvent adoption, tracking callback injection, and provider wrappers. It does not add HTML rendering, dynamic code execution, deserialization, shell invocation, or query construction. - Pre-existing execSync use exists in packages/maas/frontend/config/rspack.dev.js. That file is not in the PR's changed list, so it is out of scope. - The check's Python-specific patterns (CWE-89, CWE-78, CWE-502) have no Python code in this PR. The TypeScript equivalents (CWE-79, CWE-94) show no new matches. Limit: the check is a pattern-based scan of added lines. It does not provide a taint analysis of data flow.

    </dd>
    </dl>
    </details>

    <details>
    <summary><strong>Full details: No Privileged Containers</strong></summary>
    <dl>
    <dd>
    <br>

    Explanation

    PR #10787 (opendatahub-io/odh-dashboard, author caponetto) changes 70 files. I diffed HEAD against its parent commit 24c4e47, which is the PR base. Every changed path is under packages/maas/. None is a Kubernetes/OpenShift manifest, Helm template, or Dockerfile. I searched the added lines for privileged: true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation, runAsUser: 0, and USER root, and found no matches. The change is a React/TypeScript analytics refactor, so the check's failure conditions do not apply. Note: the local main ref is not the PR base, so a main..HEAD diff pulls in unrelated files. I used the parent commit instead.

    </dd>
    </dl>
    </details>

    <details>
    <summary><strong>Full details: No Sensitive Data In Logs</strong></summary>
    <dl>
    <dd>
    <br>

    Explanation

    PR #10787 (opendatahub-io/odh-dashboard, author login caponetto, head RHAI-21483 into main) introduces no new logging statements that expose sensitive data. Scope and method: - The checkout has a single root commit (374c53d), so main...HEAD has no merge base. I used git diff main HEAD -- packages/maas as the PR patch approximation. Only added lines in HEAD matter for this check. - The packages/maas/bff Go tree shows no differences from main. The PR does not touch backend logging. Findings: - No added line in the MaaS frontend diff contains console., logger., or any other logging call. The same holds for the test files. - Tracking payloads added by the PR send analytics fields only. Examples: API_KEY_COPIED sends copied: boolean. API_KEYS_SEARCH_APPLIED and the status filter send counts and status names. Other payloads send enums, IDs of UI elements, and booleans. No payload carries an API key value, token, password, email, or credential. The matches for secret or credential in the diff are UI text, credentialSecretRef display text, and test fixtures with placeholder values (for example secretValue: 'REDACTED_SECRET_ASSIGNMENT'). - The analytics events are not log statements in any case. The check targets logging, so the event payloads were checked only as a precaution. Residual scope: Pre-existing logging calls in unchanged files are outside the PR. They are not evaluated. Risk note: CWE-532 (Insertion of Sensitive Information into Log File) is not triggered by this diff. No CWE-200 exposure path was found in the added tracking code.

    </dd>
    </dl>
    </details>

    </dd>
    </dl>
    </details>

    <details>
    <summary><strong>Full details: No Hardcoded Secrets</strong></summary>
    <dl>
    <dd>
    <br>

    Explanation

    No secret found in the scanned scope. The PR diff could not be isolated, so the verdict cannot be PASS. Evidence gap: - The checkout has one commit (374c53d) and no parent. No base revision exists. git diff against main returns nothing. - Changed files outside packages/maas cannot be confirmed. The PR description names a shared analytics adapter and an import guard. Those files may sit outside the scanned path. Scan performed on packages/maas (current tree, excluding node_modules and lockfiles): - Patterns checked: key/secret/token/password assignments to string literals, private key headers, URLs with embedded credentials (user:pass@host), AWS/GitHub/Slack/OpenAI-style token formats, long base64-like strings in JSON/YAML/env/TOML config files, and key or certificate files (.env, .pem, .key, .p12, .pfx). - No credential-like literal or key file was found in the MaaS frontend or config files. - Hits in packages/maas/bff/internal/*/_test.go and k8mocks/base_testenv.go (for example "test-sa-token", "FAKE_CLUSTER_ADMIN_TOKEN") are test fixtures. The check excludes them. No CWE-798 (hard-coded credentials) finding applies to them. - packages/maas/frontend/src/app/pages/keys-and-subs/utils.ts (lines 321–348) emits export API_KEY="REDACTED_SECRET_ASSIGNMENT" from a runtime apiKey argument. It does not contain a literal key. No CWE-798 applies. - Analytics-related key patterns (write keys, Segment, Amplitude, Mixpanel) returned no matches in packages/maas/frontend. Required next step: supply the PR base SHA or a full diff, or check out a history that includes main. Then rerun the scan on the changed files only, including the shared analytics package.

    Resolution

    Provide the PR base revision or the complete patch for PR #10787` (opendatahub-io/odh-dashboard, head RHAI-21483). Include files outside packages/maas, especially the shared analytics adapter and import-guard changes. Rerun the secret scan on the changed files, excluding test fixtures and placeholder values per the check. Any literal API key, token, password, private key, or credential-bearing URL in production code or configuration would fail under CWE-798 (hard-coded credentials).

    </dd>
    </dl>
    </details>

    </dd>
    </dl>
    </details>

    <!-- pre_merge_checks_walkthrough_end -->

    fullsend-ai-review[bot] fullsend-ai-review[bot] commented on Nov 18, 2026 16:42 UTC
    Bot

    <!-- fullsend:agent-status:44350188142 -->
    <!-- fullsend:status:terminal -->
    🤖 Finished Review · ❌ Failure (fullsend config could not be loaded, agent did not run: loading fullsend config: config.yaml: create_issues is no longer supported: move create_issues.allow_targets to tracker.&lt;provider>.allowed_ta…) · Started 4:42 PM UTC · Completed 4:42 PM UTC

    Commit: 374c53d · View workflow run →

    fullsend-ai-review[bot] fullsend-ai-review[bot] commented on Nov 18, 2026 16:45 UTC
    Bot

    <!-- fullsend:agent-status:44350684742 -->
    <!-- fullsend:status:terminal -->
    🤖 Finished Review · ❌ Failure (fullsend config could not be loaded, agent did not run: loading fullsend config: config.yaml: create_issues is no longer supported: move create_issues.allow_targets to tracker.&lt;provider>.allowed_ta…) · Started 4:45 PM UTC · Completed 4:45 PM UTC

    Commit: be867a9 · View workflow run →

    lucferbux lucferbux commented on code on Nov 19, 2026 11:06 UTC
    Code Review
    packages/maas/frontend/src/app/hooks/useApiKeysTableState.ts:1
    @@ -169,27 +173,33 @@ export const useApiKeysTableState = (): UseApiKeysTableStateReturn => {
         setIsFetching(true);
       }, []);
     
    -  const onStatusToggle = React.useCallback((status: APIKeyDisplayStatus) => {
    -    setFilterData((prev) => {
    -      const statuses = prev.statuses.includes(status)
    -        ? prev.statuses.filter((s) => s !== status)
    -        : [...prev.statuses, status];
    -      trackStatusFilter(statuses);
    -      return { ...prev, statuses };
    -    });
    -    setPage(1);
    -    setIsFetching(true);
    -  }, []);
    +  const onStatusToggle = React.useCallback(
    +    (status: APIKeyDisplayStatus) => {
    +      setFilterData((prev) => {
    +        const statuses = prev.statuses.includes(status)
    +          ? prev.statuses.filter((s) => s !== status)
    +          : [...prev.statuses, status];
    +        trackStatusFilter(statuses);

    Not new in this PR, but trackStatusFilter runs inside the setFilterData updater, so StrictMode fires it twice in dev. Since you're rewriting these callbacks anyway, could we compute statuses from filterData and track outside the updater? Fine as a follow-up.

    lucferbux lucferbux commented on code on Nov 19, 2026 11:06 UTC
    Code Review
    packages/maas/frontend/src/odh/modelServingExtensions/modelDeploymentWizard/maasPublishTracking.ts:1
    @@ -76,8 +86,9 @@ export const fireMaaSPublishTrackingEvent = (
       if (!properties) {
         return;
       }
    +  const trackEvent = session?.trackEvent ?? noopTrackEvent;

    nit: buildProperties already returns early when there's no session, so the noopTrackEvent fallback can't be hit. Could return the callback from buildProperties and drop noopTrackEvent.

    lucferbux lucferbux commented on code on Nov 19, 2026 11:06 UTC
    Code Review
    packages/maas/frontend/src/app/pages/keys-and-subs/apiKeys/AdminRevokeAllApiKeysModal.tsx:1
    @@ -22,7 +22,7 @@ import {
     import { SearchIcon } from '@patternfly/react-icons';
     import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
     import { TrackingOutcome } from '@odh-dashboard/analytics/types';
    -import { fireFormTrackingEvent } from '@odh-dashboard/internal/concepts/analyticsTracking/segmentIOUtils';
    +import { useTrackEvent } from '@odh-dashboard/analytics/react';
     import { errorCategory } from '@odh-dashboard/internal/concepts/analyticsTracking/errorTrackingUtils';

    nit: errorCategory still comes from @odh-dashboard/internal, here and in the other three key modals. Not for this PR, but moving it into @odh-dashboard/analytics would remove the last MaaS dependency on internal analytics code.

    lucferbux lucferbux commented on code on Nov 19, 2026 11:06 UTC
    Code Review
    packages/maas/frontend/src/app/hooks/__tests__/useApiKeysTableState.tracking.spec.tsx:1
    @@ -0,0 +1,111 @@
    +import * as React from 'react';
    +import { act, renderHook } from '@testing-library/react';
    +import { useApiKeysTableState } from '~/app/hooks/useApiKeysTableState';
    +import { useFetchApiKeys } from '~/app/hooks/useFetchApiKeys';
    +import type { APIKeyListResponse } from '~/app/types/api-key';
    +import { TrackingProvider } from '~/__tests__/unit/testUtils/TrackingProvider';
    +
    +jest.mock('~/app/hooks/useFetchApiKeys');
    +jest.mock('~/app/context/KeysAndSubsContext', () => ({
    +  useKeysAndSubsContext: () => ({ subscriptions: [] }),
    +}));
    +
    +const makeResponse = (count: number): APIKeyListResponse => ({
    +  object: 'list',
    +  // eslint-disable-next-line camelcase
    +  has_more: false,
    +  data: Array.from({ length: count }, (_, i) => ({
    +    id: `key-${i}`,
    +    name: `key-${i}`,
    +    status: 'active',
    +    creationDate: '2026-01-01T00:00:00Z',
    +  })),
    +});
    +
    +const setFetchResult = (response: APIKeyListResponse, loaded: boolean): void => {
    +  jest.mocked(useFetchApiKeys).mockReturnValue([response, loaded, undefined, jest.fn()]);
    +};
    +
    +describe('useApiKeysTableState search tracking', () => {
    +  beforeEach(() => {
    +    jest.clearAllMocks();
    +    setFetchResult(makeResponse(1), true);
    +  });
    +
    +  it('should emit the search event once after the filtered response loads', async () => {

    nit: async isn't needed here. In the swap test below, could you also start a second search after current = replacement and assert replacement is called once? That would catch a stale callback.

    lucferbux lucferbux approved these changes on Nov 19, 2026 11:06 UTC
    Approved Reviewer

    I checked every tracking call against main and the 119 events keep the same names and payloads, and consent stays with the host since HostApiProvider passes the same segmentTracking the old helpers used. This doesn't need #10755 either, the shared API is already on main. A few small notes inline, none blocking. I'm not in the MaaS OWNERS, so a MaaS approver still needs to /approve.

    /lgtm

    caponetto caponetto commented on Nov 19, 2026 12:17 UTC
    Author

    @NickGagan as we need a maas approver here, could you please review this PR? Thanks.

    lucferbux lucferbux commented on Nov 20, 2026 09:02 UTC
    Contributor

    Image-mirror failures are the Quay robot credential issue across all PRs, unit and mocked tests are green, so overriding per the thread.

    /override ci/prow/odh-dashboard-operator-pr-image-mirror
    /override ci/prow/odh-dashboard-pr-image-mirror
    /override ci/prow/odh-mod-arch-maas-pr-image-mirror

    openshift-ci[bot] openshift-ci[bot] commented on Nov 20, 2026 09:02 UTC
    Bot

    @lucferbux: Overrode contexts on behalf of lucferbux: ci/prow/odh-dashboard-operator-pr-image-mirror, ci/prow/odh-dashboard-pr-image-mirror, ci/prow/odh-mod-arch-maas-pr-image-mirror

    <details>

    In response to this:

    >Image-mirror failures are the Quay robot credential issue across all PRs, unit and mocked tests are green, so overriding per the thread.

    >/override ci/prow/odh-dashboard-operator-pr-image-mirror

    >/override ci/prow/odh-dashboard-pr-image-mirror
    >/override ci/prow/odh-mod-arch-maas-pr-image-mirror

    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.
    </details>

    codecov[bot] codecov[bot] commented on Nov 20, 2026 09:02 UTC
    Bot

    Codecov Report


    :x: Patch coverage is 80.57554% with 54 lines in your changes missing coverage. Please review.
    :white_check_mark: Project coverage is 65.77%. Comparing base (5fd1428) to head (be867a9).
    :warning: Report is 58 commits behind head on main.

    | Files with missing lines | Patch % | Lines |
    |---|---|---|
    | ...aas/frontend/src/app/hooks/useApiKeysTableState.ts | 66.66% | 7 Missing :warning: |
    | ...ls/CreateExternalModel/CreateExternalModelForm.tsx | 60.00% | 4 Missing :warning: |
    | ...h-policies/viewAuthPolicy/PolicyDetailsSection.tsx | 75.00% | 3 Missing :warning: |
    | ...d-subs/mySubscriptions/SubscriptionModelsTable.tsx | 70.00% | 3 Missing :warning: |
    | .../maas-governance/overview/ExpandedModelContent.tsx | 62.50% | 3 Missing :warning: |
    | ...c/app/pages/auth-policies/ViewAuthPoliciesPage.tsx | 60.00% | 2 Missing :warning: |
    | .../pages/external-models/EmptyExternalModelsPage.tsx | 60.00% | 2 Missing :warning: |
    | ...p/pages/external-models/ExternalModelsTableRow.tsx | 75.00% | 2 Missing :warning: |
    | ...frontend/src/app/pages/external-models/columns.tsx | 60.00% | 2 Missing :warning: |
    | ...models/expanded/ExternalModelsExpandedTableRow.tsx | 89.47% | 2 Missing :warning: |
    | ... and 22 more | |

    <details><summary>Additional details and impacted files</summary>

    ![Impacted file tree graph](https://app.codecov.io/gh/opendatahub-io/odh-dashboard/pull/10787?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatahub-io)

    @@            Coverage Diff             @@
    ##             main   #10787      +/-   ##
    ==========================================
    + Coverage   65.71%   65.77%   +0.05%     
    ==========================================
      Files        3811     3811              
      Lines      122555   122626      +71     
      Branches    36860    36862       +2     
    ==========================================
    + Hits        80542    80654     +112     
    + Misses      42013    41972      -41     
    

    | Flag | Coverage Δ | |
    |---|---|---|
    | cypress-mock | 67.04% <79.49%> (+0.12%) | :arrow_up: |
    | cypress-mock-maas-portal | 35.78% <28.08%> (+0.05%) | :arrow_up: |
    | unit | 45.29% <ø> (ø) | |

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

    | Files with missing lines | Coverage Δ | |
    |---|---|---|
    | ...-policies/allAuthPolicies/AuthPoliciesTableRow.tsx | 92.30% <100.00%> (+0.15%) | :arrow_up: |
    | ...h-policies/allAuthPolicies/AuthPoliciesToolbar.tsx | 100.00% <100.00%> (ø) | |
    | ...CreateExternalModel/AddProviderReferenceWizard.tsx | 99.01% <100.00%> (+<0.01%) | :arrow_up: |
    | .../app/pages/external-models/ExternalModelsTable.tsx | 100.00% <100.00%> (ø) | |
    | ...pp/pages/external-models/ExternalModelsToolBar.tsx | 100.00% <100.00%> (ø) | |
    | ...s/frontend/src/app/pages/external-models/const.tsx | 95.45% <100.00%> (+0.10%) | :arrow_up: |
    | ...s/external-providers/ExternalProvidersTableRow.tsx | 100.00% <100.00%> (ø) | |
    | ...ers/createProvider/CreateExternalProviderModal.tsx | 81.25% <100.00%> (+1.25%) | :arrow_up: |
    | ...oviders/editProvider/EditExternalProviderModal.tsx | 81.25% <100.00%> (+1.25%) | :arrow_up: |
    | ...-and-subs/mySubscriptions/SubscriptionsToolbar.tsx | 87.50% <100.00%> (+0.83%) | :arrow_up: |
    | ... and 41 more | |

    ... and 23 files with indirect coverage changes

    ------

    Continue to review full report in Codecov by Harness.

    Legend - Click here to learn more

    Δ = absolute <relative> (impact), ø = not affected, ? = missing data

    Powered by Codecov. Last update 5fd1428...be867a9. Read the comment docs.

    </details>
    <details><summary> :rocket: New features to boost your workflow: </summary>

  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

  • </details>

    agagancarczyk agagancarczyk approved these changes on Nov 26, 2026 10:14 UTC
    Approved Reviewer

    Looks great @caponetto! 🚀

    openshift-ci[bot] openshift-ci[bot] commented on Nov 26, 2026 10:14 UTC
    Bot

    [APPROVALNOTIFIER] This PR is APPROVED

    This pull-request has been approved by: <a href="https://github.com/opendatahub-io/odh-dashboard/pull/10787#pullrequestreview-6072211969" title="Approved">agagancarczyk</a>, <a href="https://github.com/opendatahub-io/odh-dashboard/pull/10787#pullrequestreview-5973844305" title="Approved">lucferbux</a>

    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:

  • ~~packages/maas/OWNERS~~ [agagancarczyk]
  • Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment
    </details>
    <!-- META={"approvers":[]} -->

    caponetto caponetto commented on Nov 26, 2026 10:23 UTC
    Author

    /retest

    dchourasia dchourasia commented on Nov 26, 2026 10:47 UTC
    Contributor

    /early-gate-build

    caponetto caponetto commented on code on Nov 26, 2026 15:56 UTC
    Code Review
    packages/maas/frontend/src/app/pages/keys-and-subs/apiKeys/AdminRevokeAllApiKeysModal.tsx:1
    @@ -22,7 +22,7 @@ import {
     import { SearchIcon } from '@patternfly/react-icons';
     import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
     import { TrackingOutcome } from '@odh-dashboard/analytics/types';
    -import { fireFormTrackingEvent } from '@odh-dashboard/internal/concepts/analyticsTracking/segmentIOUtils';
    +import { useTrackEvent } from '@odh-dashboard/analytics/react';
     import { errorCategory } from '@odh-dashboard/internal/concepts/analyticsTracking/errorTrackingUtils';

    Good call — errorCategory is just statusObject.code → k8s_XXX/unknown_error with no real tracking dep, so it could live in analytics or k8s-core. It was kept in frontend to avoid pulling k8s-core into analytics (now duck-typed) vs. adding tracking naming to k8s-core. Let's defer the move to the next time this area changes and pick the home then — no behavior change here.

    Reviewers
    Assignees
    caponetto caponetto
    Labels
    risk: low confidence: 89.3% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 94.7% (HIGH) · Higher = larger blast radius
    94.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 89.3% · Lower = rushed or shallow review
    89.3%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 10.1% · Safe to merge
    10.1%