Skip to content

fix(ui): prevent AppCard crash on missing ingress and improve metrics display - #783

Open
Buddruggy wants to merge 1 commit into
kubero-dev:mainfrom
Buddruggy:fix/appcard-missing-ingress-metrics
Open

fix(ui): prevent AppCard crash on missing ingress and improve metrics display#783
Buddruggy wants to merge 1 commit into
kubero-dev:mainfrom
Buddruggy:fix/appcard-missing-ingress-metrics

Conversation

@Buddruggy

@Buddruggy Buddruggy commented Aug 12, 2026

Copy link
Copy Markdown

Description

Fixes a frontend crash on the pipeline apps page when an app CR is missing addons and/or ingress.hosts, and improves AppCard metrics rendering for apps that include addon pods.

Motivation / context

  • Pipeline page can white-screen with: TypeError: Cannot read properties of undefined (reading 'length')
  • Root cause: AppCard assumes app.addons and app.ingress.hosts always exist, but apps returned from CRDs may omit them.
  • Additionally, when one addon pod has resource percentages and the app pod does not, the card switches to empty progress bars instead of showing usable CPU/memory usage values.

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Template (non-breaking change which adds a template)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • I've built the image and tested it on a Kubernetes cluster

Test Configuration:

  • Operator Version: existing cluster install
  • Kubernetes Version: TKE (in-cluster)
  • Kubero CLI Version (if applicable): v2.4.x

Steps:

  1. Open a pipeline containing an app without ingress.hosts (or with ingress.enabled: false) → page no longer crashes.
  2. Open an app with an addon pod that has resource requests while the app pod does not → card shows a metrics table instead of empty bars.
  3. Open apps where every pod has percentages → progress bars still work.
  4. Open app detail for an app without hosts → no crash on metrics / open actions.

Checklist:

  • I removed unnecessary debug logs
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I documented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Prevent pipeline page crashes when an app CR lacks addons or ingress.hosts,
and prefer usage tables when some pods (e.g. addons) lack resource percentages.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant