Skip to content

test(bdd): prepare named Helmfile environments - #1101

Merged
sbaum1994 merged 1 commit into
mainfrom
test/bdd-prepare-helmfile-environments
Aug 23, 2026
Merged

test(bdd): prepare named Helmfile environments#1101
sbaum1994 merged 1 commit into
mainfrom
test/bdd-prepare-helmfile-environments

Conversation

@sbaum1994

@sbaum1994 sbaum1994 commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

TL;DR

Add a table-driven BDD step for preparing named Helmfile environments, then use it to replace 25 repeated fixture-copy and YAML-update pairs across 12 feature files. The feature files remain explicit about the stack, environment, fixture, profiles, image sources, and all YAML overrides.

Additional Details

  • Derive environment destinations from the suite's absolute repository root for the supported self-managed, observability, and nvcf-compute-plane stacks.
  • Reject unsupported stacks and unsafe environment names before writing.
  • Snapshot generated destinations in the test ledger and reuse the existing copy, YAML update, and environment interpolation behavior.
  • Add focused path-validation, handler, restore, mode-preservation, and pre-write rejection tests.
  • Add the new step to the BDD DSL catalog.
  • No third-party dependencies changed. No license review or NOTICE update is needed.

For the Reviewer

The main abstraction boundary is in tests/bdd/dsl/helmfile_environment.go and tests/bdd/steps/file_steps.go. It hides destination construction and file mechanics, while the Gherkin retains every operator choice.

For QA

Static validation passed:

  • go test ./dsl ./steps
  • go test -short ./...
  • golangci-lint run --config .golangci.yml ./... with isolated caches: 0 issues

Destructive local feature validation passed from fresh k3d topologies:

  • TestObservabilityDisabled: 1 scenario, 11 steps
  • TestSingleClusterUp: 3 scenarios, 42 steps
  • TestSingleClusterUpOneClick: 1 scenario, 13 steps
  • TestSingleClusterHelmfile: 6 scenarios, 62 steps
  • TestObservabilityControl: 1 scenario, 14 steps
  • TestObservabilityAll: 1 scenario, 29 steps
  • TestSingleClusterHelmfileUpstreamImages: 1 scenario, 29 steps
  • TestMultiClusterUp: 4 scenarios, 51 steps
  • TestObservabilityCompute: 1 scenario, 37 steps
  • TestMultiClusterHelmfile: 4 scenarios, 60 steps, excluding only @nvct-task-api

The excluded NVCT scenario reproduced the existing #1098 blocker: SIS accepted and published the task, but the installed stack delivered RequestICMSInstances and NVCA repeatedly created 0 task instances. The remaining multi-cluster feature passed after that tag was excluded locally. The temporary exclusion was reverted before commit.

An initial batched TestObservabilityAll run retained monitoring releases from the preceding profile and observed revision 2 instead of 1. Its clean topology-single rerun passed.

The two EKS-only features passed wiring validation under the short suite. Live EKS execution was skipped because no local EKS target exists; #1087 tracks that coverage.

Local k3d clusters and the temporary registry credential were removed after testing. No additional local QA is needed.

Issues

Closes #1080
Relates to #858

Checklist

  • I am familiar with the Contributing Guidelines.
  • I have signed off my commits for Developer Certificate of Origin (DCO) compliance.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • New Features

    • Added a dedicated step for preparing Helmfile environments from fixtures with interpolated values and YAML overrides.
    • Added validation for repository, stack, and environment inputs to prevent unsafe or unsupported paths.
  • Tests

    • Expanded BDD coverage across single-cluster, multi-cluster, and observability scenarios.
    • Added verification for environment restoration, file permissions, variable interpolation, YAML updates, and invalid input handling.

Replace repeated environment fixture copy and YAML update pairs with a table-driven step that derives and snapshots known Helmfile destinations without hiding test inputs.

Closes #1080

Signed-off-by: Stephanie Baum <sbaum@nvidia.com>
@sbaum1994
sbaum1994 requested a review from a team as a code owner August 23, 2026 18:05
@sbaum1994
sbaum1994 requested a review from estroz August 23, 2026 18:05
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7e00db5d-f6fc-4616-b1ac-3d653b5a111e

📥 Commits

Reviewing files that changed from the base of the PR and between 39c8449 and 6f5bb48.

📒 Files selected for processing (17)
  • tests/bdd/PLAN.md
  • tests/bdd/dsl/helmfile_environment.go
  • tests/bdd/dsl/helmfile_environment_test.go
  • tests/bdd/features/multi-cluster-eks-helmfile.feature
  • tests/bdd/features/multi-cluster-helmfile.feature
  • tests/bdd/features/multi-cluster-up.feature
  • tests/bdd/features/observability-all.feature
  • tests/bdd/features/observability-compute.feature
  • tests/bdd/features/observability-control.feature
  • tests/bdd/features/observability-disabled.feature
  • tests/bdd/features/single-cluster-eks-helmfile.feature
  • tests/bdd/features/single-cluster-helmfile-upstream-images.feature
  • tests/bdd/features/single-cluster-helmfile.feature
  • tests/bdd/features/single-cluster-up-oneclick.feature
  • tests/bdd/features/single-cluster-up.feature
  • tests/bdd/steps/file_steps.go
  • tests/bdd/steps/steps_test.go

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The BDD DSL adds a step to prepare named Helmfile environments from fixtures. It validates paths and names, interpolates fixture data, applies YAML updates, records destinations for restoration, and replaces repeated setup sequences across feature files.

Changes

Helmfile environment preparation

Layer / File(s) Summary
Environment path validation
tests/bdd/dsl/helmfile_environment.go, tests/bdd/dsl/helmfile_environment_test.go
Adds HelmfileEnvironmentPath with validation for repository roots, supported stacks, and safe environment names.
Preparation step and restoration
tests/bdd/steps/file_steps.go, tests/bdd/steps/steps_test.go, tests/bdd/PLAN.md
Adds the Godog step, fixture interpolation, YAML updates, ledger snapshots, restoration, and focused tests.
Feature setup migration
tests/bdd/features/*cluster*.feature, tests/bdd/features/observability-*.feature
Replaces manual fixture copying and YAML mutation with Helmfile environment preparation steps while preserving configured values.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 6f5bb

The change centralizes Helmfile test-environment preparation while preserving explicit scenario overrides and rejecting unsafe destinations; no actionable merge-blocking risk remains after normal checks.

Suggested reviewers: estroz

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title follows Conventional Commits and accurately describes the BDD test and DSL changes.
Linked Issues check ✅ Passed The changes satisfy issue #1080 by adding, documenting, testing, and migrating the named Helmfile environment step.
Out of Scope Changes check ✅ Passed All changes are confined to the BDD DSL, tests, documentation, and feature migrations required by issue #1080.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/bdd-prepare-helmfile-environments

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

@sbaum1994
sbaum1994 merged commit 43ffc70 into main Aug 23, 2026
18 checks passed
@sbaum1994
sbaum1994 deleted the test/bdd-prepare-helmfile-environments branch August 23, 2026 18:32
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.

BDD DSL: Prepare named Helmfile environments

1 participant