Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

bug: CLI hangs indefinitely during network failures due to missing `http.Client` timeouts

Đang mở Phù hợp với người mới
#545 2 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 1 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
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
cli, networking

Hướng nghiên cứu

Theo dõi quá trình khởi tạo HTTP client nội bộ của CLI và tái hiện trạng thái treo bằng lệnh start hoặc simulate đối với một máy chủ Microcks hoặc Keycloak không phản hồi. Đặt thời gian chờ của client là 30 giây và xác minh rằng lệnh trả về lỗi timeout hữu ích thay vì chờ vô thời hạn.

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

Mô tả

Describe the bug

The CLI currently initializes its internal HTTP clients without explicitly setting a Timeout field. In Go, an http.Client without a configured timeout (or when using http.DefaultClient) will default to waiting infinitely. If a network connection silently drops, or if the Microcks/Keycloak server is locked up and unresponsive, the CLI freezes forever in the terminal and must be manually killed by the user.

Expected behavior

The CLI should fail fast with a helpful connection timeout error (e.g., context deadline exceeded or timeout) if the server takes longer than 30 seconds to respond, returning control to the user.

Actual behavior

The CLI hangs infinitely in the terminal with no output.

How to Reproduce?

Try with start or simulate it.

Microcks version or git rev

No response

Install method (docker-compose, helm chart, operator, docker-desktop extension,...)

No response

Additional information

No response

Ngôn ngữ chính
Go
Star
52
Fork
67
Merge trung bình
4 ngày 3 giờ
Pull request đã merge (30 ngày)
22

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 microcks/microcks-cli

Tất cả issue của microcks/microcks-cli

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.