bundle path as a substitution variable

Open
#5,890 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
cli

Research direction

Start by tracing how existing substitutions such as bundle.name and bundle.uuid are resolved, then inspect how the CLI determines the directory containing databricks.yml. Done means bundle.path expands to that bundle directory as an absolute path, with tests covering the substitution.

Written by the indexing model from the issue text.

Description

DABs Enhancement
Describe the issue

We have multiple bundles in one repository, sharing some common resources in the repo root, which we include into the databricks.yml of the bundles.

The common resources also include the artifacts, which use a script to download additional wheels into the dist directory of the bundle. Therefore we need the path to the bundle. Currently we use a variable "bundle_path" in each of those bundles and reference it in the common script. but this is brittle, e.g. when the path/directory changes.

Expected Behavior

A substitution like bundle.path (next to bundle.name, bundle.uuid) would be really helpful. This variable should contain the full, absolute path to the bundle (=directory containing the databricks.yml).

Additionally, bundle.cwd would be a nice to have, pointing to the current working dir (the folder the databricks bundle command was executed). But more important for us would be bundle.path.

Actual Behavior

Need to specify a manual variable (of course this variable could also be filled when executing bundle commands, but its easy to forget.

OS and CLI version

CLI Version 1.5

Dominant language
Go
Stars
427
Forks
267
Avg merge
2d 1h
Merged PRs (30d)
233

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/cli

All issues in databricks/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.