fix(auth check): add messaging for invalid DATAROBOT_API_TOKEN#375
Merged
ajalon1 merged 2 commits intodatarobot-oss:mainfrom Feb 19, 2026
Merged
fix(auth check): add messaging for invalid DATAROBOT_API_TOKEN#375ajalon1 merged 2 commits intodatarobot-oss:mainfrom
ajalon1 merged 2 commits intodatarobot-oss:mainfrom
Conversation
When dr auth check detects an invalid or expired DATAROBOT_API_TOKEN environment variable, it now provides clear instructions on how to unset it for both Unix-like systems and Windows. This matches the error messaging pattern already used in EnsureAuthenticated() and helps users recover from the error without needing to search documentation. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Move the platform-specific DATAROBOT_API_TOKEN unset instructions into a shared function in internal/auth to eliminate duplication between: - EnsureAuthenticated() in internal/auth/auth.go - checkCLICredentials() in cmd/auth/check/cmd.go Both functions now call auth.PrintUnsetTokenInstructions() to display the same cross-platform unset command (Unix/Windows). Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Contributor
|
🔐 Smoke tests approved by maintainer ⏳ Running security scans before executing smoke tests with secrets... A maintainer has approved this fork PR to run smoke tests. Security scans will run first. |
Contributor
|
✅ All smoke tests passed! (Fork PR) ✅ Security Scan: success |
carsongee
approved these changes
Feb 17, 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.
RATIONALE
Was reviewing the code in #354 again and saw a couple of things to fix.
CHANGES
PR Automation
Comment-Commands: Trigger CI by commenting on the PR:
/trigger-smoke-testor/trigger-test-smoke- Run smoke tests/trigger-install-testor/trigger-test-install- Run installation testsLabels: Apply labels to trigger workflows:
run-smoke-testsorgo- Run smoke tests on demand (only works for non-forked PRs)Important
For Forked PRs: If you're an external contributor, the
run-smoke-testslabel won't work. Only maintainers can trigger smoke tests on forked PRs by applying theapproved-for-smoke-testslabel after security review. Please comment requesting maintainer review if you need smoke tests to run.