Skip to content

fix(onboarding): show the native boot pool failure reason (U8-2360) - #2158

Open
Eli Bosley (elibosley) wants to merge 4 commits into
mainfrom
codex/u8-2360-onboarding-storage-reasons
Open

Eli Bosley (elibosley) wants to merge 4 commits into
mainfrom
codex/u8-2360-onboarding-storage-reasons

Conversation

@elibosley

@elibosley Eli Bosley (elibosley) commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

The onboarding wizard already creates its internal boot pool with the native Create Pool and Make Bootable commands. When a checked daemon reply identifies the failure, the existing GraphQL result now gives an action for the reviewed pool. The response for partial boot setup tells the user to check the drives and pending transfer. A typed failure omits the accumulated command transcript from this user message.

Older daemons retain the existing HTTP failure wording. An unknown result or a result associated with a different command also uses that fallback. Nineteen focused client and onboarding tests passed. The Vue onboarding consumer renders the result through its existing error message. Installed browser qualification remains pending.

Refs U8-2360.

Summary by CodeRabbit

  • Bug Fixes
    • Storage pool and bootable-drive failures now show clearer, command-specific messages, including relevant pool or slot details when available.
    • Internal boot setup reports the native storage error reason directly.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change maps recognized native storage command results to specific errors, parses those errors from HTTP 500 response headers, and returns them directly from the onboarding internal boot service. Tests cover the parsing and onboarding error paths.

Changes

Storage error reporting

Layer / File(s) Summary
Map native storage results
api/src/core/utils/clients/storage-command-error.ts
StorageCommandError.fromReply maps recognized pool-creation and bootable-setup results to messages. It validates pool names and storage slots before including them.
Parse storage errors in emcmd
api/src/core/utils/clients/emcmd.ts, api/src/core/utils/clients/emcmd.spec.ts, .limetech/ai-review-markers/*
For HTTP 500 responses, emcmd parses command results from response headers and throws a mapped error when available. Tests cover recognized, mismatched, and unknown results. The review marker records patch metadata.
Return native errors from onboarding
api/src/unraid-api/graph/resolvers/onboarding/onboarding-internal-boot.service.ts, api/src/unraid-api/graph/resolvers/onboarding/onboarding-internal-boot.service.spec.ts
createInternalBootPool returns a StorageCommandError message as failure output. The test checks the failure result and confirms two command calls.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant emcmd
  participant StorageCommandError
  participant OnboardingInternalBootService
  emcmd->>StorageCommandError: Parse commands and response headers
  StorageCommandError-->>emcmd: Return mapped error or undefined
  emcmd-->>OnboardingInternalBootService: Throw mapped storage error
  OnboardingInternalBootService->>OnboardingInternalBootService: Return failure with error message
Loading

Suggested reviewers: pujitm

Merge Risk: Minimal · up to 8a264

The change makes native pool and bootable failures show specific reasons in onboarding. Older or unrecognized daemon replies keep the existing error wording. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: onboarding now shows the native boot pool failure reason, with a ticket reference. The raw summary shows StorageCommandError mapping native Create Pool and Make Bootab…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: onboarding now shows the native boot pool failure reason, with a ticket reference. The raw summary shows StorageCommandError mapping native Create Pool and Make Bootable results to user-facing messages, and the onboarding boot service returning that message. The title is specific and matches the changeset, so the check passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit reads the storage reply,
And finds a clear reason tucked inside.
The pool and boot messages take shape,
The onboarding output keeps them in view.
Then off hops the rabbit, content with the trace.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9e9387b6-56d7-4ccd-9f27-ab08f3fc4f3e
Commits

Reviewing files that changed from the base of the PR and between 023a3ca and 8a2649c.

Files selected for processing: 6

  • .limetech/ai-review-markers/codex-u8-2360-onboarding-storage-reasons-8f54c2fa86a1.json
  • api/src/core/utils/clients/emcmd.spec.ts
  • api/src/core/utils/clients/emcmd.ts
  • api/src/core/utils/clients/storage-command-error.ts
  • api/src/unraid-api/graph/resolvers/onboarding/onboarding-internal-boot.service.spec.ts
  • api/src/unraid-api/graph/resolvers/onboarding/onboarding-internal-boot.service.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@linear-code
linear-code Bot marked this pull request as ready for review November 23, 2026 03:05
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T03:07:43.345470Z 8a2649c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a2649cb99

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".

): StorageCommandError | undefined {
const pool = commands.poolName;
const target =
typeof pool === 'string' && /^[a-z][a-z0-9_-]{0,39}$/.test(pool)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Accept every valid pool-name character

When onboarding uses a valid name containing . or ~ (for example, fast.pool), this allowlist rejects it even though CreateInternalBootPoolInput explicitly permits those characters at onboarding.model.ts:295 and the UI does likewise. Consequently every recognized native failure replaces the actual reviewed pool name with the generic “selected pool”; align this validation with the onboarding pool-name rules while retaining the length bound.

Useful? React with 👍 / 👎.

@codecov

codecov Bot commented Nov 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.00000% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.31%. Comparing base (023a3ca) to head (8a2649c).

Files with missing lines Patch % Lines
...pi/src/core/utils/clients/storage-command-error.ts 66.66% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2158      +/-   ##
==========================================
- Coverage   54.32%   54.31%   -0.01%     
==========================================
  Files        1046     1047       +1     
  Lines       73611    73686      +75     
  Branches     8883     8907      +24     
==========================================
+ Hits        39987    40025      +38     
- Misses      33498    33535      +37     
  Partials      126      126              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

This plugin has been deployed to Cloudflare R2 and is available for testing.
Download it at this URL:

https://preview.dl.unraid.net/unraid-api/tag/PR2158/dynamix.unraid.net.plg

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant