Skip to content

[RAPTOR-20092] fix(workload): a rebuilt wizard draft no longer shows the suggested name as typed - #897

Open
wojtekwdr wants to merge 1 commit into
datarobot-oss:mainfrom
wojtekwdr:wojtekw/RAPTOR-20092-wizard-name-reset
Open

[RAPTOR-20092] fix(workload): a rebuilt wizard draft no longer shows the suggested name as typed#897
wojtekwdr wants to merge 1 commit into
datarobot-oss:mainfrom
wojtekwdr:wojtekw/RAPTOR-20092-wizard-name-reset

Conversation

@wojtekwdr

@wojtekwdr wojtekwdr commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

RATIONALE

Follow-up from the review of #856. The wizard tracks whether the name on screen was typed or only suggested, and that flag survived the two places that rebuild the draft: picking a different directory on the way back, and choosing "set up a new workload" after having looked at an existing one. Either way the fresh draft's suggestion came back as a typed value, one Enter away from naming a deployed workload after its directory, which is what the name screen exists to prevent.

CHANGES

The draft and the flag now move together through one small flow method, so the two cannot drift again. A changed directory is a restart, so everything answered for the old tree's draft goes with it, the typed name included. Re-choosing the same directory keeps it.

TESTING

Run dr workload config --dry-run from a directory whose only project sits in a subdirectory, choose "Use this directory anyway", type a name, then Escape back to the directory question and pick the subdirectory. The name field must come back empty with its placeholder rather than showing the subdirectory's name as a value.


Note

Low Risk
Interactive wizard state only; no auth, persistence, or deploy-path changes beyond preventing accidental one-Enter name confirmation.

Overview
Fixes a workload config wizard bug where rebuilding the draft (different directory or “create new workload” after binding) left nameGiven true, so the new tree’s suggested name appeared as a typed value and one Enter could deploy with a bad name (e.g. src).

Draft install and nameGiven reset now go through startFrom: only a --name flag still counts as user-given; interactive names typed for the old draft are cleared with the restart. acceptDirectory and create-new-after-bind call startFrom instead of assigning the draft alone. Comments spell out that changing directory discards post-directory answers including the typed name; re-selecting the same directory keeps them.

Regression tests cover directory switch vs stay-put and create-new after bind.

Reviewed by Cursor Bugbot for commit 8775ab4. Configure here.

…the suggested name as typed

The flag that marks the name as typed survived the two places that rebuild
the draft from the flags: choosing another directory on the way back, and
setting up a new workload after looking at an existing one. The fresh
draft's directory suggestion then came back as a typed value. The draft and
the flag now move together, so a restart starts the name over too.
@datarobot-pr-review-router

Copy link
Copy Markdown

🎫 Jira: RAPTOR-20092 — [dr wl up wizard] acceptDirectory doesn't reset nameGiven on back-navigation to a different directory

@wojtekwdr
wojtekwdr marked this pull request as ready for review September 8, 2026 17:38
@wojtekwdr
wojtekwdr requested a review from a team as a code owner September 8, 2026 17:38
@datarobot-pr-review-router

Copy link
Copy Markdown

Code Ownership

Workload Cli

  • internal/workload/wizard/model.go
  • internal/workload/wizard/regression_test.go

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

@wojtekwdr

Copy link
Copy Markdown
Contributor Author

/approve-smoke-tests

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🔐 Fork PR smoke tests triggered by @wojtekwdr

⚠️ Security Notice: This will run tests with access to repository secrets.

What happens next:

  1. Security scans will run automatically (Trivy, gosec)
  2. If security scans pass, smoke tests will run
  3. Results will be posted as PR comments

⚠️ Important: Review the PR code carefully before approving!

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🔐 Fork smoke tests started by maintainer

⏳ Security scans passed. Running smoke tests...

Commit: 8775ab4dbc2d91ed91eaf8eae38d4283b831e2a9
View run

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

All smoke tests passed! (Fork PR)

✅ Security Scan: success
✅ Linux: success
✅ Windows: success

View run details

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant