feat: add Kind integration tests - #46
kramaranya wants to merge 4 commits into
Conversation
Exercise the chart-owned MLflow path on Kind with real ServiceAccount tokens so edit/view RBAC, workspace isolation, and artifact flows are caught in CI instead of only by unit and Helm render checks. Signed-off-by: kramaranya <kramaranya15@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
Adds a Kind-based integration lane for validating MLflow Helm deployment, Kubernetes RBAC, workspace isolation, and artifacts.
Changes:
- Adds in-cluster SDK scenarios and Kubernetes test resources.
- Adds a reusable Kind/Helm runner and GitHub Actions workflow.
- Documents and configures the opt-in integration suite.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.dockerignore |
Excludes build artifacts from images. |
.github/workflows/integration.yml |
Runs Kind integration tests in CI. |
.gitignore |
Ignores integration results. |
AGENTS.md |
Documents the integration command. |
Makefile |
Adds the kind-e2e target. |
hack/kind-e2e.sh |
Creates the test deployment and runs pytest. |
pyproject.toml |
Registers and excludes integration tests by default. |
tests/integration/__init__.py |
Defines the integration test package. |
tests/integration/README.md |
Documents scope and execution. |
tests/integration/pod_client.py |
Implements in-pod MLflow scenarios. |
tests/integration/test_kind.py |
Provisions RBAC and orchestrates test pods. |
tests/kind/Dockerfile |
Builds the local MLflow test image. |
tests/kind/values-e2e.yaml |
Configures the Kind Helm deployment. |
Suppressed comments (1)
hack/kind-e2e.sh:42
- When
KIND_CLUSTER_NAMEalready exists, repeated runs use the same image tag and Helm sees no Pod-template change, so this availability wait can pass against the previously running server instead of the image just built and loaded. Force a restart and wait for that rollout (or use a unique tag per run) to ensure the PR image is exercised.
kubectl wait --for=condition=available deployment/mlflow --namespace mlflow --timeout=180s
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Use a unique image tag and wait for rollout, delete stale test pods, tighten cross-workspace search assertions, and trigger CI when the workflow file changes. Signed-off-by: kramaranya <kramaranya15@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
tests/integration/test_kind.py:28
- The manual test default does not match either
tests/kind/values-e2e.yamlor the runner default, which both usemlflow-integration:integration. Running the documented test module with onlyMLFLOW_INTEGRATION=1after installing that profile therefore creates client pods with the nonexistentmlflow-integration:testimage and times out in Pending.
IMAGE = os.environ.get("MLFLOW_TEST_IMAGE", "mlflow-integration:test")
Keep local kubectl pointed at the previous context after Kind runs, and uninstall leftover MLflow plus test namespaces before reusing a cluster. Signed-off-by: kramaranya <kramaranya15@gmail.com>
The Kind Dockerfile copies the repo into the image, so .dockerignore must exclude gitignored credentials and diagnostics. Signed-off-by: kramaranya <kramaranya15@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated no new comments.
Suppressed comments (2)
Previously missed (2) — in code that hasn't changed since the last review.
.github/workflows/integration.yml:10
- The Kind build consumes the repository-level
.dockerignore, but changes to that file do not trigger this workflow. An exclusion change can therefore alter or break the integration image without running this lane; include.dockerignorein the path filter.
- "hack/kind-e2e.sh"
tests/integration/test_kind.py:28
- The fallback client image does not match this PR's Kind profile (
mlflow-integration:integration). As a result, running the module directly with the advertisedMLFLOW_INTEGRATION=1opt-in creates client pods formlflow-integration:test, which is not the image loaded by the default profile and will time out inImagePullBackOff. Align the fallback; custom deployments can still overrideMLFLOW_TEST_IMAGE.
IMAGE = os.environ.get("MLFLOW_TEST_IMAGE", "mlflow-integration:test")
What this PR does / why we need it:
Adds a Kind integration lane that installs the Helm chart from the PR image and runs the MLflow SDK from pods with projected ServiceAccount tokens. This catches chart-owned RBAC, workspace isolation, and artifact failures that unit tests and Helm render checks cannot.
Related Issues/PRs:
Relates to #34
How is this PR tested?
make python-test(321 passed, integration tests deselected) andmake kind-e2e(live Kind suite passed).Does this PR require documentation update?
Documented
make kind-e2ein AGENTS.md and addedtests/integration/README.md.Checklist:
pre-commit run --all-files)make python-test)