Piped v1 Live State crashes when the selected deploy target disappears

未关闭 适合新手
#7,619 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
85/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
kubernetes, react, typescript
领域
devops, frontend

调研方向

阅读 issue 中链接的 web/src/components/application-detail-page/application-state-view/live-state-view/index.tsx 和 graph-view/index.tsx,跟踪选择更新和图形过滤。移除选中的目标后重新渲染,以复现 Jest 案例。完成的标准是选中一个剩余目标,或者在没有剩余目标时显示空状态,且不出现 resources.map 异常。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Go
星标
1.4k
派生
391
平均合并
4 天 1 小时
30 天内合并 PR
58

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pipe-cd/pipecd 的其他 Issue

查看 pipe-cd/pipecd 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。