-
Notifications
You must be signed in to change notification settings - Fork 118
Add lazy warehouse resolution with smart discovery #3973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: mcp/lazy-auth
Are you sure you want to change the base?
Conversation
|
Commit: b31acf9
11 failing tests:
Top 9 slowest tests (at least 2 minutes):
|
4b6ea60 to
537c596
Compare
Implements intelligent warehouse auto-discovery: - Add GetWarehouseID() with smart fallback chain: 1. Check DATABRICKS_WAREHOUSE_ID environment variable 2. Query available warehouses via API 3. Prefer RUNNING warehouses 4. Fall back to STOPPED warehouses (auto-start) 5. Use first available warehouse - Cache warehouse ID in session after first resolution - Remove warehouse ID from CLI flags and config - Update NewDatabricksRestClient and ResourcesFromEnv to use GetWarehouseID Eliminates need to specify warehouse ID upfront.
a20f35d to
ced4c41
Compare
f5c131f to
ced4c41
Compare
| } | ||
| } | ||
|
|
||
| // Return first available warehouse regardless of state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we cover STOPPED + STOPPING together with the same priority and raise err here already? From what I read, the left states are DELETING / DELETED, not a good choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've improve the lookup code. I also consider starting and stopping now and ignore the deleting and deleted states.
70756b8 to
b31acf9
Compare
Implements intelligent warehouse auto-discovery removing need for configuration.
Changes
Dependencies
Testing