Skip to content

[AECO-1834] fix(build-studio): show forwarded dr xp flags in help and add plugin-update progress spinner - #1097

Open
Anton Bogatyrov (antonbogatyrov) wants to merge 3 commits into
mainfrom
abogatyrov/AECO-1834
Open

Anton Bogatyrov (antonbogatyrov) wants to merge 3 commits into
mainfrom
abogatyrov/AECO-1834

Conversation

@antonbogatyrov

@antonbogatyrov Anton Bogatyrov (antonbogatyrov) commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

RATIONALE

Follow-up to #1019 / #1074 (AECO-1834). Two UX gaps surfaced after releasing dr build-studio:

  1. Hidden passthrough flags. dr build-studio -h only showed the command's own -y/--yes flag, while every other flag is forwarded to dr xp. Users had no way to discover the xp feature flags (--enable-assist, --enable-byo-mcp, --port, …) from build-studio's help.
  2. Silent plugin update. Accepting the pre-launch update prompt ("Do you want to update? [Y/n]") ran the whole backup → download → checksum → extract → validate cycle with no output at all, so the terminal looked frozen while the archive downloaded. dr plugin update already wraps the same RunPluginUpdate in a spinner — the prompt path in cmd/plugin/shared/update.go did not.

CHANGES

  • cmd/build-studio/cmd.go: after printing its own help, the command appends the installed xp plugin's --help output under a "Flags forwarded to dr xp:" section. When xp is not installed yet, it prints a hint pointing at dr xp --help instead — the plugin is never installed just to render help.
  • cmd/plugin/shared/update.go: performPluginUpdate now wraps RunPluginUpdate in tui.RunWithSpinner("Updating <name> from X to Y…"), matching dr plugin update. Since this prompt path is shared by all plugin passthrough commands, updates triggered by plain dr xp runs get the spinner too.

NOTES

Verified locally: go build, go test -race on affected packages, golangci-lint (0 issues), and a manual dr build-studio -h run showing the full xp flag list.

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)

🤖 Generated with Claude Code

… plugin updates (AECO-1834)

Two UX gaps in the released dr build-studio command:

- `dr build-studio -h` only listed its own -y/--yes flag, hiding every
  flag forwarded to dr xp (feature flags, --port, …). The help now
  appends the installed xp plugin's --help output under a "Flags
  forwarded to dr xp:" section, or a `dr xp --help` hint when the
  plugin is not installed yet (it is never installed just for help).

- Accepting the pre-launch plugin update prompt ran the whole
  backup → download → extract → validate cycle silently, so the
  terminal looked frozen while the archive downloaded. The prompt
  path now wraps RunPluginUpdate in tui.RunWithSpinner, matching
  `dr plugin update`. This also covers updates triggered by plain
  plugin passthrough runs such as `dr xp`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@datarobot-pr-review-router

Copy link
Copy Markdown

🎫 AECO-1834 · Task

[DR XP] dr build-studio: show forwarded dr xp flags in help and add plugin-update progress spinner

Part of AECO-485 · DR XP Enhancements

How Review Router works

@github-actions github-actions Bot added the go Pull requests that update go code label Nov 18, 2026

@mjnitz02 Matt Nitzken (mjnitz02) 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.

So I ran this through a QA pipeline and heres the results:

QA failed on one test. Of 8 tests: 6 passed, 1 failed, 1 was flaky.

  The failure (test 6). With the real xp plugin installed and no DataRobot login set up, dr build-studio --help opens the interactive login wizard instead of printing xp's flags.
  - When the output goes through a pipe, it hangs on that hidden wizard.
  - If you quit the wizard, it prints "Failed to configure the DataRobot URL" and still exits 0, with no xp help shown.
  - Cause: xp's manifest has "authentication": true, and plugin.ExecutePlugin checks auth before it passes --help on (internal/plugin/exec.go:115). Plain dr xp --help already behaves this way. The new help path
    is what exposes it in build-studio.
  - The forwarding itself works. With dr --skip-auth build-studio --help, xp 2.5.0's real flags show up correctly.
  - Likely fix: run xp's --help without the auth check, or show the "Run dr xp --help" hint when the user isn't logged in.

  What passed:
  - Help with no xp installed shows the "flags are forwarded" note, for both --help and -h.
  - Help never installs the plugin.
  - --port 9000 --help still shows the help.
  - Accepting an update shows the new spinner (⣾ Updating xp from 2.4.0 to 2.5.0…) and then "✓ Updated xp to 2.5.0".
  - Declining the update shows no spinner and leaves xp on 2.4.0.

So I think we need to fix the --help command when a user isn't logged in

…flight (AECO-1834)

QA found that with xp installed but no DataRobot login configured,
`dr build-studio --help` opened the interactive login wizard instead of
printing xp's flags — and hung when the output was piped. The cause: xp's
manifest sets "authentication": true, and ExecutePlugin runs the deps and
auth preflight before forwarding --help.

Add plugin.WithoutPreflight(), an ExecOption that skips both checks, and
use it on the help-rendering path: help must never prompt. Covered by a
test asserting the auth endpoint is never contacted when the preflight is
skipped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@antonbogatyrov

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough QA run Matt Nitzken (@mjnitz02)! Fixed in 7b31419:

  • Added plugin.WithoutPreflight() — an ExecOption that skips the dependency and authentication checks — and the help-rendering path now uses it when forwarding --help to xp. Rendering help never opens the login wizard or a deps-install prompt anymore, so it can't hang in a pipe.
  • Covered by a test asserting the auth endpoint is never contacted when the preflight is skipped, plus verified manually: with an empty config (no login) and piped output, dr build-studio --help prints xp's full flag list and exits 0.

Note: plain dr xp --help still has the pre-existing wizard-before-help behavior (it goes through the normal plugin execution path, where the auth check is intentional) — happy to tackle that as a follow-up if we want help detection there too.

@datarobot-pr-review-router

Copy link
Copy Markdown

Code Ownership

Agent Ecosystem

  • cmd/build-studio/cmd.go

Agent Lifecycle

  • cmd/plugin/shared/update.go
  • internal/plugin/exec.go
  • internal/plugin/exec_test.go

Review requested from the teams above. Labels will be removed automatically upon approval.

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

@ajalon1 AJ Alon (ajalon1) 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 as well but Anton Bogatyrov (@antonbogatyrov) please add a tiny bit of docs re: what "preflight" means itself, I don't want to have to assume what it means reading the code.

Something in the plugin docs, a docstring on execOptions.withoutPreflight, maybe on the method itself.

Plugin preflight is the set of readiness checks ExecutePlugin runs before it launches the plugin subprocess. It makes sure the plugin's declared dependencies are installed (offering to install them, unless consent was pre-approved with WithDepsConsent or -y), and that the user is authenticated when the manifest sets authentication: true (unless skip_auth is set). Both checks can prompt interactively.

Comment on lines +108 to +119
err := tui.RunWithSpinner(
fmt.Sprintf("Updating %s from %s to %s…",
result.PluginName, result.InstalledVersion, result.LatestVersion.Version),
func() error {
return RunPluginUpdate(
result.PluginName,
result.InstalledVersion,
result.RegistryPlugin,
*result.LatestVersion,
result.BaseURL,
)
},

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.

nice

Comment thread internal/plugin/exec.go Outdated
Comment on lines +52 to +59
// WithoutPreflight skips the dependency and authentication checks before the
// plugin runs. Use it for non-functional invocations such as rendering the
// plugin's --help: those must never open an interactive prompt (login wizard,
// dependency install), which would hang when the output is piped.
func WithoutPreflight() ExecOption {
return func(o *execOptions) { o.skipPreflight = true }
}

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.

Just a small nit, I think we should actually explain what "Preflight" is, in a non-negative sense.

Here, or as a docstring on execOptions.skipPreflight, and in dev docs.

"Plugin preflight

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good call — added in ff415e6: WithoutPreflight's docstring now defines the preflight (deps check + auth check, both can prompt), execOptions.skipPreflight points at it, and docs/development/plugins.md got a Preflight section tying the term to the execution steps and the build-studio --help use case. Used your wording as the base, thanks for drafting it!

Review feedback on #1097: the term appeared only in WithoutPreflight's
name. Its docstring now defines the preflight (deps check + auth check,
both interactive), the skipPreflight field points at it, and
docs/development/plugins.md gets a Preflight section tying it to the
execution steps and the build-studio --help use case.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

00 - Ready for Review Close Jira on Merge go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants