fix: core app reliability β auth, session management, gateway, .databricksignore#19
Open
fix: core app reliability β auth, session management, gateway, .databricksignore#19
Conversation
- Normalize emails to lowercase for case-insensitive SSO header auth
- Fix 30-character Databricks App name truncation in setup
- Cap concurrent sessions via MAX_CONCURRENT_SESSIONS (default 5)
- Inject fresh token in content-filter proxy on PAT rotation (avoids 401s)
- Auto-discover AI Gateway from DATABRICKS_WORKSPACE_ID; probe reachability
before using auto-discovered URL to avoid silent fallback
- Add app_state.py for persistent owner/rotation tracking (~/.coda/)
- Add .databricksignore to exclude .venv and caches from workspace sync
- Session management, clipboard, and rendering fixes (v0.17.0)
- Add PR template with dogfood testing checklist
- Update GitHub Actions: dependency audit + auto-lockfile update workflows
Tests: test_gateway_discovery (new), test_session_limit (new),
test_clipboard_addon (new), full existing test suite unaffected.
Co-authored-by: Isaac
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.
Priority
P2 β multiple latent reliability fixes (case-insensitive auth, gateway auto-discovery, session-limit cap, fresh-token-on-rotation). Bundled because the fixes share auth/session/gateway surface area and tests were written holistically. Note in PR body:
requirements.lockandrequirements.txtshould be regenerated frompyproject.tomlviauv lock && uv pip compilebefore merge β they were taken whole-cloth from main during rebase rather than manually merged.Summary
Migrates datasciencemonkey PR #138 to the new repo home, rebased onto
databrickslabs/main.Bundle of reliability fixes:
databricks apps getlookup and the deploy script silently fails.DATABRICKS_WORKSPACE_IDwith reachability probe before use; falls back to direct serving endpoints if unreachable.MAX_CONCURRENT_SESSIONScap (default 5) to prevent resource exhaustion on a single-container app.description: "owner:{email}").app_state.pyβ lightweight persistence for owner + last rotation under~/.coda/..databricksignoreβ exclude.venv/and caches fromdatabricks sync(huge upload otherwise).Rebase notes
10 conflicts resolved against current
main:.gitignore(codex/.agents ignores),Makefile(.PHONYincludestest),app.yaml(databricks-gpt-5-5, dropped redundantMLFLOW_CLAUDE_TRACING_ENABLEDsince feat: MLflow tracing with async Stop hook (opt-in)Β #15 owns that),pyproject.toml(kept v0.18.1 + cryptography 46.0.7), GH workflow files (commit-pinnedsetup-uv,databrickslabs-protected-runner-group),tests/test_session_limit.py(kept main's session-clear test isolation).requirements.txt+requirements.lockβ took main's versions (27 conflict blocks total in auto-generated lock files; not worth manual merge). TODO: regenerate viauv lock && uv pip compile pyproject.toml -o requirements.txtbefore merge if any new deps from this branch aren't transitively included.app.py(4 blocks):_configure_all_cli_auth: kept main's read-merge-write (PR #153 race fix). Branch's full-overwrite was redundant βtheme/permissionsset bysetup_claude.pyat startup are preserved naturally by the merge pattern.set_product_info(w)telemetry call.set_product_info(w)afterWorkspaceClient(...).GEMINI_API_KEYpop (so Gemini reads from config, not stale env after rotation).Test plan
uv run pytest tests/ --ignore=tests/gatesβ 184 should passtests/test_gateway_discovery,test_session_limit,test_clipboard_addonexercise the new behaviourdatabricks apps get coding-agentsreturns OK (no 30-char truncation)User@Company.com) authorises correctly.venv/absent from workspace afterdatabricks syncrequirements.lock+requirements.txtfrompyproject.tomlbefore merge if any new deps need pinningCloses #10
This pull request and its description were written by Isaac.