diff --git a/Makefile b/Makefile index eff9de2..ef5af9e 100644 --- a/Makefile +++ b/Makefile @@ -83,7 +83,7 @@ clean-logs: ax-image: @echo "Building container image with ko..." - GOFLAGS="-tags=ate" ko build --base-import-paths ./cmd/ax + ko build --base-import-paths ./cmd/ax ax-server-image: @echo "Building ax-server (harness path) container image with ko..." @@ -91,12 +91,12 @@ ax-server-image: axepp-image: @echo "Building axepp container image with ko..." - GOFLAGS="-tags=ate" ko build --base-import-paths ./cmd/axepp + ko build --base-import-paths ./cmd/axepp ax-shell-image: # Used to debug ax servers within a cluster. @echo "Building ax shell container image with ko using busybox..." - KO_DOCKER_REPO=$(KO_DOCKER_REPO)/ax-shell KO_DEFAULTBASEIMAGE=busybox:1.36 GOFLAGS="-tags=ate" ko build --base-import-paths ./cmd/ax + KO_DOCKER_REPO=$(KO_DOCKER_REPO)/ax-shell KO_DEFAULTBASEIMAGE=busybox:1.36 ko build --base-import-paths ./cmd/ax # Build all container images images: ax-image axepp-image ax-shell-image diff --git a/cmd/axepp/main.go b/cmd/axepp/main.go index 8c8c373..ed4fba3 100644 --- a/cmd/axepp/main.go +++ b/cmd/axepp/main.go @@ -1,4 +1,3 @@ -//go:build ate // Copyright 2026 Google LLC // diff --git a/hack/install-ax.sh b/hack/install-ax.sh index 9885092..4024fc7 100755 --- a/hack/install-ax.sh +++ b/hack/install-ax.sh @@ -45,7 +45,7 @@ run_kubectl() { } run_ko() { - GOFLAGS="-tags=ate" ko apply \ + ko apply \ ${KUBECTL_CONTEXT:+--context=${KUBECTL_CONTEXT}} \ "$@" } diff --git a/internal/server/server_ate.go b/internal/server/server_ate.go index c3b2c57..94428f3 100644 --- a/internal/server/server_ate.go +++ b/internal/server/server_ate.go @@ -1,4 +1,4 @@ -//go:build !harness && ate +//go:build !harness // Copyright 2026 Google LLC // @@ -29,7 +29,7 @@ import ( "google.golang.org/grpc/credentials" ) -func createATEClient() any { +func createATEClient() *ate.Client { if os.Getenv("AX_SUBSTRATE") != "1" { return nil } @@ -76,8 +76,7 @@ func suspendActor(actorID string) { if client == nil { return } - c := client.(*ate.Client) - defer c.Close() + defer client.Close() log.Printf("Automatically suspending actor %s in 50 milliseconds...", actorID) time.Sleep(50 * time.Millisecond) @@ -85,7 +84,7 @@ func suspendActor(actorID string) { suspendCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() - if _, err := c.SuspendActor(suspendCtx, actorID); err != nil { + if _, err := client.SuspendActor(suspendCtx, actorID); err != nil { log.Printf("Failed to automatically suspend actor %s: %v", actorID, err) } else { log.Printf("Successfully suspended actor %s", actorID) diff --git a/internal/server/server_no_ate.go b/internal/server/server_no_ate.go deleted file mode 100644 index e239110..0000000 --- a/internal/server/server_no_ate.go +++ /dev/null @@ -1,21 +0,0 @@ -//go:build !harness && !ate - -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package server - -func suspendActor(actorID string) { - // No-op -}