test: add deterministic desktop E2E system - #265
Conversation
|
Warning Review limit reached
Next review available in: 12 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (13)
📝 WalkthroughWalkthroughThis PR adds deterministic fast, native, desktop, and Kubernetes-backed E2E suites, including Kind fixtures, Tauri E2E gating, strict kubeconfig validation, WDIO configurations, CI and release matrices, watch error tests, and documentation for the supported Kubernetes window. ChangesDeterministic E2E Lab
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant CI
participant lifecycle as e2e/lifecycle.ts
participant Kind
participant Tauri
participant WDIO
CI->>lifecycle: Run e2e:real
lifecycle->>Kind: Create and bootstrap cluster
lifecycle->>Tauri: Build E2E application
lifecycle->>WDIO: Launch native inspection suite
WDIO->>Tauri: Invoke Kubernetes operations
Tauri->>Kind: Read and modify fixture resources
Kind-->>WDIO: Return discovery, watch, log, exec, and apply results
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 11
🧹 Nitpick comments (2)
src-tauri/src/e2e.rs (1)
170-196: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueTest-only
serde_yamlusage.Not a change to flag for this PR since it's confined to the
#[cfg(test)]module, but worth notingserde_yamlwas marked deprecated by its maintainer (its published version carries a+deprecatedsuffix). If new test dependencies are being added, a maintained fork (e.g.serde_yaml_ngorserde_norway) would be preferable going forward.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src-tauri/src/e2e.rs` around lines 170 - 196, Keep the test-only YAML parsing in valid_config unchanged for this PR; no production dependency change is required. For future new test dependencies, prefer a maintained serde_yaml fork such as serde_yaml_ng or serde_norway.e2e/lifecycle.ts (1)
113-115: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemove the hardcoded Podman fallback path.
/opt/podman/bin/podmanembeds Unix path separators and is probed on every non-PATH Podman lookup. Use platform-gated, path-helper-based discovery or requirepodmanonPATH.As per coding guidelines, “All changes must work on macOS, Windows, and Linux; do not hardcode path separators, path-list separators, or home directories.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@e2e/lifecycle.ts` around lines 113 - 115, Remove the hardcoded /opt/podman/bin/podman fallback from providerBinary. Make Podman discovery rely on Bun.which or a platform-aware path helper that uses platform-native separators, while preserving the existing providerEnvironment and ensureProvider behavior.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/e2e.yml:
- Line 61: Replace the mutable actions/upload-artifact@v7 reference with the
reviewed immutable commit SHA at .github/workflows/e2e.yml lines 61 and 114, and
.github/workflows/release.yml line 201; update all three uses consistently.
In `@docs/development-workflow.md`:
- Around line 57-63: Update the E2E runner lifecycle description near the
`--keep` examples to state that cluster deletion is skipped when `--keep` is set
locally. Preserve the existing behavior description for success, failure, and
signal paths when `--keep` is not used, and retain that `--keep` is rejected in
CI.
In `@e2e/fixtures/all.yaml`:
- Around line 29-44: Harden both Deployment container specs: in
e2e/fixtures/all.yaml lines 29-44 and 45-68, configure non-root execution,
disable privilege escalation, drop all capabilities, and enable a read-only root
filesystem. In the fixture-api Deployment at lines 45-68, additionally define an
emptyDir volume and mount it at /www so generated HTTP content remains writable.
In `@e2e/lifecycle.ts`:
- Around line 74-79: Update the Node version validation in the lifecycle flow
before the WDIO execute calls to reject versions below 18.20.0, including Node
16/17 and Node 18.0–18.19. Preserve the existing direct execution for supported
Node versions through 24 and the fnm fallback for newer versions, using the
parsed version data from the existing version check.
In `@e2e/specs/real/inspection.e2e.ts`:
- Around line 17-24: Restore typed Tauri command boundaries: in
e2e/specs/real/inspection.e2e.ts lines 17-24 replace the generic invoke helper
with typed command wrappers; update lines 33-44 with typed streaming-command
wrappers and return handles; and in e2e/specs/desktop/smoke.e2e.ts lines 7-10
call list_kube_contexts through its typed wrapper, ensuring no direct untyped
bridge invocation remains.
- Line 10: Validate KUBECOVE_E2E_CLUSTER once before constructing
cluster-related names, failing immediately when it is absent; then derive the
admin and other context names from the validated value. Update the cluster-name
initialization and its corresponding context at the referenced symbol so no
undefined-admin value can propagate.
In `@e2e/wdio.fast.conf.ts`:
- Line 18: Use the platform-safe path construction provided by path.join for the
screenshot destination in the saveScreenshot calls in e2e/wdio.fast.conf.ts
lines 18-18 and e2e/wdio.real.conf.ts lines 20-20, joining each artifacts
directory with its generated failure filename.
In `@e2e/wdio.real.conf.ts`:
- Line 16: Update the appBinaryPath fallback in the `@wdio/tauri-service`
configuration to select the platform-appropriate binary name, including the .exe
suffix on Windows, while preserving the KUBECOVE_E2E_BINARY override.
In `@src-tauri/src/commands/kubeconfig.rs`:
- Around line 85-91: The E2E kubeconfig path construction must ignore inherited
KUBECOVE_E2E_KUBECONFIG_SOURCE values. Add an E2E-only source constructor near
the existing from_settings flow that uses only crate::e2e::kubeconfig_path(),
update the E2E branch to call it, and add a regression test proving a preset
environment variable cannot override the validated E2E kubeconfig.
In `@src-tauri/src/commands/streams/watch.rs`:
- Around line 52-60: Update reset_resource_version_for_error to reset
resource_version to "0" only when the WatchEvent::Error status represents 410
Gone/Expired; return the error message without changing the cursor for other
failures such as 403, 429, or 5xx. Add a test verifying that a non-410 error
preserves an existing resource version of "55".
In `@src-tauri/src/e2e.rs`:
- Around line 45-75: Update required_absolute_path to stop comparing canonical
against the original path and remove the resulting “must be canonical”
rejection; after validating the path type, return the fs::canonicalize result
directly. Preserve the existing absolute-path, availability, and file/directory
validation behavior.
---
Nitpick comments:
In `@e2e/lifecycle.ts`:
- Around line 113-115: Remove the hardcoded /opt/podman/bin/podman fallback from
providerBinary. Make Podman discovery rely on Bun.which or a platform-aware path
helper that uses platform-native separators, while preserving the existing
providerEnvironment and ensureProvider behavior.
In `@src-tauri/src/e2e.rs`:
- Around line 170-196: Keep the test-only YAML parsing in valid_config unchanged
for this PR; no production dependency change is required. For future new test
dependencies, prefer a maintained serde_yaml fork such as serde_yaml_ng or
serde_norway.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 2c21ab3a-7d1d-47a6-99cf-26dda9feee49
⛔ Files ignored due to path filters (2)
bun.lockis excluded by!**/*.locksrc-tauri/Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (33)
.github/workflows/ci.yml.github/workflows/e2e.yml.github/workflows/release.yml.gitignoreREADME.mdbiome.jsondocs/README.mddocs/decisions/0010-e2e-only-wdio-security-boundary.mddocs/decisions/0011-rolling-kubernetes-support.mddocs/development-workflow.mddocs/milestones.mddocs/release.mde2e/fixtures/all.yamle2e/fixtures/argocd-crd.yamle2e/fixtures/chart/Chart.yamle2e/fixtures/chart/templates/configmap.yamle2e/fixtures/rbac.yamle2e/lifecycle.tse2e/specs/desktop/smoke.e2e.tse2e/specs/fast/browser-mocks.e2e.tse2e/specs/real/inspection.e2e.tse2e/wdio.fast.conf.tse2e/wdio.real.conf.tspackage.jsonsrc-tauri/Cargo.tomlsrc-tauri/src/commands/discovery.rssrc-tauri/src/commands/kubeconfig.rssrc-tauri/src/commands/streams/watch.rssrc-tauri/src/e2e.rssrc-tauri/src/lib.rssrc-tauri/tauri.dev-kind.conf.jsonsrc-tauri/tauri.e2e.conf.jsontsconfig.json
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
Testing