Skip to content

Adds Databricks backend - #325

Merged
isabelizimm merged 67 commits into
mainfrom
databricks
Jun 4, 2025
Merged

isabelizimm merged 67 commits into
mainfrom
databricks

Conversation

@edgararuiz

Copy link
Copy Markdown
Collaborator

Test results:

 pins-python % pytest pins -m 'fs_dbc' -v   
===== 56 passed, 6 skipped, 418 deselected in 967.27s (0:16:07) ========

Overview:

Following the same pattern for Posit Connect, it adds a "stub" fsspec spec to create the integration. It uses databricks-sdk to authenticate and interact with Databricks.

Details:

  • Adds board_databricks() function that follows the same pattern of the other boards
  • Adds a new AbstractFileSystem (fsspec) named DatabricksFs, which is called by the board constructor, just like it does with Posit Connect boards
  • DatabricksFs overrides ls, exists, open, get, mkdir, get, put and rm
  • Adds new BoardBuilder for testing. DbcBoardBuilder overrides __init__, create_tmp_board, teardown_board, and teardown

@isabelizimm isabelizimm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There are a few methods that don't need to be staticmethod (anything that uses self won't need a staticmethod decorator), but apart from that this looks good!

FYI that the failing tests are unrelated-- I have a few pieces of maintenance that I'll need to merge before this can go in.

Comment thread pins/tests/helpers.py
# putting imports inside rsconnect particulars for now


def skip_if_dbc(func):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Due to some boring housekeeping reasons, our test boards are all read-only right now for Databricks. That means things we test a few things like pin_read and pin_list but do NOT test pin_write and many other functionalities.

I've added this decorator + lots of TODOs to note all the tests we are skipping on dbc 😬 We'll release this as-is for now, but plan to change to make this fully tested in the future.

This branch was successfully deployed

1 active deployment
pr-325 — 95e78732 Deployed Jun 4, 2025 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants