Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
feat(make): default minikube-setup to pulling, add minikube-setup-local
Jose Ramirezce55e5c426ad
diff --git a/.github/workflows/ci-public.yml b/.github/workflows/ci-public.ymlindex 28c4ef847..6f7ab0ca5 100644--- a/.github/workflows/ci-public.yml+++ b/.github/workflows/ci-public.yml@@ -366,6 +366,9 @@ jobs:- name: Test the minikube image pullerrun: bash scripts/tests/test-minikube-pull-images.sh+ - name: Test minikube Makefile targets+ run: bash scripts/tests/test-minikube-makefile.sh+# ADMIN_PASSWORD is a required precondition of full-setup.sh Step 1 on the# default (minimal) seed profile. Two cases in this harness execute the# script against stubbed docker/minikube/kubectl, so without it they abortdiff --git a/Makefile b/Makefileindex 69e6021f8..62197f359 100644--- a/Makefile+++ b/Makefile@@ -150,20 +150,40 @@ minikube-start: ## Start minikube cluster (starts Docker Desktop if needed)minikube-stop: ## Stop minikube clusterminikube stop -p $(MINIKUBE_PROFILE)+# Images come from ghcr by default: `make minikube-setup` on a clean clone+# pulls ~25 published images instead of building 28 from source. Build+# everything locally with `make minikube-setup-local` (or IMAGE_SOURCE=local).+IMAGE_SOURCE ?= ghcr+.PHONY: minikube-setup-minikube-setup: ## Clean install from scratch (rebuilds the DB; REUSE_DB=true keeps it). SKIP_UIS=true omits Control/Profile UI. Runs 'prereqs' first (SKIP_PREREQS=true to bypass). Needs ADMIN_PASSWORD in .env.+minikube-setup: ## Clean install from scratch, PULLING published images (IMAGE_SOURCE=local or `make minikube-setup-local` builds instead). Rebuilds the DB; REUSE_DB=true keeps it. SKIP_UIS=true omits Control/Profile UI. Runs 'prereqs' first (SKIP_PREREQS=true to bypass). Needs ADMIN_PASSWORD in .env.@if [ "$(SKIP_PREREQS)" != "true" ]; then $(MAKE) --no-print-directory prereqs; fi@MINIKUBE_SKIP_UIS="$(SKIP_UIS)" MINIKUBE_SEED_PROFILE="$(SEED_PROFILE)" REUSE_DB="$(REUSE_DB)" \+ IMAGE_SOURCE="$(IMAGE_SOURCE)" MINIKUBE_IMAGE_TAG="$(MINIKUBE_IMAGE_TAG)" \scripts/minikube/full-setup.sh $(ARGS)+.PHONY: minikube-setup-local+minikube-setup-local: ## Clean install building every image from source (the pre-2026-08 behaviour; ~20 min on a clean clone). Use when you are changing service code, or when no published image exists for your platform.+ @$(MAKE) --no-print-directory minikube-setup IMAGE_SOURCE=local+.PHONY: minikube-setup-e2e-minikube-setup-e2e: ## Full setup + E2E fixtures (test user, e2e-* recipes, demo MCP servers).+minikube-setup-e2e: ## Full setup + E2E fixtures (test user, e2e-* recipes, demo MCP servers). Pulls published images, then builds the two unpublished E2E coordinator fixtures.@$(MAKE) --no-print-directory minikube-setup SEED_PROFILE=e2e+ @if [ "$(IMAGE_SOURCE)" = "ghcr" ]; then \+ echo "Building the two unpublished E2E coordinator fixtures..."; \+ MINIKUBE_PROFILE="$(MINIKUBE_PROFILE)" scripts/minikube/build-images.sh --only=workflow-custom-sdk-e2e; \+ MINIKUBE_PROFILE="$(MINIKUBE_PROFILE)" scripts/minikube/build-images.sh --only=workflow-plugin-sdk-e2e; \+ fi.PHONY: minikube-teardownminikube-teardown: ## Remove deployments (keep namespaces/CRDs)@scripts/minikube/teardown.sh+.PHONY: minikube-pull-images+minikube-pull-images: ## Pull ALL published images into minikube at the pinned release tag (MINIKUBE_IMAGE_TAG=<tag> overrides the pin for this run only)+ @MINIKUBE_PROFILE="$(MINIKUBE_PROFILE)" MINIKUBE_IMAGE_TAG="$(MINIKUBE_IMAGE_TAG)" \+ scripts/minikube/pull-images.sh+.PHONY: minikube-build-imagesminikube-build-images: ## Build and load ALL Docker images into minikube (with SHA verification)@scripts/minikube/build-images.sh@@ -173,8 +193,9 @@ minikube-build-custom-coordinator-fixture: ## Build only the custom coordinator@scripts/minikube/build-images.sh --only=workflow-custom-sdk-e2e.PHONY: minikube-verify-images-minikube-verify-images: ## Verify all image SHAs match between local Docker and minikube- @scripts/minikube/build-images.sh --verify-only+minikube-verify-images: ## Verify every image the cluster runs is present (checks ghcr refs in ghcr mode, clerum/* in local mode)+ @IMAGE_SOURCE="$(IMAGE_SOURCE)" MINIKUBE_IMAGE_TAG="$(MINIKUBE_IMAGE_TAG)" \+ scripts/minikube/build-images.sh --verify-only.PHONY: minikube-verifyminikube-verify: ## Verify all McpServers have resolved envSecrets (standalone smoke check)diff --git a/scripts/tests/test-minikube-makefile.sh b/scripts/tests/test-minikube-makefile.shindex 82223a31e..fc79cf11d 100755--- a/scripts/tests/test-minikube-makefile.sh+++ b/scripts/tests/test-minikube-makefile.sh@@ -3,6 +3,11 @@ set -uFAIL=0+REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"++pass() { echo "PASS: $1"; }+fail() { echo "FAIL: $1"; FAIL=1; }+assert_succeeds_dry() {local target="$1"if make -n "$target" >/dev/null 2>&1; then@@ -62,4 +67,90 @@ assert_make_contains "deployment/chatllm" minikube-restart-deploy SVC=mcp-host Nassert_make_contains "deployment/control-api" minikube-deploy-service SVC=control-api NS=control-planeassert_make_contains "deployment/custom-host" minikube-deploy-service SVC=mcp-host NS=mcp-host DEPLOYMENT=custom-host+# `make minikube-setup` is the first command a new contributor runs. Its+# default has to be the fast path, and the slow path has to be a named target+# rather than an env var people have to know about.+# Reads the resolved value out of the dry-run text instead of grepping for the+# absence of a substring: an unquoted-substring check (`! grep IMAGE_SOURCE=local`)+# passes vacuously once the printed form is quoted (`IMAGE_SOURCE="local"`), which+# would let a flipped `IMAGE_SOURCE ?= ghcr` default through undetected. This only+# covers the Makefile's own default -- it cannot see a compiled-in default changed+# inside full-setup.sh/build-images.sh (`${IMAGE_SOURCE:-local}`), since the+# Makefile always forwards an explicit value to those scripts. That layer is+# test-minikube-full-setup.sh's job, not this harness's.+assert_minikube_setup_defaults_to_ghcr() {+ local out resolved+ out="$(make -n -C "$REPO_ROOT" minikube-setup SKIP_PREREQS=true 2>&1)"+ resolved="$(grep -o 'IMAGE_SOURCE="[^"]*"' <<< "$out" | head -1)"+ if [ "$resolved" = 'IMAGE_SOURCE="ghcr"' ]; then+ pass "minikube-setup defaults IMAGE_SOURCE to ghcr"+ else+ fail "minikube-setup did not resolve IMAGE_SOURCE to ghcr (got '${resolved:-<none>}'): $out"+ fi+}++assert_minikube_setup_local_forces_the_build() {+ local out+ out="$(make -n -C "$REPO_ROOT" minikube-setup-local SKIP_PREREQS=true 2>&1)"+ if grep -q 'IMAGE_SOURCE=local' <<< "$out"; then+ pass "minikube-setup-local forces IMAGE_SOURCE=local"+ else+ fail "minikube-setup-local does not force a local build: $out"+ fi+}++assert_minikube_pull_images_mirrors_build_images() {+ local out+ out="$(make -n -C "$REPO_ROOT" minikube-pull-images 2>&1)"+ if grep -q 'scripts/minikube/pull-images.sh' <<< "$out"; then+ pass "minikube-pull-images invokes the puller"+ else+ fail "minikube-pull-images does not invoke pull-images.sh: $out"+ fi+}++# The two E2E coordinator fixtures are published:false, so the pull path cannot+# supply them. They must be built through the EXISTING --only flag rather than+# a second build entry point.+assert_minikube_setup_e2e_builds_both_fixtures() {+ local out missing=""+ out="$(make -n -C "$REPO_ROOT" minikube-setup-e2e SKIP_PREREQS=true 2>&1)"+ grep -q -- '--only=workflow-custom-sdk-e2e' <<< "$out" || missing+="workflow-custom-sdk-e2e "+ grep -q -- '--only=workflow-plugin-sdk-e2e' <<< "$out" || missing+="workflow-plugin-sdk-e2e "+ if [ -z "$missing" ]; then+ pass "minikube-setup-e2e builds both unpublished E2E fixtures via build-images.sh --only"+ else+ fail "minikube-setup-e2e never builds: $missing"+ fi+}++# The E2E path must not silently fall back to a full local build; that is the+# 20-minute wait this whole change removes.+assert_minikube_setup_e2e_still_uses_the_pull_path() {+ local out+ out="$(make -n -C "$REPO_ROOT" minikube-setup-e2e SKIP_PREREQS=true 2>&1)"+ if grep -q 'IMAGE_SOURCE=local' <<< "$out"; then+ fail "minikube-setup-e2e forces a full local build: $out"+ else+ pass "minikube-setup-e2e keeps the pull path and only adds the fixtures"+ fi+}++assert_the_tag_override_reaches_the_setup_script() {+ local out+ out="$(make -n -C "$REPO_ROOT" minikube-setup SKIP_PREREQS=true MINIKUBE_IMAGE_TAG=latest 2>&1)"+ if grep -q 'MINIKUBE_IMAGE_TAG="\?latest' <<< "$out"; then+ pass "MINIKUBE_IMAGE_TAG on the make command line reaches full-setup.sh"+ else+ fail "MINIKUBE_IMAGE_TAG did not reach the script: $out"+ fi+}++assert_minikube_setup_defaults_to_ghcr+assert_minikube_setup_local_forces_the_build+assert_minikube_pull_images_mirrors_build_images+assert_minikube_setup_e2e_builds_both_fixtures+assert_minikube_setup_e2e_still_uses_the_pull_path+assert_the_tag_override_reaches_the_setup_script+exit $FAIL