From 3a3e3ed202f77297e64a8ee2ad554014f9e88915 Mon Sep 17 00:00:00 2001 From: EduBox Dev Date: Tue, 23 Jun 2026 18:29:21 +0000 Subject: [PATCH] fix(agent): correct version log, bump to v0.3.2, increase tailscale timeout - Replace hardcoded AGENT_VERSION constant with injected version variable - Bump agent version to 0.3.2 - Increase tailscale up/status timeout from 60s to 120s --- agent/build.sh | 2 +- agent/main.go | 7 ++----- agent/tailscale.go | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/agent/build.sh b/agent/build.sh index 1f615da..bb7ed08 100755 --- a/agent/build.sh +++ b/agent/build.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -VERSION="0.3.1" +VERSION="0.3.2" APP_NAME="studioE5" BIN_NAME="studioE5-agent" LDFLAGS="-X main.version=${VERSION}" diff --git a/agent/main.go b/agent/main.go index c9b739f..dccf206 100644 --- a/agent/main.go +++ b/agent/main.go @@ -12,10 +12,7 @@ import ( // version is injected at build time via -ldflags "-X main.version=X.Y.Z" var version = "dev" -const ( - AGENT_VERSION = "0.3.0" - APP_NAME = "studioE5" -) +const APP_NAME = "studioE5" var ( dataDir = flag.String("data-dir", "./studioE5-data", "Répertoire de données") @@ -59,7 +56,7 @@ func main() { log.Fatalf("Cannot save config: %v", err) } - log.Printf("[%s Agent] version=%s node=%s data-dir=%s server=%s", APP_NAME, AGENT_VERSION, cfg.NodeID, *dataDir, cfg.Server) + log.Printf("[%s Agent] version=%s node=%s data-dir=%s server=%s", APP_NAME, version, cfg.NodeID, *dataDir, cfg.Server) if *uiEnabled { go startUI(*dataDir, cfg.NodeID, cfg.Server) diff --git a/agent/tailscale.go b/agent/tailscale.go index 949bb3c..ff063d8 100644 --- a/agent/tailscale.go +++ b/agent/tailscale.go @@ -93,7 +93,7 @@ func startTailscale(dataDir, nodeID, headscaleURL, authKey string) (string, erro time.Sleep(1 * time.Second) // Bring the interface up with the auth key. - ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second) defer cancel() upArgs := []string{