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

Aperta Adatta ai principianti
#710 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go, kubernetes
Ambito
backend, devops

Direzione di ricerca

Inizia dal punto in internal/controller in cui ATENET_ROUTER_ADDR viene letta a ogni richiesta, poi passa al collegamento dei flag in cmd/ax-server/main.go, accanto a --substrate-endpoint. Aggiungi --router-url con il valore predefinito indicato nell'issue, passalo al controller e impostalo sotto args in deploy/ax-server.yaml e test/e2e/manifests/ax-server.yaml. È completato quando ax-server non legge più la variabile, ax ssh continua a leggerla e i test del router non usano più t.Setenv.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
14.8k
Fork
802
Merge medio
18h 37m
PR unite (30g)
110

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google/ax

Tutte le issue di google/ax

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.