You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The local and EKS NVIDIA Cloud Tasks (NVCT) scenarios call run-nvct-task-smoke.sh. The script hides task API-key generation, task inputs, creation, status polling, and cleanup. The EKS feature also exposes script-specific endpoint and state-path environment variables.
Replace the script with readable steps for individual nvcf-cli task operations. Keep task inputs, CLI options, compute selection, runtime limits, container environment, expected status, timeout, polling, and deletion visible. Reuse the CLI-config step and command builder delivered by #1106 and #1114.
Task lifecycle steps are transparent command adapters. They may validate only Gherkin structure. They pass every supplied argument, including empty, repeated, or product-invalid values, unchanged to nvcf-cli; do not maintain task identity, apply defaults, parse or normalize product values, or enforce product preconditions; and preserve the real command result.
As a deliberate readability exception, lifecycle steps whose wording includes successfully assert that the CLI command exits with code 0. Negative and exit-code-specific scenarios continue to use When I run command plus explicit outcome assertions. nvcf-cli and the NVCT API own all product validation.
The status assertion is a bounded test-runner operation because nvcf-cli does not provide a task wait command. It repeats task get --json and compares .task.status with the exact expected string. It must not allowlist status values, classify terminal states, or duplicate NVCT transition rules.
The implementing PR must repeat this governing contract in its description so reviewers can verify the separation-of-concerns boundary.
Proposed DSL
Local multi-cluster example:
Given I use NVCF CLI config "${REPO_ROOT}/tests/bdd/fixtures/nvcf-cli-local.yaml"When I successfully generate a task API key with CLI options:
| option | value | | --description | bdd-nvct-task-smoke | | --scopes | launch_task,task_details,delete_task |And I successfully create task "bdd-nvct-task-smoke" from image "nvcr.io/${SAMPLE_NGC_ORG}/${SAMPLE_NGC_TEAM}/task-simple-sample:local" with CLI options:
| option | value | | --gpu | H100 | | --instance-type | NCP.GPU.H100_8x | | --backend | ncp-local-compute-1 | | --result-strategy | NONE | | --max-runtime | PT10M | | --max-queued | PT10M | | --termination-grace | PT1M | | --container-env | NUM_OF_RESULTS=1 | | --container-env | DELAY_BETWEEN_RESULTS_IN_MINUTES=0 | | --container-env | FILE_SIZE_BYTES=8192 | | --container-env | INCLUDE_METADATA=false |Then the task selected by NVCF CLI should reach status "COMPLETED" within "900" seconds, polling every "10" seconds
And I successfully delete the task selected by NVCF CLI
The EKS scenario uses the same steps and only changes visible environment-specific values:
Given I use NVCF CLI config "${REPO_ROOT}/tests/bdd/out/nvcf-cli-eks-bdd-multi.yaml"When I successfully generate a task API key with CLI options:
| option | value | | --description | bdd-nvct-task-smoke | | --scopes | launch_task,task_details,delete_task |And I successfully create task "bdd-nvct-task-smoke" from image "nvcr.io/${SAMPLE_NGC_ORG}/${SAMPLE_NGC_TEAM}/task-simple-sample:local" with CLI options:
| option | value | | --gpu | H100 | | --instance-type | NCP.GPU.H100_8x | | --backend | ${EKS_COMPUTE_CLUSTER_NAME} | | --result-strategy | NONE | | --max-runtime | PT10M | | --max-queued | PT10M | | --termination-grace | PT1M | | --container-env | NUM_OF_RESULTS=1 | | --container-env | DELAY_BETWEEN_RESULTS_IN_MINUTES=0 | | --container-env | FILE_SIZE_BYTES=8192 | | --container-env | INCLUDE_METADATA=false |Then the task selected by NVCF CLI should reach status "COMPLETED" within "900" seconds, polling every "10" seconds
And I successfully delete the task selected by NVCF CLI
Exact step contracts
Common command-adapter behavior
Interpolate values through the existing ${VAR} helper.
Safely quote each argument without changing the value received by nvcf-cli.
Use the config selected by Given I use NVCF CLI config {string}.
Capture the standard command result and logs.
Require exit code 0 only when the step wording includes successfully.
Do not inspect, parse, or validate task product values before execution.
Do not store task name or ID in BDD scenario state. Let the CLI own its selected-task state.
CLI option tables
Require only the two-column option | value Gherkin structure and at least one data row.
Treat every row as two CLI arguments in its original order.
Preserve repeated options and empty values. Do not deduplicate rows.
Do not allowlist or denylist option names. Let the CLI reject unknown or unsupported options.
Do not validate required options, enums, durations, ranges, compatibility, environment syntax, or value syntax.
Feature authors must not place secret values in visible option tables because command arguments are logged. Do not enforce that policy with a DSL option denylist.
Interpolate and store the supplied config argument without resolving, canonicalizing, or checking the path.
Never fall back to an ambient or default CLI config.
When I successfully generate a task API key with CLI options:
Run api-key generate --for task followed by the visible option rows.
Do not derive a description, add scopes, or apply defaults.
Do not parse, export, or copy the generated key. Let the CLI save and use its task key.
When I successfully create task {string} from image {string} with CLI options:
Run task create --name <name> --image <image> followed by the visible option rows.
Pass the task name, image, option names, and values unchanged after interpolation.
Do not translate friendly setting names into CLI flags.
Do not apply task defaults or validate task configuration.
Let nvcf-cli task create save the current task in CLI state.
Then the task selected by NVCF CLI should reach status {string} within {string} seconds, polling every {string} seconds
Run task get --json through the selected config on each poll. Let the CLI resolve its selected task.
Require each task get command to exit with code 0 and read only .task.status from its JSON output.
Compare the returned status with the exact expected string supplied by Gherkin.
Do not validate the expected status against a known-status list.
Do not fail early based on a test-owned list of terminal statuses. NVCT owns status meanings and transitions.
Treat timeout and poll duration as test-runner controls. Validate only that they are positive values the runner can use to bound and schedule polling.
On timeout, report the expected status, last observed status, timeout, and command-log location. Do not print API keys, secret values, or the full task response.
And I successfully delete the task selected by NVCF CLI
Run task delete through the selected config and require exit code 0.
Let the CLI resolve or reject its selected task.
Keep deletion visible. Do not move it into a hidden hook or composite lifecycle step.
CLI configuration changes
Add base_nvct_url and nvct_host to the local NVCF CLI fixture so task commands route through tasks.localhost.
Add base_nvct_url and nvct_host to the generated EKS CLI config. Preserve its existing gateway and Host-header behavior.
Continue using the existing API Keys URL and Host settings for task-key generation.
Keep CLI state paths derived from the selected config.
Remove feature-level NVCT_BDD_* endpoint, state-path, backend, and timeout plumbing.
Smoke script removal
Migrate every use of tests/bdd/scripts/run-nvct-task-smoke.sh to the steps above.
Delete the script after local and EKS wiring tests use the new DSL.
Description
The local and EKS NVIDIA Cloud Tasks (NVCT) scenarios call
run-nvct-task-smoke.sh. The script hides task API-key generation, task inputs, creation, status polling, and cleanup. The EKS feature also exposes script-specific endpoint and state-path environment variables.Replace the script with readable steps for individual
nvcf-clitask operations. Keep task inputs, CLI options, compute selection, runtime limits, container environment, expected status, timeout, polling, and deletion visible. Reuse the CLI-config step and command builder delivered by #1106 and #1114.Parent: #858
Completed prerequisite: #1106 through #1114
Live validation prerequisites: #1100 and #1099
Governing contract
Task lifecycle steps are transparent command adapters. They may validate only Gherkin structure. They pass every supplied argument, including empty, repeated, or product-invalid values, unchanged to
nvcf-cli; do not maintain task identity, apply defaults, parse or normalize product values, or enforce product preconditions; and preserve the real command result.As a deliberate readability exception, lifecycle steps whose wording includes
successfullyassert that the CLI command exits with code 0. Negative and exit-code-specific scenarios continue to useWhen I run commandplus explicit outcome assertions.nvcf-cliand the NVCT API own all product validation.The status assertion is a bounded test-runner operation because
nvcf-clidoes not provide a task wait command. It repeatstask get --jsonand compares.task.statuswith the exact expected string. It must not allowlist status values, classify terminal states, or duplicate NVCT transition rules.The implementing PR must repeat this governing contract in its description so reviewers can verify the separation-of-concerns boundary.
Proposed DSL
Local multi-cluster example:
The EKS scenario uses the same steps and only changes visible environment-specific values:
Exact step contracts
Common command-adapter behavior
${VAR}helper.nvcf-cli.Given I use NVCF CLI config {string}.successfully.CLI option tables
option | valueGherkin structure and at least one data row.Given I use NVCF CLI config {string}When I successfully generate a task API key with CLI options:api-key generate --for taskfollowed by the visible option rows.When I successfully create task {string} from image {string} with CLI options:task create --name <name> --image <image>followed by the visible option rows.nvcf-cli task createsave the current task in CLI state.Then the task selected by NVCF CLI should reach status {string} within {string} seconds, polling every {string} secondstask get --jsonthrough the selected config on each poll. Let the CLI resolve its selected task.task getcommand to exit with code 0 and read only.task.statusfrom its JSON output.And I successfully delete the task selected by NVCF CLItask deletethrough the selected config and require exit code 0.CLI configuration changes
base_nvct_urlandnvct_hostto the local NVCF CLI fixture so task commands route throughtasks.localhost.base_nvct_urlandnvct_hostto the generated EKS CLI config. Preserve its existing gateway and Host-header behavior.NVCT_BDD_*endpoint, state-path, backend, and timeout plumbing.Smoke script removal
tests/bdd/scripts/run-nvct-task-smoke.shto the steps above.NVCT_BDD_*documentation, fixture tests, canned runner entries, and script-specific assertions.Migration scope
Definition of Done
tests/bdd/PLAN.mdbefore migrating features.task get --json, exact status comparison, and bounded test-runner timing. Do not add NVCT status semantics.NVCT_BDD_*reference.go test -short ./...and lint undertests/bdd.Resources
By submitting this issue, you acknowledge that you are an assigned member of the NVCF development team and agree to follow our code of conduct and our contributing guidelines.