Piped v1 Live State crashes when the selected deploy target disappears

Abierto Apto para principiantes
#7,619 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
85/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
kubernetes, react, typescript
Área
devops, frontend

Línea de trabajo

Lee web/src/components/application-detail-page/application-state-view/live-state-view/index.tsx y graph-view/index.tsx, enlazados en el issue, para seguir las actualizaciones de la selección y el filtrado del grafo. Reproduce el caso de Jest volviendo a renderizar tras quitar el destino seleccionado. La tarea está completa cuando se selecciona un destino restante o aparece un estado vacío si no queda ninguno, sin que se produzca la excepción resources.map.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Go
Estrellas
1.4k
Forks
391
Merge medio
4 d 1 h
PR fusionados (30 d)
58

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pipe-cd/pipecd

Todos los issues de pipe-cd/pipecd

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.