Skip to content

Commit 5ea18d3

Browse files
committed
fix: Azure deployment fixes and dark mode playground
- Revert databricks-sdk to >=0.40.0 (>=0.55.0 caused SDK to use SP credentials instead of user OBO token for embeddings) - Document required OAuth scopes in README deploy steps and CLAUDE.md (dashboards.genie + serving.serving-endpoints, set via CLI post-deploy) - Fix dark mode in playground: textarea bg and error state colors - Remove hardcoded app URL defaults from demo notebooks - Remove obsolete TECHNICAL_GUIDE.pdf Co-authored-by: Isaac
1 parent 08de4fc commit 5ea18d3

File tree

7 files changed

+15
-14
lines changed

7 files changed

+15
-14
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,15 @@ databricks sync . /Workspace/Users/<your-email>/genie-cache-queue
4343
# Deploy
4444
databricks apps deploy genie-cache-queue \
4545
--source-code-path /Workspace/Users/<your-email>/genie-cache-queue
46+
47+
# Configure OAuth scopes (required once after first deploy)
48+
databricks apps update genie-cache-queue --json '{
49+
"user_api_scopes": ["sql", "serving.serving-endpoints", "dashboards.genie"]
50+
}'
4651
```
4752

53+
> **Note:** The `dashboards.genie` scope allows the app to call the Genie API on behalf of the logged-in user. Without it, gateway creation cannot list Genie Spaces and queries will fail with `403 Invalid scope`. This only needs to be set once per app installation — it is not configurable via `app.yaml`.
54+
4855
### 2. Create a Gateway
4956

5057
Open the app URL. On the **Gateways** home page, click **+** to create a new gateway:

TECHNICAL_GUIDE.pdf

-18 KB
Binary file not shown.

backend/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pydantic-settings==2.1.0
55
httpx==0.26.0
66
python-dotenv==1.0.0
77
numpy==1.26.3
8-
databricks-sdk>=0.55.0
8+
databricks-sdk>=0.40.0
99

1010
# PostgreSQL with PGVector for vector similarity search
1111
pgvector==0.2.4

frontend/src/components/playground/PlaygroundPage.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ function ChatMessage({ item }) {
185185
)}
186186

187187
{isFailed && (
188-
<div className="bg-red-50 border border-red-200 rounded p-3">
189-
<p className="text-[13px] text-red-700">{item.error || 'An unknown error occurred'}</p>
188+
<div className="bg-dbx-status-red-bg border border-dbx-danger-border rounded p-3">
189+
<p className="text-[13px] text-dbx-text-danger">{item.error || 'An unknown error occurred'}</p>
190190
</div>
191191
)}
192192
</div>
@@ -575,7 +575,7 @@ export default function PlaygroundPage() {
575575
onKeyDown={handleKeyDown}
576576
placeholder={!selectedGateway && !loadingGateways ? 'Select a gateway above to start querying...' : 'Ask a question about your data...'}
577577
rows={2}
578-
className="flex-1 border border-dbx-border-input rounded p-3 text-[13px] text-dbx-text placeholder-dbx-border-input resize-none focus:outline-none focus:border-dbx-blue focus:ring-1 focus:ring-[rgba(34,114,180,0.2)] disabled:bg-dbx-sidebar disabled:cursor-not-allowed"
578+
className="flex-1 border border-dbx-border-input rounded p-3 text-[13px] text-dbx-text bg-dbx-bg placeholder-dbx-border-input resize-none focus:outline-none focus:border-dbx-blue focus:ring-1 focus:ring-[rgba(34,114,180,0.2)] disabled:bg-dbx-sidebar disabled:cursor-not-allowed"
579579
disabled={running || (!selectedGateway && !loadingGateways)}
580580
/>
581581
<div className="flex flex-col gap-1.5 items-stretch">

notebooks/api_gateway_demo.ipynb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@
1111
"metadata": {},
1212
"outputs": [],
1313
"execution_count": null,
14-
"source": [
15-
"dbutils.widgets.text(\"app_url\", \"https://genie-cache-queue-7474650836156271.aws.databricksapps.com\", \"App URL\")\n",
16-
"dbutils.widgets.text(\"gateway_id\", \"\", \"Gateway ID\")\n",
17-
"dbutils.widgets.text(\"space_id\", \"\", \"Genie Space ID\")"
18-
]
14+
"source": "dbutils.widgets.text(\"app_url\", \"\", \"App URL\")\ndbutils.widgets.text(\"gateway_id\", \"\", \"Gateway ID\")\ndbutils.widgets.text(\"space_id\", \"\", \"Genie Space ID\")"
1915
},
2016
{
2117
"cell_type": "code",

notebooks/mcp_gateway_agent_demo.ipynb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
"metadata": {},
1212
"outputs": [],
1313
"execution_count": null,
14-
"source": [
15-
"%pip install 'openai-agents[mcp]' -q"
16-
]
14+
"source": "%pip install 'openai-agents[mcp]' -q"
1715
},
1816
{
1917
"cell_type": "code",
@@ -29,7 +27,7 @@
2927
"metadata": {},
3028
"outputs": [],
3129
"execution_count": null,
32-
"source": "dbutils.widgets.text(\"app_url\", \"https://genie-cache-queue-7474650836156271.aws.databricksapps.com\", \"App URL\")\ndbutils.widgets.text(\"space_id\", \"\", \"Genie Space ID\")\ndbutils.widgets.text(\"gateway_id\", \"\", \"Gateway ID\")\ndbutils.widgets.text(\"model\", \"databricks-claude-sonnet-4\", \"Model Serving Endpoint\")"
30+
"source": "dbutils.widgets.text(\"app_url\", \"\", \"App URL\")\ndbutils.widgets.text(\"space_id\", \"\", \"Genie Space ID\")\ndbutils.widgets.text(\"gateway_id\", \"\", \"Gateway ID\")\ndbutils.widgets.text(\"model\", \"databricks-claude-sonnet-4\", \"Model Serving Endpoint\")"
3331
},
3432
{
3533
"cell_type": "code",

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pydantic-settings==2.1.0
55
httpx==0.26.0
66
python-dotenv==1.0.0
77
numpy==1.26.3
8-
databricks-sdk>=0.55.0
8+
databricks-sdk>=0.40.0
99

1010
# PostgreSQL with PGVector for vector similarity search
1111
pgvector==0.2.4

0 commit comments

Comments
 (0)