Repository navigation
Conversation
Code Review Agent Run #a347e0Actionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #44278 +/- ##
==========================================
+ Coverage 85.23% 85.35% +0.12%
==========================================
Files 3084 3095 +11
Lines 211515 213333 +1818
Branches 49864 50135 +271
==========================================
+ Hits 180279 182094 +1815
+ Misses 27835 27823 -12
- Partials 3401 3416 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️❗ @eschutho Your base branch
|
3 similar comments
🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️❗ @eschutho Your base branch
|
🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️❗ @eschutho Your base branch
|
🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️ 🙅♂️❗ @eschutho Your base branch
|
|
2 similar comments
|
|
a09f0b1 to
6903831
Compare
Code Review Agent Run #4b6b68Actionable Suggestions - 0Additional Suggestions - 2
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
2 similar comments
|
|
|
Thanks @eschutho, the scheme-only swap with the marker for a clean downgrade looks solid to me. One thing before I approve though. Codeant's two threads are still open too, so I'd love for you to assess and address or resolve those before this gets merged. Holler if you want a hand with the rebase. |
6903831 to
fb751e8
Compare
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@rusackas thanks for the review. Updated:
Both review threads are resolved, and the new cases are covered in |
|
2 similar comments
|
|
|
|
5313092 to
6564069
Compare
Databricks connections on the legacy `databricks+pyodbc` driver resolve to `DatabricksODBCEngineSpec`, which has no `parameters_schema` and so only ever renders the raw SQLAlchemy URI text field. The `databricks+connector` driver resolves to `DatabricksNativeEngineSpec`, which defines a `parameters_schema` and renders the dynamic connection form (epic sc-120993). The two drivers share the same URL shape and both read http_path/catalog/schema from `extra.engine_params.connect_args`, so migrating is a scheme-only driver swap that preserves every credential and setting byte-for-byte. `upgrade` records a marker in `extra` so `downgrade` reverts only the rows it migrated and never touches natively-created connector connections; the round trip is exact and the migration is idempotent. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Point the migration at the current migration head so the graph has a single head again. Upgrade and downgrade skip and log any connection whose extra is not a valid JSON object instead of aborting partway through a batched run. The URI and marker are written together per row, so a partial run is safe to re-run. The marker written on upgrade records this revision and the row id, and downgrade only reverts rows whose marker matches both. A connection whose extra was copied from a migrated one keeps its connector driver. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Point a3f5c9e21b84 at master's head b8f3a2c91d64 (migrate legacy connector URIs) so the migration graph resolves to a single head again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Land databricks+pyodbc connections on the native databricks:// scheme (DatabricksPythonConnectorEngineSpec) instead of databricks+connector, which b8f3a2c91d64 migrates away from. Like that revision, only the URI prefix is rewritten; extra keeps its engine_params shape and encrypted_extra and the password column are never touched. Downgrade still restores the exact databricks+pyodbc URI for rows carrying this revision's row-bound marker. Co-Authored-By: Claude Opus 5.5 <[email protected]>
6564069 to
a4de8dc
Compare
rusackas
left a comment
There was a problem hiding this comment.
Thanks @eschutho, appreciate the rebase and the thread cleanup. down_revision lines up with the current head on master, and landing these on databricks:// alongside #45843 makes sense to me.
One thing before approving, which I should have asked last time... this swaps the actual driver out from under ODBC connections, so a deployment that only has pyodbc set up would need the databricks extra installed before those connections work again after superset db upgrade, right? If so, I think this needs an UPDATING.md note like the one #45843 added for databricks+connector://. Otherwise LGTM!
|
…ation Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Thanks @rusackas, yes, that's right: these connections move from |
|
1 similar comment
|
|
rusackas
left a comment
There was a problem hiding this comment.
Thanks @eschutho, the UPDATING.md note covers it.
Sadly master picked up two more migrations since then (that's what the bot keeps flagging), and its head is now a7d29bc4e681 (add_chart_archive_scope), so this would end up with two heads. Mind pointing down_revision and the Revises: line at that one? Otherwise LGTM!
| is safe to re-run. | ||
|
|
||
| Revision ID: a3f5c9e21b84 | ||
| Revises: b8f3a2c91d64 |
There was a problem hiding this comment.
| Revises: b8f3a2c91d64 | |
| Revises: a7d29bc4e681 |
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision = "a3f5c9e21b84" | ||
| down_revision = "b8f3a2c91d64" |
There was a problem hiding this comment.
| down_revision = "b8f3a2c91d64" | |
| down_revision = "a7d29bc4e681" |
|
SUMMARY
Superset renders the dynamic connection form when the engine spec resolved from a database's URI defines a
parameters_schema. Databricks connections on the legacydatabricks+pyodbcdriver resolve toDatabricksODBCEngineSpec, which has noparameters_schema, so they only ever expose the raw "SQLAlchemy URI" text field.This adds an Alembic migration that rewrites existing
databricks+pyodbcdatabases to the nativedatabricks://scheme, which resolves toDatabricksPythonConnectorEngineSpec(the "Databricks" spec with the dynamic form). It lands ODBC connections on the same target as #45843 (b8f3a2c91d64, which converts legacydatabricks+connector://URIs todatabricks://), rather than on thedatabricks+connectorscheme that revision migrates away from.Why this is a safe, scheme-only swap. Matching
b8f3a2c91d64, only the URI prefix is rewritten; everything after the scheme is kept byte-for-byte:The native spec reads the URI path as the default schema and takes
http_path,catalogandschemafrom either the query string orextra.engine_params.connect_args. ODBC connections keep these settings in one of those two places, so theengine_paramsshape carries over unchanged.ODBC →
databricks://field mappingdatabricks+pyodbc)databricks://,DatabricksPythonConnectorEngineSpec)token:<pat>@)/<database>)connect_args.http_pathor?http_path=connect_argsssl=1)driver_path)connect_argsdatabricks+pyodbcdatabricksencrypted_extraand the encrypted password column are never read or written.Rollback
upgrade()writes a marker (migrated_from_databricks_odbc: {"revision": "a3f5c9e21b84", "database_id": <id>}) into each migrated row'sextra.downgrade()restores the exactdatabricks+pyodbcURI only fordatabricks://rows whose marker matches this revision and that row's id, then strips it. Nativedatabricks://connections, rows converted byb8f3a2c91d64(which carry that revision's own marker), and connections whoseextrawas copied from a migrated row are never touched. Rows with malformedextraare logged and skipped in both directions. Both directions are idempotent.TESTING INSTRUCTIONS
pytest tests/unit_tests/migrations/test_migrate_databricks_odbc_to_native_uri.py(17 tests: scheme-swap helper including?http_path=URIs, upgrade touches only ODBC rows, native and legacy-connector rows untouched,driver_pathconnect args preserved, idempotency, row-bound marker protection on downgrade, malformedextra, full round trip).superset db headsresolves to the single heada3f5c9e21b84.databricks+pyodbc,databricks+connectorand nativedatabricks://rows atf72b6e9c104a, then ransuperset db upgrade(ODBC →databricks://via this revision; legacy connector →databricks://viab8f3a2c91d64) andsuperset db downgrade f72b6e9c104a. All rows came back byte-identical.databricks+pyodbc://token:<pat>@host:443/defaultandhttp_pathin Extra →engine_params.connect_args; runsuperset db upgrade. The connection should resolve to the "Databricks" spec, and the edit modal should show the dynamic form withhttp_pathpopulated. Runsuperset db downgrade; the URI should revert todatabricks+pyodbcand the marker should be gone.ADDITIONAL INFORMATION
databricks+pyodbcrows — ~11 fleet-wide; paginated update; no schema/DDL change, no downtime)🤖 Generated with Claude Code