Skip to content

Update Databricks SQL to 0.5.0 - #106

Open
garridolecca wants to merge 1 commit into
opengeos:mainfrom
garridolecca:update-databricks-sql-0.5.0
Open

garridolecca wants to merge 1 commit into
opengeos:mainfrom
garridolecca:update-databricks-sql-0.5.0

Conversation

@garridolecca

@garridolecca garridolecca commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Plugin: Databricks SQL (garridolecca/rustgis-databricks), updated from 0.4.0 to 0.5.0. Thank you for merging #103 and #104.

What changed (CHANGELOG):

  • H3 density: a dynamic layer over its row limit shows H3 cells sized to the zoom.
  • Pick a profile and a warehouse: CLI profile and SQL warehouse dropdowns. Connect starts a stopped warehouse and shows its progress.
  • Genie in the background: from the panel, Genie shows its steps as it works, with Cancel.
    • Genie One asks the whole workspace, over its MCP server on Unity Gateway.
    • Answers link to Databricks.
    • Rows without geometry become standalone tables.
  • Explain this Map: a new tab that sends the map picture (share.exportMap) and its layers to an image-capable model in the user's workspace, through Unity Gateway.
  • Layers that last: Databricks layers are GeoPackages in a lasting cache, with their source recorded.
    • Saved projects re-attach.
    • Refresh layers re-queries in place, keeping styling.
    • A dynamic layer with nothing in view zooms to its data first.
  • Safer SQL:
    • map boxes are bound as query parameters;
    • each layer is one SELECT;
    • names are quoted;
    • bandit passes.
  • Releases: unit tests, CI and a release workflow that builds the .rgplugin and this entry from a tag.

How I tested it:

  • Setup: RustGIS 0.8.0 on macOS (arm64) with rustgis-cli, against a Databricks SQL warehouse.

  • Covered:

    • H3 density switching (res 7 to 9 and back);
    • Load once plus Refresh layers;
    • zoom to data;
    • a summary query added as a table;
    • a reopened saved project re-attaching its dynamic layer;
    • Genie and Genie One answers mapped;
    • Explain this Map;
    • a clean install of the release package.
  • python scripts/build.py --check passes.

  • The entry's source.url is a release asset of the plugin's repository, and sha256 is that file's (eb84f852…, checked against the downloaded asset).

  • The plugin asks only for the permissions it uses: edit (layers), network (Databricks), files (its cached GeoPackages and the map picture for Explain).

A question for later: a packaged project carries a Databricks layer's last snapshot, but a colleague's RustGIS can't re-query it. A plugin has no place to keep a layer's source inside the project. Would something like per-layer plugin metadata, saved with the project, fit RustGIS's design? I'd be glad to open an issue.

This pull request and its description were written by Isaac.

Summary by CodeRabbit

  • Updates
    • The Databricks SQL registry entry now points to plugin release v0.5.0, replacing v0.4.0. The release entry also includes the SHA-256 checksum for v0.5.0. This update changes the registered plugin release and its corresponding verification value; no other user-facing changes are noted.

Co-authored-by: Isaac <no-reply@databricks.com>
@garridolecca
garridolecca requested a review from giswqs as a code owner December 2, 2026 00:50
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Databricks SQL registry entry now points to plugin release v0.5.0 and uses its SHA-256 checksum.

Changes: Databricks SQL plugin release update

Layer / File(s) Summary
Update plugin release reference
registry/databricks-sql.json
The download URL and SHA-256 checksum now reference release v0.5.0 instead of v0.4.0.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Other

Merge Risk: Minimal · up to fa904

This updates the Databricks SQL plugin registry entry to the v0.5.0 release. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Update Databricks SQL to 0.5.0" matches the only change in the changeset, which points the databricks-sql registry entry from the v0.4.0 release to v0.5.0 and updates its SHA-256. It is sho…
Description check Passed The description follows the template. It names the plugin and links its repository, explains what changed, and describes the testing setup (RustGIS 0.8.0 on macOS arm64 with rustgis-cli). Both checkli…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Update Databricks SQL to 0.5.0" matches the only change in the changeset, which points the databricks-sql registry entry from the v0.4.0 release to v0.5.0 and updates its SHA-256. It is short, specific, and names the plugin and the new version.

Full details: Description check

Explanation

The description follows the template. It names the plugin and links its repository, explains what changed, and describes the testing setup (RustGIS 0.8.0 on macOS arm64 with rustgis-cli). Both checklist items are ticked, and the source URL and SHA-256 are stated as checked. The permissions item is addressed by listing the permissions the plugin uses. The description is long and includes a question about future work, but the required sections are complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the registry line,
The v0.5.0 link looks fine.
A checksum joins the release path,
The old one hops away at last.
The registry rests, updated and neat.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c6e74277-d795-4d58-b949-f25bcab05437
Commits

Reviewing files that changed from the base of the PR and between 44a5a7f and fa904d2.

Files selected for processing: 1

  • registry/databricks-sql.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

"url": "https://github.com/garridolecca/rustgis-databricks/releases/download/v0.4.0/databricks-sql-0.4.0.rgplugin",
"sha256": "1c610014750808b1326ee53d1f3902b6cf6a15638b3252b0ddd7f97355948e9e"
"url": "https://github.com/garridolecca/rustgis-databricks/releases/download/v0.5.0/databricks-sql-0.5.0.rgplugin",
"sha256": "eb84f8529f54e04ff0d834984fe6b412e5a808daf1f135db2405d046d85a046b"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This points at a process plugin (python main.py). It is not sandboxed, so it runs with the user's full rights. permissions only gate host requests. The package is a one-version bump with the same checks as 0.4.0, and the SHA-256 is pinned. I found nothing malicious in main.py (see the summary for details). Two things for maintainers to confirm:

  • The plugin requests a network permission. Check that the registry and SDK accept it.
  • requirements.txt uses ranges (databricks-sql-connector[pyarrow]>=4.0,<5, databricks-sdk>=0.50,<1) rather than pins, so a clean install is not reproducible. Confidence: medium. Pinning would be preferable.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Code review

Bugs

  • None found in the diff. It changes only the source.url and sha256 in registry/databricks-sql.json, and the URL and version are consistent with the package's plugin.json (0.5.0). (high)

Security

  • Process plugin, not sandboxed: it runs with the user's full rights, and permissions only gate host requests. I read main.py (119 KB). It does the following:
    • Imports are stdlib plus databricks.sdk and databricks.sql.
    • It calls no subprocess, os.system, eval or exec.
    • It reads ~/.databrickscfg (or DATABRICKS_CONFIG_FILE) to list CLI profiles, and signs in through the SDK, so it never holds a token itself.
    • Network access goes to the user's Databricks workspace: the SQL connector, the SDK, and a Genie One MCP client over urllib (https only, signed by the SDK).
    • Local writes go to a per-user cache folder (~/.cache/rustgis-databricks, ~/Library/Caches or %LOCALAPPDATA%). Filenames are sanitized, with a uuid suffix.
    • No obfuscation or code loaded at run time.
    • Nothing found beyond the stated purpose. (medium-high: single-file read, not a line-by-line audit)
  • "Explain this Map" exports a map PNG (share.exportMap) plus the layer context, and sends both to a model on the user's workspace. This matches the description. The files permission and the data egress are worth noting for users. (medium)
  • Genie-generated or user SQL is checked by clean_sql: a single SELECT/WITH only, and map boxes are bound as parameters. This is a regex-based guard, but the statement is wrapped as a sub-select. (low concern)
  • requirements.txt uses version ranges, not pins (databricks-sql-connector[pyarrow]>=4.0,<5, databricks-sdk>=0.50,<1). The packages are well known and not typosquats. Pinning would be preferable. (medium)
  • The network permission is not one of the permissions listed in the review guidance (edit, files). Maintainers should confirm that the registry and the app accept it. (low-medium)
  • The cache folder is outside the plugin folder and persists on purpose, so saved projects can re-attach. This is persistence outside the plugin folder, but it is stated in the description. (low)

Performance

  • None raised. Row caps exist (MAX_ROWS 200k) and dynamic layers are debounced. (low)

Quality

  • The 0.5.0 package adds a large feature set (H3 density, Genie One, Explain, cached GeoPackages) in a single main.py. That is hard to review in full here. (low)

CLAUDE.md

  • No CLAUDE.md issues. The PR changes a registry entry only, not plugin source, which is within scope.

Plugin packages

id version runtime package module permissions module imports commands named in strings
databricks-sql 0.5.0 process (not sandboxed), Python 3.12 54,381 B 6 files edit, network, files runs ["python", "main.py"] n/a: read its code

Assessment:

  • Package and manifest: All six files unpacked as text (main.py, plugin.json, requirements.txt, README, CHANGELOG, LICENSE), and there are no binaries. The manifest id, name and version match the entry, and homepage leads to the source repository.
  • Code: The code matches its stated purpose and I found nothing suspicious.
  • Host requests: It calls layer.addData, layer.reloadData, layer.remove, layer.symbology, layer.transparency, layer.move, layer.zoomTo and share.exportMap. layer.remove only touches layers the plugin itself created. Those calls fit the edit and files permissions.
  • Open points: The permission and pinning notes above.

Change size

Compared: the whole PR against main (merge base 44a5a7f to PR head fa904d2).

Metric Value
Files changed 1 (0 added, 1 modified, 0 removed, 0 renamed)
Size before 297 B
Size after 297 B
Total size change +0 B
File Before After Change
registry/databricks-sql.json 297 B 297 B +0 B

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

🧩 Plugin preview

Open in RustGIS: web.rustgis.app's Plugin Manager on this pull request's registry (1 plugin package from this pull request). Install from Browse; RustGIS shows the permissions first.

Item Value
Preview https://pr-106.rustgis-plugins-preview.pages.dev
Registry (desktop: Plugin Manager › Settings) https://pr-106.rustgis-plugins-preview.pages.dev/registry.json
This commit https://de30efdc.rustgis-plugins-preview.pages.dev
Commit fa904d2

Unreviewed code: install it only to review this pull request.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant