Skip to content

feat: add interactive setup wizard (dremio setup)#11

Merged
rahim-bhojani merged 4 commits intomainfrom
feat/interactive-setup
Apr 4, 2026
Merged

feat: add interactive setup wizard (dremio setup)#11
rahim-bhojani merged 4 commits intomainfrom
feat/interactive-setup

Conversation

@rahim-bhojani
Copy link
Copy Markdown
Contributor

Summary

  • Adds dremio setup interactive wizard that walks users through region selection, PAT creation, and project ID discovery with step-by-step instructions, clickable URLs, and credential validation
  • Replaces the cryptic pydantic ValidationError on missing config with a friendly message suggesting dremio setup
  • Writes validated config to ~/.config/dremioai/config.yaml with proper permissions (600)

Test plan

  • Run dremio setup interactively — verify full wizard flow (region, PAT, project ID, validation, config write)
  • Run dremio setup again — verify existing config overwrite prompt
  • Run dremio query run "SELECT 1" without config — verify improved error message
  • echo "" | dremio setup — verify non-interactive detection
  • pytest tests/test_commands/test_setup.py -v — 7 tests covering write_config and validate_credentials

🤖 Generated with Claude Code

Users no longer need to manually create tokens and config files before
using the CLI. `dremio setup` walks them through region selection, PAT
creation, and project ID discovery with step-by-step instructions and
credential validation. The missing-config error now suggests `dremio setup`
instead of showing a raw pydantic ValidationError.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 3, 2026

CLA assistant check
All committers have signed the CLA.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

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

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: 3b7481d896

ℹ️ About Codex in GitHub

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

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

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

rahim-bhojani and others added 2 commits April 2, 2026 20:55
- Setup now reads the global --config flag from cli.py so
  `dremio --config /tmp/custom.yaml setup` writes to the correct path
- 403 errors now show a distinct "Access denied" message and offer
  a choice to retry either PAT or project ID (since 403 can be
  caused by insufficient token scope, not just wrong project)
- Added test for 403 validation case

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. Retry loop now asks "Try again?" after each failure — users can
   decline to abort instead of being stuck in an infinite loop
2. Global --config passed via ctx.obj instead of importing _cli_opts
   (eliminates fragile cross-module private dict access)
3. Added 7 integration tests for setup_command: happy path, non-TTY
   detection, existing config decline/overwrite, retry-then-abort,
   and global --config passthrough (15 tests total)
4. Config file now includes a header comment noting PAT is stored
   in plaintext
5. asyncio.run() in existing event loop noted as pre-existing
   pattern across all commands — not addressed in this PR

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rahim-bhojani rahim-bhojani merged commit 39f8411 into main Apr 4, 2026
5 checks passed
@rahim-bhojani rahim-bhojani deleted the feat/interactive-setup branch April 4, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants