feat: add interactive setup wizard (dremio setup)#11
Merged
rahim-bhojani merged 4 commits intomainfrom Apr 4, 2026
Merged
Conversation
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>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 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".
- 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>
aniket-s-kulkarni
approved these changes
Apr 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dremio setupinteractive wizard that walks users through region selection, PAT creation, and project ID discovery with step-by-step instructions, clickable URLs, and credential validationdremio setup~/.config/dremioai/config.yamlwith proper permissions (600)Test plan
dremio setupinteractively — verify full wizard flow (region, PAT, project ID, validation, config write)dremio setupagain — verify existing config overwrite promptdremio query run "SELECT 1"without config — verify improved error messageecho "" | dremio setup— verify non-interactive detectionpytest tests/test_commands/test_setup.py -v— 7 tests covering write_config and validate_credentials🤖 Generated with Claude Code