databricks / cli

Databricks CLI
Other
150 stars 56 forks source link

Extract functionality to detect if the CLI is running on DBR #1889

Closed pietern closed 1 week ago

pietern commented 2 weeks ago

Changes

Whether or not the CLI is running on DBR can be detected once and stored in the command's context.

By storing it in the context, it can easily be mocked for testing.

This builds on the simpler approach and conversation in #1744. It unblocks testing of the DBR-specific paths while not compromising on the checks we can perform to test if the CLI is running on DBR.

Tests

github-actions[bot] commented 1 week ago

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger: go/deco-tests-run/cli

Inputs:

Checks will be approved automatically on success.

eng-dev-ecosystem-bot commented 1 week ago

Test Details: go/deco-tests/11817474520