Skip to content

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

Merged
wojtekwdr merged 1 commit into
datarobot-oss:mainfrom
wojtekwdr:wojtekw/RAPTOR-20092-wizard-name-reset
Sep 10, 2026
Merged

[RAPTOR-20092] fix(workload): a rebuilt wizard draft no longer shows the suggested name as typed#897
wojtekwdr merged 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.

@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

@wojtekwdr
wojtekwdr force-pushed the wojtekw/RAPTOR-20092-wizard-name-reset branch from 8775ab4 to 204e3ea Compare September 9, 2026 12:39

@adamalpi adamalpi 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.

Traced every path that touches nameGiven; the invariant holds and the two new tests cover both reset sites with the right control case. Two non-blocking notes inline, both anchored here because neither has an exact line in the diff.

Comment thread internal/workload/wizard/model.go
Comment thread internal/workload/wizard/model.go
@wojtekwdr

Copy link
Copy Markdown
Contributor Author

/approve-smoke-tests

@github-actions

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

Copy link
Copy Markdown
Contributor

🔐 Fork smoke tests started by maintainer

⏳ Security scans passed. Running smoke tests...

Commit: 204e3ea29b20fada56021b7ad093f67763989c44
View run

@github-actions

Copy link
Copy Markdown
Contributor

All smoke tests passed! (Fork PR)

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

View run details

@wojtekwdr
wojtekwdr force-pushed the wojtekw/RAPTOR-20092-wizard-name-reset branch from 204e3ea to cf249e7 Compare September 10, 2026 10:19
@wojtekwdr
wojtekwdr requested a review from a team as a code owner September 10, 2026 10:19
…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.
@wojtekwdr
wojtekwdr force-pushed the wojtekw/RAPTOR-20092-wizard-name-reset branch from cf249e7 to 6db6248 Compare September 10, 2026 10:27
@wojtekwdr

Copy link
Copy Markdown
Contributor Author

/approve-smoke-tests

@github-actions

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

Copy link
Copy Markdown
Contributor

🔐 Fork smoke tests started by maintainer

⏳ Security scans passed. Running smoke tests...

Commit: 6db62486f702c41363f226aad7b09d0f7fee5123
View run

@github-actions

Copy link
Copy Markdown
Contributor

All smoke tests passed! (Fork PR)

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

View run details

@wojtekwdr
wojtekwdr merged commit b552e5c into datarobot-oss:main Sep 10, 2026
20 checks passed
@wojtekwdr
wojtekwdr deleted the wojtekw/RAPTOR-20092-wizard-name-reset branch September 10, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants