Piped v1 Live State crashes when the selected deploy target disappears

Đang mở Phù hợp với người mới
#7,619 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
85/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
kubernetes, react, typescript
Lĩnh vực
devops, frontend

Hướng nghiên cứu

Đọc web/src/components/application-detail-page/application-state-view/live-state-view/index.tsx và graph-view/index.tsx, được liên kết trong issue, để theo dõi các cập nhật lựa chọn và việc lọc đồ thị. Tái hiện trường hợp Jest bằng cách render lại sau khi xóa mục tiêu đang được chọn. Hoàn tất khi một mục tiêu còn lại được chọn, hoặc trạng thái trống xuất hiện nếu không còn mục tiêu nào, mà không phát sinh ngoại lệ resources.map.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
1.4k
Fork
391
Merge trung bình
4 ngày 1 giờ
Pull request đã merge (30 ngày)
58

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pipe-cd/pipecd

Tất cả issue của pipe-cd/pipecd

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.