Piped v1 Live State crashes when the selected deploy target disappears

Aperta Adatta ai principianti
#7,619 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
85/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
kubernetes, react, typescript
Ambito
devops, frontend

Direzione di ricerca

Leggi web/src/components/application-detail-page/application-state-view/live-state-view/index.tsx e graph-view/index.tsx, collegati nell’issue, per seguire gli aggiornamenti della selezione e il filtraggio del grafo. Riproduci il caso Jest eseguendo nuovamente il rendering dopo aver rimosso il target selezionato. Il lavoro è completo quando viene selezionato un target rimanente oppure viene visualizzato uno stato vuoto se non ne rimangono, senza che si verifichi l’eccezione resources.map.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What happened

The Live State view throws TypeError: Cannot read properties of undefined (reading 'map') when a refresh removes the selected deploy target. LiveStateView keeps the old selection and passes undefined to GraphView, which calls resources.map. Target selection · Graph filter initialization

What you expected to happen

Select a remaining deploy target when the current one disappears. Show an empty state when no targets remain.

How to reproduce it

  1. Open Live State for a pipedv1 Kubernetes multicluster app with resources in cluster1 and cluster2. Select cluster2.
  2. Remove cluster2 from spec.plugins.kubernetes_multicluster.input.multiTargets in Git and leave the page open. The repository has before and after configs for this change.
  3. Wait for the next live-state snapshot and UI refresh.

A local Jest test reproduced the exception by rendering LiveStateView with two targets, then rerendering it with resources for the other target only.

Environment

Web console source at 87c6da5e7 on master.

Lingua principale
Go
Stelle
1.4k
Fork
391
Merge medio
4g 1h
PR unite (30g)
58

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pipe-cd/pipecd

Tutte le issue di pipe-cd/pipecd

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.