test(bdd): prototype portable live smoke composition - #1193
Draft
sbaum1994 wants to merge 1 commit into
Draft
Conversation
Add a target-driven live suite with explicit provider and smoke phases, bounded retry and compensation primitives, and a portable cluster-maintenance example. Relates to #1186 Signed-off-by: Stephanie Baum <sbaum@nvidia.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Prototype a separate target-driven live BDD suite so one portable smoke can run
against an existing local, remote, or production-connected target without
reinstalling the stack for every feature.
Additional Details
The current live entry points couple installation, topology setup, and product
smoke workflows in one large Godog suite. That makes a useful smoke difficult
to reuse against an already installed cluster and encourages more target modes
inside
godog_test.go.This POC adds a separate
tests/bdd/liverunner with these boundaries:coordinates. It cannot select features or authorize destructive actions.
Provider and smoke phases execute explicitly instead of relying on Godog file
ordering.
ledger-backed files are restored between files, while the built CLI, exact
CLI state file, and successful bootstrap cache remain suite-scoped.
BDD_CLEANUP_MODEis rejected because its implementation is specific toncp-local. Every Kubernetes action must expose kubeconfig and context.
typed JSON-subset assertions are shared through the existing harness and DSL.
Product validation remains in visible commands and the real CLI/API.
The portable cluster-maintenance feature is the concrete POC for #1186. It
creates and invokes one sample function, proves durable desired and effective
maintenance state, drains the function, uncordons the cluster, and proves the
function becomes active and invokable again. The mutation requires separate
invocation-time consent and uses
--expect-cluster-idbefore changing state.For the Reviewer
Please focus on
tests/bdd/live, the lifecycle-versus-feature ledger split inharness/suite.go, and the safety contract intests/bdd/live/README.md.The issue originally points wiring coverage at
godog_test.go. This POC keepsportable wiring in the new package because the existing file is already large
and owns local install entry points. Existing install features may be selected
as transitional providers, but a future provider should be provisioning-only.
For QA
cd tests/bdd && go test -short ./...passed after rebasing on latest main.tests/bdd/scripts/lint.shpassed with zero issues.The destructive live maintenance scenario was not run. No isolated target was
selected for this design POC, and #1186 documents the product regression the
scenario is intended to expose. QA is needed on the local multi-cluster target
after the product fix is available.
Issues
Relates to #1186
Customer Release Notes
Not customer visible.
Plan Summary
No runtime resources change. When explicitly invoked, the POC creates one
temporary sample function and temporarily cordons the selected compute cluster.
Both recovery actions are registered before the cluster mutation.
Usage
See
tests/bdd/live/README.mdfor the target schema, safety contract, attachmode, and provider-plus-smoke examples.
Notes
This is a draft architecture POC. It deliberately does not auto-detect target
capabilities, skip incompatible features, store credentials in target files, or
hide maintenance behavior in a domain-specific step.
Related Pull Requests
None.
Dependencies
None. The implementation uses existing Go modules. No license review or NOTICE
change is required.
Checklist