test(e2e): e2e k8s environment tests using chainsaw#365
Conversation
Greptile SummaryThis PR introduces a Chainsaw-based E2E test suite for the Kubernetes and Slinky engines, covering six test scenarios (label application, label truncation, tree topology, DRA provider, block complement, and dynamic nodes) against a real kind cluster. It also ships a GitHub Actions workflow (
Confidence Score: 5/5Safe to merge; all tests are additive and the workflow is manually triggered, so no risk to existing CI pipelines. The two previously flagged image-tag correctness issues are now resolved — the workflow uses the short commit SHA throughout and passes the tag via a make command-line assignment. The Chainsaw binary is now verified against a downloaded checksum file before installation. The test suites follow a disciplined prepare/install/assert/cleanup pattern with diagnostic catch blocks. The remaining notes are minor quality items (unpinned kind version, hardcoded TARGETOS) that do not affect test correctness. Makefile: the Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A([workflow_dispatch]) --> B[actions/checkout]
B --> C[Set up Go]
C --> D[Install kind via go install]
D --> E[Install Chainsaw + verify SHA256]
E --> F[kind create cluster]
F --> G[make build-linux-amd64]
G --> H[make image-build IMAGE_TAG=short-sha]
H --> I[kind load docker-image]
I --> J[make e2e E2E_IMAGE_TAG=short-sha]
J --> K{Chainsaw suites}
K --> L[k8s/label-application]
K --> M[k8s/label-truncation]
K --> N[slinky/tree-topology]
K --> O[slinky/dra-provider]
K --> P[slinky/block-complement]
K --> Q[slinky/dynamic-nodes]
L --> R[prepare fake nodes + ConfigMap]
R --> S[helm upgrade --install topograph]
S --> T[Node Observer fires → /v1/generate]
T --> U{assert labels / ConfigMap}
U -->|pass| V[finally: helm uninstall + cleanup]
U -->|fail| W[catch: kubectl logs + describe]
W --> V
J -->|always| X[kind delete cluster]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A([workflow_dispatch]) --> B[actions/checkout]
B --> C[Set up Go]
C --> D[Install kind via go install]
D --> E[Install Chainsaw + verify SHA256]
E --> F[kind create cluster]
F --> G[make build-linux-amd64]
G --> H[make image-build IMAGE_TAG=short-sha]
H --> I[kind load docker-image]
I --> J[make e2e E2E_IMAGE_TAG=short-sha]
J --> K{Chainsaw suites}
K --> L[k8s/label-application]
K --> M[k8s/label-truncation]
K --> N[slinky/tree-topology]
K --> O[slinky/dra-provider]
K --> P[slinky/block-complement]
K --> Q[slinky/dynamic-nodes]
L --> R[prepare fake nodes + ConfigMap]
R --> S[helm upgrade --install topograph]
S --> T[Node Observer fires → /v1/generate]
T --> U{assert labels / ConfigMap}
U -->|pass| V[finally: helm uninstall + cleanup]
U -->|fail| W[catch: kubectl logs + describe]
W --> V
J -->|always| X[kind delete cluster]
Reviews (8): Last reviewed commit: "test(e2e): e2e k8s environment tests usi..." | Re-trigger Greptile |
|
/ok-to-test 9fee2e8 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #365 +/- ##
==========================================
+ Coverage 68.46% 72.36% +3.90%
==========================================
Files 82 86 +4
Lines 4842 5312 +470
==========================================
+ Hits 3315 3844 +529
+ Misses 1395 1278 -117
- Partials 132 190 +58 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
31d1489 to
91eea39
Compare
|
/ok-to-test 91eea39 |
|
🌿 Preview your docs: https://nvidia-preview-pull-request-365.docs.buildwithfern.com/topograph |
|
/ok-to-test a10bc7d |
b7ac4d8 to
5a07060
Compare
|
/ok-to-test 5a07060 |
Signed-off-by: Ravi Shankar <ravish@nvidia.com>
Description
End-2-end tests for the Kubernetes environment using Chainsaw.
Addresses issue #263
Checklist
git commit -s).