Skip to content

[RAPTOR-18959] feat(workload): remove the workload feature gate for WAPI GA - #780

Open
wojtekwdr wants to merge 1 commit into
mainfrom
wojtekw/RAPTOR-18959-remove-workload-feature-gate
Open

[RAPTOR-18959] feat(workload): remove the workload feature gate for WAPI GA#780
wojtekwdr wants to merge 1 commit into
mainfrom
wojtekw/RAPTOR-18959-remove-workload-feature-gate

Conversation

@wojtekwdr

@wojtekwdr wojtekwdr commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

RATIONALE

dr workload and dr artifact have been hidden behind DATAROBOT_CLI_FEATURE_WORKLOAD since v0.2.63. Workload API is GA, so the gate is now pure friction: every user and every doc has to export the variable first, and until they do neither tree appears in dr --help or in shell completions.

Both trees share the single gate name workload, so they can only be ungated together. pipeline stays gated and becomes the only live gate, so internal/features and cli.CommandAdder stay put.

CHANGES

Dropped the two features.SetGate calls and everything that referenced the variable.

docs/development/feature-gates.md needed more than a find-and-replace. It used workload as its worked example throughout, and it taught a raw Annotations literal that no call site has ever used, so it is now written around pipeline and features.SetGate. Its "Removing a Feature Gate" procedure was also wrong: it said to delete the Annotations map and stop, which does not compile, because it leaves an unused import behind.

docs/commands/workload.md and artifact.md join the mkdocs nav, where neither had ever appeared. Adding workload.md turned up that it documented 9 of the 11 subcommands, missing config and up, so those are filled in rather than published incomplete.

Breaking change: legacy .wapi/ state is no longer read

GA is also the cutoff for the pre-GA state layout, so EnsureMigrated and the Dir() fallback are gone. A project still holding a root .wapi/ now reads as unlinked.

That directory shipped from v0.2.63 through v0.2.81. The auto-migration that would have relocated it existed only in v0.2.82 and v0.2.83, so anyone who skipped those two releases gets no migration at all. The affected population is gate-opting early adopters by definition, since exporting the variable was the only way to create the directory in the first place.

One path degraded badly without a guard. Every command reports a visible "not linked" error except dr workload up, which read the project as a first deploy, minted a second artifact server-side and orphaned the one the project had been pushing to, along with its builds and locked versions, silently. So wapi.LegacyState now recognises the old layout and every affected command explains itself:

Error: not linked: .wapi/ holds state written by an older CLI, which is no longer read.
Run 'dr artifact code init art-abc-123' to link this project again, then delete .wapi/

up refuses before it touches the server. dr artifact code init still succeeds, because re-linking is the recovery, but it now prints a note that the old directory is orphaned. Naming the artifact id is the point: .wapi/ carries a .gitignore of *, so nothing else would ever surface it, and that id is the only way back.

A project that was genuinely never linked still gets the plain hint, with no mention of a directory it does not have.

Residual cost, not fixed

A .wapi/.rollback tree left by a sync that crashed on v0.2.81 or earlier is no longer swept, and those backups are the only copy of the files that sync overwrote. Keeping that working would mean keeping half the legacy machinery alive. Flagging it here rather than burying it; the guard at least makes the surrounding situation visible.

NOTES

Reviewers running the suite locally: Taskfile.yaml loads .env, and a typical dev .env sets DATAROBOT_CLI_FEATURE_WORKLOAD=true, so task test exercises the gate-on path. For the clean signal use DATAROBOT_CLI_FEATURE_WORKLOAD= go test ./....

PR Automation

Comment-Commands: Trigger CI by commenting on the PR:

  • /trigger-smoke-test or /trigger-test-smoke - Run smoke tests
  • /trigger-install-test or /trigger-test-install - Run installation tests

Labels: Apply labels to trigger workflows:

  • run-smoke-tests or go - Run smoke tests on demand (only works for non-forked PRs)

Important

For Forked PRs: The run-smoke-tests label won't work. A required Smoke Tests check will block merge until a maintainer acts:

  • A maintainer uses /approve-smoke-tests to run smoke tests (results will set the check)
  • A maintainer uses /skip-smoke-tests to bypass the check without running tests

Please comment requesting a maintainer review if you need smoke tests to run.


Note

Medium Risk
Always-on exposure of workload and artifact commands changes the default CLI surface for all users (help, completions, and discoverability). Remaining risk is mostly operational—pipeline is still gated and tests/env quirks around DATAROBOT_CLI_FEATURE_WORKLOAD in dev .env are called out in the PR notes.

Overview
dr artifact and dr workload are no longer hidden behind DATAROBOT_CLI_FEATURE_WORKLOAD. The features.SetGate calls are removed from cmd/artifact/cmd.go and cmd/workload/cmd.go, so both trees always appear in dr --help, completions, and the live RootCmd tree. pipeline remains the only gated command.

Tests are flipped to match: TestWorkloadAndArtifactCommandsAlwaysRegistered asserts both commands are present by default, and TestGatedCommandFilteredFromRootCmd keeps coverage that pipeline stays out of RootCmd when its gate is off. Telemetry wiring tests no longer build separate gated subtrees—artifact and workload paths are checked on RootCmd via an expanded expectedTrackedCommands list.

Documentation drops the env-var requirement for artifact/workload, adds config and up to the workload reference and command tree, publishes artifact and workload in docs/mkdocs.yml, and rewrites feature-gates docs to use pipeline and features.SetGate (including a corrected GA checklist). AGENTS.md and comment examples now cite DATAROBOT_CLI_FEATURE_PIPELINE instead of WORKLOAD.

Reviewed by Cursor Bugbot for commit 2fc85bc. Configure here.

@datarobot-pr-review-router

Copy link
Copy Markdown

🎫 Jira: RAPTOR-18959 — Remove the DATAROBOT_CLI_FEATURE_WORKLOAD feature gate for WAPI GA

@github-actions github-actions Bot added the go Pull requests that update go code label Aug 17, 2026
@wojtekwdr
wojtekwdr force-pushed the wojtekw/RAPTOR-18959-remove-workload-feature-gate branch from c997e19 to 2fc85bc Compare August 17, 2026 13:13
@wojtekwdr
wojtekwdr marked this pull request as ready for review August 18, 2026 07:57
@wojtekwdr
wojtekwdr requested review from a team as code owners August 18, 2026 07:57

@chasdr chasdr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm on the code, gate removal is clean and the docs/tests all line up.

one thing on the description though: the whole "legacy .wapi/ state is no longer read" section is #781's work, not this PR. #780 just removes the feature gate. reading this one you'd go looking for wapi.LegacyState and not find it.

mind trimming the body down to the gate removal and letting #781 carry the breaking-change writeup? otherwise anyone approving this thinks they reviewed the .wapi change when it's actually the next PR up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants