Skip to content

remove minikube from Makefile#1036

Merged
mergify[bot] merged 1 commit intomainfrom
remove-minikube-from-makefile
Mar 27, 2026
Merged

remove minikube from Makefile#1036
mergify[bot] merged 1 commit intomainfrom
remove-minikube-from-makefile

Conversation

@ktdreyer
Copy link
Copy Markdown
Contributor

@ktdreyer ktdreyer commented Mar 25, 2026

Summary

  • Remove minikube-only targets (local-url, check-minikube, _build-and-load) and minikube references from remaining targets (local-down, local-status, local-test-quick, makefile-health, check-local-context, _show-access-info)
  • Add per-component kind reload targets: kind-reload-backend, kind-reload-frontend, kind-reload-operator
  • Add deprecation aliases for removed targets (local-up, local-clean, local-rebuild, local-reload-backend/frontend/operator) that print a warning and delegate to the kind equivalent
  • Follow-up issue update docs to reference kind targets instead of local-up #1080 tracks updating docs that still reference the old target names

Fixes #992

Test plan

  • make help displays correctly with updated examples
  • make help still lists local-up (with deprecation note)
  • make kind-up still works as the local dev entrypoint
  • make kind-rebuild still works for reloading components
  • make kind-reload-backend / kind-reload-frontend / kind-reload-operator dry-run succeeds
  • make local-up prints deprecation warning and delegates to kind-up
  • make local-status correctly detects kind clusters
  • make local-test-quick correctly detects kind clusters
  • make makefile-health runs without errors
  • No minikube references remain in Makefile (except one comment documenting that the deprecated aliases replace the old minikube-based workflow)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 25, 2026

Walkthrough

The Makefile is refactored to standardize on Kind as the exclusive local Kubernetes development platform. Minikube-specific targets, helpers, and checks are removed entirely, new Kind reload targets are introduced, and deprecated aliases are added for backward compatibility while directing users to Kind-based workflows.

Changes

Cohort / File(s) Summary
Minikube Target Removals
Makefile
Removed Minikube-specific targets (local-up, local-clean, local-rebuild, local-reload-backend, local-reload-frontend, local-reload-operator) and helper (_build-and-load); eliminated Minikube version detection and status reporting.
Kind Reload Targets
Makefile
Added new targets kind-reload-backend, kind-reload-frontend, and kind-reload-operator that rebuild container images and import them into Kind via container engine save/exec and ctr images import, followed by Kubernetes rollout restarts.
Context and Health Checks
Makefile
Updated check-local-context to validate only kind- prefixed kubectl contexts; replaced makefile-health prerequisites from check-minikube check-kubectl to check-kind check-kubectl; modified local-test-quick to error if Kind cluster is absent.
Documentation and User Output
Makefile
Updated help target to reference kind-up/kind-rebuild instead of Minikube examples; modified _show-access-info to print Kind-specific port-forward instructions and localhost URLs based on KIND_FWD_* ports; updated local-down description and local-dev-token messaging.
Backward Compatibility Aliases
Makefile
Introduced deprecated alias targets (local-up, local-clean, local-rebuild, local-reload-backend, local-reload-frontend, local-reload-operator) that emit warnings and delegate to corresponding kind-* targets.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately and concisely summarizes the main change: removing minikube references from the Makefile. It is clear, specific, and directly related to the changeset.
Description check ✅ Passed The PR description is comprehensive and directly related to the changeset. It details removed minikube targets, new kind reload targets, deprecation aliases, and includes a thorough test plan demonstrating the changes.
Linked Issues check ✅ Passed The PR successfully addresses issue #992 by removing minikube-specific targets (local-url, check-minikube, _build-and-load), eliminating minikube references from existing targets, adding per-component kind reload targets, and implementing backward-compatible deprecation aliases with warnings.
Out of Scope Changes check ✅ Passed All changes in the PR are directly aligned with the stated objectives of removing minikube references and adding kind-based alternatives. No out-of-scope changes are present; the modification is focused and cohesive.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-minikube-from-makefile

Comment @coderabbitai help to get the list of available commands and usage tips.

@ambient-code
Copy link
Copy Markdown
Contributor

ambient-code bot commented Mar 26, 2026

Review Queue Status

Check Status Detail
CI FAIL test-local-dev-simulation
Conflicts pass ---
Reviews pass ---

Action needed: Fix failing CI checks

Auto-generated by Review Queue workflow. Updated when PR changes.

@ktdreyer ktdreyer force-pushed the remove-minikube-from-makefile branch from 80fcdb7 to 99dc330 Compare March 26, 2026 14:27
@ktdreyer
Copy link
Copy Markdown
Contributor Author

This is a breaking change. The test-local-dev-simulation test failed because make local-up no longer works.

I've edited the test.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Makefile (1)

772-783: ⚠️ Potential issue | 🟠 Major

Don’t relax this guard to any kind-* context.

This file already derives a worktree-specific KIND_CLUSTER_NAME, but this check now accepts any kind context. That means local-down can delete the namespace in the wrong cluster, and kind-rebuild can load images into $(KIND_CLUSTER_NAME) while kubectl apply and kubectl rollout hit whichever other kind context is active.

Suggested fix
 	`@ctx`=$$(kubectl config current-context 2>/dev/null || echo ""); \
-	if echo "$$ctx" | grep -qE '^kind-'; then \
+	expected="kind-$(KIND_CLUSTER_NAME)"; \
+	if [ "$$ctx" = "$$expected" ]; then \
 		: ; \
 	else \
-		echo "$(COLOR_RED)✗$(COLOR_RESET) Current kubectl context '$$ctx' does not look like a local cluster."; \
-		echo "  Expected a context starting with 'kind-'."; \
-		echo "  Switch context first, e.g.: kubectl config use-context kind-ambient-local"; \
+		echo "$(COLOR_RED)✗$(COLOR_RESET) Current kubectl context '$$ctx' does not match this worktree's cluster."; \
+		echo "  Expected: $$expected"; \
+		echo "  Switch context first: kubectl config use-context $$expected"; \
 		echo ""; \
 		echo "  To bypass this check: make <target> SKIP_CONTEXT_CHECK=true"; \
 		exit 1; \
 	fi

If kind-login is meant to switch from arbitrary contexts, that target should stop depending on this helper and pass --context kind-$(KIND_CLUSTER_NAME) explicitly instead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 772 - 783, The current check-local-context target
allows any context matching '^kind-' which is too permissive; change the check
to verify the current context equals the exact expected context for this
worktree (derive EXPECTED_CTX as "kind-$(KIND_CLUSTER_NAME)" and compare
current-context to that string rather than a prefix match) so commands only run
against the intended cluster; if kind-login is supposed to switch contexts,
update that target to stop depending on check-local-context and instead invoke
kubectl with --context=kind-$(KIND_CLUSTER_NAME) explicitly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Makefile`:
- Around line 419-426: The local-test-quick target uses a bare `kind get
clusters` check which can miss Podman-backed clusters and may detect clusters
from other worktrees; update the check in the local-test-quick recipe (target
name: local-test-quick) to mirror the provider-aware logic used in the
local-status target: honor the KIND_EXPERIMENTAL_PROVIDER environment variable
and query for the specific cluster name $(KIND_CLUSTER_NAME) when probing (i.e.,
use the same `KIND_EXPERIMENTAL_PROVIDER=... kind get clusters | grep -q
$(KIND_CLUSTER_NAME)` style approach as in local-status) so the probe reliably
detects the intended cluster regardless of provider.

---

Outside diff comments:
In `@Makefile`:
- Around line 772-783: The current check-local-context target allows any context
matching '^kind-' which is too permissive; change the check to verify the
current context equals the exact expected context for this worktree (derive
EXPECTED_CTX as "kind-$(KIND_CLUSTER_NAME)" and compare current-context to that
string rather than a prefix match) so commands only run against the intended
cluster; if kind-login is supposed to switch contexts, update that target to
stop depending on check-local-context and instead invoke kubectl with
--context=kind-$(KIND_CLUSTER_NAME) explicitly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ad6d32bc-2c3a-47d6-a75e-05f281f5f343

📥 Commits

Reviewing files that changed from the base of the PR and between 80fcdb7 and 7d80b31.

📒 Files selected for processing (2)
  • Makefile
  • tests/local-dev-test.sh

Comment on lines +419 to +426
local-test-quick: check-kubectl ## Quick smoke test of local environment
@echo "$(COLOR_BOLD)🧪 Quick Smoke Test$(COLOR_RESET)"
@echo ""
@echo "$(COLOR_BLUE)▶$(COLOR_RESET) Detecting cluster type..."
@if kind get clusters 2>/dev/null | grep -q .; then \
echo "$(COLOR_GREEN)✓$(COLOR_RESET) Kind cluster running"; \
CLUSTER_TYPE=kind; \
elif command -v minikube >/dev/null 2>&1 && minikube status >/dev/null 2>&1; then \
echo "$(COLOR_GREEN)✓$(COLOR_RESET) Minikube running"; \
CLUSTER_TYPE=minikube; \
else \
echo "$(COLOR_RED)✗$(COLOR_RESET) No local cluster found (kind or minikube)"; exit 1; \
echo "$(COLOR_RED)✗$(COLOR_RESET) No kind cluster found. Run 'make kind-up' first."; exit 1; \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's examine the Makefile to understand the context
cd "$(git rev-parse --show-toplevel)" 2>/dev/null || cd .

# Check file existence
if [ -f Makefile ]; then
  echo "=== Checking Makefile structure ==="
  wc -l Makefile
else
  echo "Makefile not found, searching..."
  find . -name "Makefile" -type f | head -5
fi

Repository: ambient-code/platform

Length of output: 113


🏁 Script executed:

# Let's look at the specific sections mentioned in the review
# First, find the lines around 419-426 (local-test-quick)
sed -n '415,430p' Makefile

Repository: ambient-code/platform

Length of output: 1006


🏁 Script executed:

# Now look at the local-status target (mentioned as having the correct pattern)
# Search for local-status definition
grep -n "^local-status:" Makefile

Repository: ambient-code/platform

Length of output: 131


🏁 Script executed:

# Search for KIND_CLUSTER_NAME definition
grep -n "KIND_CLUSTER_NAME" Makefile | head -20

Repository: ambient-code/platform

Length of output: 2073


🏁 Script executed:

# Search for how local-status implements the kind get clusters check
grep -n "local-status" Makefile -A 10 | grep -E "kind get clusters|KIND_EXPERIMENTAL_PROVIDER"

Repository: ambient-code/platform

Length of output: 224


Reuse the provider-aware kind get clusters check from local-status.

Kind's Quick Start documents KIND_EXPERIMENTAL_PROVIDER as the runtime selector. The current bare kind get clusters can fail to detect a Podman-backed cluster, and it checks for any cluster rather than $(KIND_CLUSTER_NAME), allowing a different worktree's cluster to satisfy the probe. The local-status target (line 317) already implements the correct pattern; apply the same approach here.

Suggested fix
-	`@if` kind get clusters 2>/dev/null | grep -q .; then \
+	`@if` $(if $(filter podman,$(CONTAINER_ENGINE)),KIND_EXPERIMENTAL_PROVIDER=podman) kind get clusters 2>/dev/null | grep -q '^$(KIND_CLUSTER_NAME)$$'; then \
 		echo "$(COLOR_GREEN)✓$(COLOR_RESET) Kind cluster running"; \
 	else \
 		echo "$(COLOR_RED)✗$(COLOR_RESET) No kind cluster found. Run 'make kind-up' first."; exit 1; \
 	fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
local-test-quick: check-kubectl ## Quick smoke test of local environment
@echo "$(COLOR_BOLD)🧪 Quick Smoke Test$(COLOR_RESET)"
@echo ""
@echo "$(COLOR_BLUE)▶$(COLOR_RESET) Detecting cluster type..."
@if kind get clusters 2>/dev/null | grep -q .; then \
echo "$(COLOR_GREEN)✓$(COLOR_RESET) Kind cluster running"; \
CLUSTER_TYPE=kind; \
elif command -v minikube >/dev/null 2>&1 && minikube status >/dev/null 2>&1; then \
echo "$(COLOR_GREEN)✓$(COLOR_RESET) Minikube running"; \
CLUSTER_TYPE=minikube; \
else \
echo "$(COLOR_RED)✗$(COLOR_RESET) No local cluster found (kind or minikube)"; exit 1; \
echo "$(COLOR_RED)✗$(COLOR_RESET) No kind cluster found. Run 'make kind-up' first."; exit 1; \
local-test-quick: check-kubectl ## Quick smoke test of local environment
`@echo` "$(COLOR_BOLD)🧪 Quick Smoke Test$(COLOR_RESET)"
`@echo` ""
`@echo` "$(COLOR_BLUE)▶$(COLOR_RESET) Detecting cluster type..."
`@if` $(if $(filter podman,$(CONTAINER_ENGINE)),KIND_EXPERIMENTAL_PROVIDER=podman) kind get clusters 2>/dev/null | grep -q '^$(KIND_CLUSTER_NAME)$$'; then \
echo "$(COLOR_GREEN)✓$(COLOR_RESET) Kind cluster running"; \
else \
echo "$(COLOR_RED)✗$(COLOR_RESET) No kind cluster found. Run 'make kind-up' first."; exit 1; \
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 419 - 426, The local-test-quick target uses a bare
`kind get clusters` check which can miss Podman-backed clusters and may detect
clusters from other worktrees; update the check in the local-test-quick recipe
(target name: local-test-quick) to mirror the provider-aware logic used in the
local-status target: honor the KIND_EXPERIMENTAL_PROVIDER environment variable
and query for the specific cluster name $(KIND_CLUSTER_NAME) when probing (i.e.,
use the same `KIND_EXPERIMENTAL_PROVIDER=... kind get clusters | grep -q
$(KIND_CLUSTER_NAME)` style approach as in local-status) so the probe reliably
detects the intended cluster regardless of provider.

@ktdreyer ktdreyer marked this pull request as draft March 26, 2026 18:45
@ktdreyer ktdreyer force-pushed the remove-minikube-from-makefile branch 2 times, most recently from a6c72ca to a67ece7 Compare March 27, 2026 19:18
Issue #898 dropped minikube support, but the Makefile still had
minikube targets and references. These stale targets cause confusion
when working on Makefile changes because they appear to be active
code that needs maintenance.

Remove minikube-only targets and update remaining targets (local-down,
local-status, local-test-quick, makefile-health, check-local-context,
_show-access-info) to reference kind instead.

Add per-component kind reload targets (kind-reload-backend,
kind-reload-frontend, kind-reload-operator) so developers can iterate
on a single service without rebuilding the entire stack.

Preserve backward compatibility with deprecation aliases that print
a warning and delegate to the kind equivalent. A follow-up issue
(#1080) tracks updating docs that still reference the old names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ktdreyer ktdreyer force-pushed the remove-minikube-from-makefile branch from a67ece7 to 0ced67a Compare March 27, 2026 19:36
@ktdreyer ktdreyer marked this pull request as ready for review March 27, 2026 19:36
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
Makefile (1)

419-427: ⚠️ Potential issue | 🟠 Major

Inconsistent cluster detection pattern in local-test-quick.

The kind get clusters check here doesn't use the provider-aware pattern (KIND_EXPERIMENTAL_PROVIDER=podman) and checks for any cluster rather than the specific $(KIND_CLUSTER_NAME). This is inconsistent with the correct implementation in local-status (line 317).

Suggested fix to align with local-status
-	`@if` kind get clusters 2>/dev/null | grep -q .; then \
+	`@if` $(if $(filter podman,$(CONTAINER_ENGINE)),KIND_EXPERIMENTAL_PROVIDER=podman) kind get clusters 2>/dev/null | grep -q '^$(KIND_CLUSTER_NAME)$$'; then \
 		echo "$(COLOR_GREEN)✓$(COLOR_RESET) Kind cluster running"; \
 	else \
 		echo "$(COLOR_RED)✗$(COLOR_RESET) No kind cluster found. Run 'make kind-up' first."; exit 1; \
 	fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 419 - 427, The local-test-quick Make target uses a
generic `kind get clusters` check and doesn't respect the provider or the
configured cluster name; update the `local-test-quick` target to mirror the
`local-status` pattern by invoking
`KIND_EXPERIMENTAL_PROVIDER=$(KIND_EXPERIMENTAL_PROVIDER) kind get clusters` and
grepping specifically for `$(KIND_CLUSTER_NAME)` instead of any non-empty
output, so detection is provider-aware and matches the intended cluster; ensure
the success/failure messages remain and the failure path exits with non-zero
status as before.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@Makefile`:
- Around line 419-427: The local-test-quick Make target uses a generic `kind get
clusters` check and doesn't respect the provider or the configured cluster name;
update the `local-test-quick` target to mirror the `local-status` pattern by
invoking `KIND_EXPERIMENTAL_PROVIDER=$(KIND_EXPERIMENTAL_PROVIDER) kind get
clusters` and grepping specifically for `$(KIND_CLUSTER_NAME)` instead of any
non-empty output, so detection is provider-aware and matches the intended
cluster; ensure the success/failure messages remain and the failure path exits
with non-zero status as before.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 13ea9bd9-8683-4806-9a52-6254064f68d3

📥 Commits

Reviewing files that changed from the base of the PR and between 7d80b31 and 0ced67a.

📒 Files selected for processing (1)
  • Makefile

Copy link
Copy Markdown
Member

@bobbravo2 bobbravo2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this PR locally when working a bug. Kind is solid, thanks 🙏

@mergify mergify bot added the queued label Mar 27, 2026
mergify bot added a commit that referenced this pull request Mar 27, 2026
@mergify mergify bot merged commit 2bc8e00 into main Mar 27, 2026
17 checks passed
@mergify mergify bot deleted the remove-minikube-from-makefile branch March 27, 2026 22:26
@mergify
Copy link
Copy Markdown

mergify bot commented Mar 27, 2026

Merge Queue Status

This pull request spent 10 seconds in the queue, including 1 second running CI.

Required conditions to merge

@mergify mergify bot removed the queued label Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove minikube from Makefile

2 participants