Skip to content

[quality] Fix card-config deep schema test to accept componentName alias#20560

Merged
kubestellar-hive[bot] merged 2 commits into
mainfrom
quality/test-fix-card-config-schema
Jul 8, 2026
Merged

[quality] Fix card-config deep schema test to accept componentName alias#20560
kubestellar-hive[bot] merged 2 commits into
mainfrom
quality/test-fix-card-config-schema

Conversation

@clubanderson

Copy link
Copy Markdown
Collaborator

Test Improvement

Fixes the custom content has component name assertion in card-config-deep-schema.test.ts which was failing for all newer card configs that use componentName instead of component.

The UnifiedCardConfig type (line 255-257 of types.ts) defines both:

  • componentName?: string — primary field
  • component?: string — alias for componentName

The test only checked content.component, missing cards that use the canonical componentName field. This caused mass failures across cilium_status, gpu_overview, cascade_impact_map, cluster_delta_detector, config_drift_heatmap, resource_imbalance_detector, right_size_advisor, restart_correlation_matrix, and many others.

Fix: Check for either component OR componentName (matching the type's documented alias pattern).

Fixes #20552


Filed by quality agent (ACMM L4/L6 — full mode)

The UnifiedCardConfig type defines both `component` and `componentName` as
valid fields for custom content (componentName is the primary, component is
the alias). Newer card configs use `componentName` while older ones use
`component`. The test only checked for `component`, causing failures on all
newer cards.

Fixes #20552

Signed-off-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 06:02
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Jul 8, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellarconsole canceled.

Name Link
🔨 Latest commit e0d14d2
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a4dfbf77048d500077e7362

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🐝 Hi @clubanderson! I'm kubestellar-hive[bot], an automation bot for this repo.

Trusted users — org members and contributors with write access — can mention @kubestellar-hive in a comment to trigger repo automation.
On issues, that mention queues an automated fix attempt. On pull requests, it records extra context for existing automation.
This is not an interactive Q&A bot, so mentions should be treated as requests for automation rather than a conversation.

Automation may take a moment to start, and follow-up happens through workflow activity rather than chat replies.

@github-actions github-actions Bot added the ai-generated Pull request generated by AI label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

👋 Hey @clubanderson — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@kubestellar-prow kubestellar-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 8, 2026

Copilot AI 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.

Pull request overview

This PR updates the deep schema test for card configs to recognize the newer componentName field for custom card content (while still supporting the legacy component alias), aligning the assertion with the CardContentCustom type in web/src/lib/unified/types.ts.

Changes:

  • Update the “custom content has component name” test to accept either content.component or content.componentName for custom card content.

Comment on lines +154 to +156
const content = c.content as { type: 'custom'; component?: string; componentName?: string }
const name = content.component || content.componentName
expect(typeof name).toBe('string')
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

❌ Playwright Tests Failed

📊 View Full Report

Download the playwright-report artifact from the workflow run for screenshots and detailed traces.

To view the report locally:

# Download and extract playwright-report.zip
npx playwright show-report path/to/playwright-report

Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com>
@kubestellar-hive kubestellar-hive Bot merged commit 061d2d1 into main Jul 8, 2026
37 of 40 checks passed
@kubestellar-prow kubestellar-prow Bot deleted the quality/test-fix-card-config-schema branch July 8, 2026 09:26
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

⏹️ Post-Merge Verification: cancelled

Commit: 061d2d1e1bc0cf611e116affaf33c72802169262
Specs run: smoke.spec.ts
Report: https://github.com/kubestellar/console/actions/runs/28932169879

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Post-merge build verification passed

Both Go and frontend builds compiled successfully against merge commit 061d2d1e1bc0cf611e116affaf33c72802169262.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Pull request generated by AI dco-signoff: yes Indicates the PR's author has signed the DCO. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. tier/1-lightweight

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] Fix card-config deep schema validation failures (missing component_name)

2 participants