Piped v1 Live State crashes when the selected deploy target disappears

オープン 初心者向け
#7,619 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
58

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pipe-cd/pipecd のほかの issue

pipe-cd/pipecd の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。