mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 17:11:30 +00:00
cee73671ff
* feat(bedrock): Ochre runtime MVP — Converse over self-host + Anthropic-direct Add the AWS-Bedrock-compatible gateway services (bedrock, bedrock-runtime) following the EKS REST-JSON pattern: ListFoundationModels / GetFoundationModel over a static connectivity-tiered catalog, and non-streaming Converse routed per modelId to one of two provider backends — self-hosted vLLM (OpenAI wire) and Anthropic-direct (Anthropic Messages wire). Per-account provider API keys are a master-key-encrypted JetStream KV secret with an optional platform default; the advertised catalog gates external models on a resolvable credential. Self-host endpoints are pinned via config (OCHRE_VLLM_ENDPOINTS) behind an EndpointResolver seam. Adds gateway/bedrock/ (catalog, provider router, Anthropic + vLLM adapters, credential store), awserrors REST-JSON codes, and the bedrock E2E suite (list/get light; Converse gated on live backends). Daemon/NATS control plane and dynamic endpoint lifecycle are deferred to Phase 3. * test(bedrock): cover dispatch, router, credentials KV + endpoint config Add unit coverage for the Ochre Phase 1 diff: Bedrock_Request / BedrockRuntime_Request end-to-end dispatch, provider router, JSON response/error writers, upstream-status mapping, the credential-store KV round-trip, the Anthropic bound-provider path, and parseBedrockEndpoints. Lifts PR diff coverage above the 60% gate.
60 lines
2.2 KiB
Makefile
60 lines
2.2 KiB
Makefile
PKG ?= ./cert/... ./lb/... ./eks/... ./ecs/... ./iam/... ./ecr/... ./bedrock/... ./multinode/... ./baremetal/... ./reboot/... ./tofu/...
|
|
ARTIFACT_DIR ?= /tmp/spinifex-e2e-artifacts
|
|
TIMEOUT ?= 30m
|
|
MODE ?= single
|
|
# GOTESTSUM=1 emits JUnit XML + JSON streams for CI. Suite tag derives from the
|
|
# first path component of PKG so per-suite targets get distinct artifact names.
|
|
GOTESTSUM ?=
|
|
SUITE_TAG ?= $(notdir $(patsubst %/...,%,$(firstword $(PKG))))
|
|
|
|
# Pre-built test binaries — see mulga-siv-80. `e2e-build` cross-compiles each
|
|
# named suite into BIN_DIR/<suite>.test so CI can ship binaries (not source +
|
|
# go toolchain) to the remote VM.
|
|
BIN_DIR ?= $(CURDIR)/_bin
|
|
SUITES_BUILD ?= cert lb eks ecs single iam ecr bedrock gpu natuplink
|
|
|
|
.PHONY: e2e e2e-cert e2e-lb e2e-eks e2e-ecs e2e-single e2e-iam e2e-ecr e2e-bedrock e2e-multinode e2e-bm e2e-reboot e2e-tofu e2e-gpu e2e-natuplink e2e-all clean e2e-build
|
|
|
|
ifeq ($(GOTESTSUM),1)
|
|
E2E_CMD = gotestsum \
|
|
--junitfile $(ARTIFACT_DIR)/junit-$(SUITE_TAG).xml \
|
|
--jsonfile $(ARTIFACT_DIR)/gotest-$(SUITE_TAG).json \
|
|
--format=testname \
|
|
-- -tags=e2e -timeout=$(TIMEOUT) $(PKG)
|
|
else
|
|
E2E_CMD = go test -tags=e2e -v -timeout=$(TIMEOUT) $(PKG)
|
|
endif
|
|
|
|
e2e:
|
|
@mkdir -p $(ARTIFACT_DIR)
|
|
SPINIFEX_E2E=1 \
|
|
SPINIFEX_MODE=$(MODE) \
|
|
ARTIFACT_DIR=$(ARTIFACT_DIR) \
|
|
$(E2E_CMD)
|
|
|
|
e2e-cert: ; $(MAKE) e2e PKG=./cert/...
|
|
e2e-lb: ; $(MAKE) e2e PKG=./lb/...
|
|
e2e-eks: ; $(MAKE) e2e PKG=./eks/...
|
|
e2e-ecs: ; $(MAKE) e2e PKG=./ecs/...
|
|
e2e-single: ; $(MAKE) e2e PKG=./single/...
|
|
e2e-iam: ; $(MAKE) e2e PKG=./iam/...
|
|
e2e-ecr: ; $(MAKE) e2e PKG=./ecr/...
|
|
e2e-bedrock: ; $(MAKE) e2e PKG=./bedrock/...
|
|
e2e-multinode: ; $(MAKE) e2e PKG=./multinode/... MODE=multinode
|
|
e2e-bm: ; $(MAKE) e2e PKG=./baremetal/... MODE=baremetal
|
|
e2e-reboot: ; $(MAKE) e2e PKG=./reboot/...
|
|
e2e-tofu: ; $(MAKE) e2e PKG=./tofu/...
|
|
e2e-gpu: ; $(MAKE) e2e PKG=./gpu/...
|
|
e2e-natuplink: ; $(MAKE) e2e PKG=./natuplink/...
|
|
e2e-all: ; $(MAKE) e2e
|
|
|
|
e2e-build:
|
|
@mkdir -p $(BIN_DIR)
|
|
@for s in $(SUITES_BUILD); do \
|
|
echo "==> building $$s.test"; \
|
|
go test -c -tags=e2e -o $(BIN_DIR)/$$s.test ./$$s/ || exit 1; \
|
|
done
|
|
|
|
clean:
|
|
rm -rf $(ARTIFACT_DIR) $(BIN_DIR)
|