ax-server: take the actor router URL from a flag, not ATENET_ROUTER_ADDR

Đang mở Phù hợp với người mới
#710 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 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
72/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, kubernetes
Lĩnh vực
backend, devops

Hướng nghiên cứu

Bắt đầu từ vị trí trong internal/controller nơi ATENET_ROUTER_ADDR được đọc ở mỗi yêu cầu, sau đó đến phần gắn cờ trong cmd/ax-server/main.go, cạnh --substrate-endpoint. Thêm --router-url với giá trị mặc định nêu trong issue, truyền nó cho controller và đặt nó dưới args trong deploy/ax-server.yaml và test/e2e/manifests/ax-server.yaml. Hoàn thành khi ax-server không còn đọc biến này, ax ssh vẫn đọc, và các test của router không còn dùng t.Setenv.

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

Mô tả

ax-server reaches every actor through the router, and reads the router's address from the ATENET_ROUTER_ADDR environment variable inside internal/controller, on every request. Its other Substrate settings are flags (--substrate-endpoint, --substrate-authority).

Why change it:

  • The variable has no default. When it is unset, a resume succeeds without pushing the task to the runner. A flag with a default, as
    --substrate-endpoint has, removes that case.
  • It is process-wide state, so every test that needs a router sets it with t.Setenv.
  • More control-plane traffic will go through the router over time (e.g. #692), so the URL should be configured explicitly in one place.

Proposal: add --router-url to ax-server (default https://atenet-router.ate-system.svc.cluster.local:443), pass it from cmd/ax-server/main.go to the controller, and set it under args in deploy/ax-server.yaml and test/e2e/manifests/ax-server.yaml. ax-server stops reading ATENET_ROUTER_ADDR; ax ssh keeps reading it.

Ngôn ngữ chính
Go
Star
14.8k
Fork
802
Merge trung bình
18 giờ 37 phút
Pull request đã merge (30 ngày)
110

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 google/ax

Tất cả issue của google/ax

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.