Skip to content

fix(sdk): honor KINDLING_ARTIFACTS_STORAGE_PATH in DatabricksAPI job submission - #226

Open
jtdossett wants to merge 1 commit into
mainfrom
feat/216-databricks-artifacts-path-job-submit
Open

fix(sdk): honor KINDLING_ARTIFACTS_STORAGE_PATH in DatabricksAPI job submission#226
jtdossett wants to merge 1 commit into
mainfrom
feat/216-databricks-artifacts-path-job-submit

Conversation

@jtdossett

Copy link
Copy Markdown
Collaborator

Summary

  • DatabricksAPI job submission now honors KINDLING_ARTIFACTS_STORAGE_PATH when resolving the artifacts storage path, instead of silently falling back to the legacy AZURE_STORAGE_ACCOUNT/container path (or raising an opaque error).
  • Missing/unset configuration now raises an actionable ValueError instead of returning a bare "artifacts" fallback.

Test plan

  • poe test-unit — 2344 passed, 2 skipped
  • New unit tests in tests/unit/test_platform_databricks_sdk_job_config.py cover from_env precedence, missing-attribute guard, ValueError raise, and the /Volumes/... path case
  • Internal reviewer verified diff against DESIGN — APPROVE, no blockers

Closes #216

🤖 Generated with Claude Code

…submission

DatabricksAPI.from_env() only read the legacy AZURE_STORAGE_ACCOUNT/
AZURE_CONTAINER/AZURE_BASE_PATH triple, so app run/app job register
failed job submission with an invalid schemeless python_file
(artifacts/scripts/kindling_bootstrap.py) on any workspace configured
per the gh#211/gh#207 pattern with only KINDLING_ARTIFACTS_STORAGE_PATH
set (e.g. a Databricks Volumes path).

DatabricksAPI now accepts artifacts_path, populated from
KINDLING_ARTIFACTS_STORAGE_PATH in from_env, and consulted by
_resolve_artifacts_storage_path ahead of the legacy storage_account/
container branch. _resolve_python_file needed no change - it already
does a scheme-agnostic join. Existing AZURE_STORAGE_ACCOUNT-only
configurations are unaffected (self.artifacts_path stays None, so the
untouched legacy branch fires exactly as before). When neither is
configured, artifact resolution now raises an actionable ValueError
instead of silently returning the bare "artifacts" literal that caused
this bug.

Fixes gh#216
Copilot AI review requested due to automatic review settings July 30, 2026 04:29
@jtdossett jtdossett closed this Jul 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the Kindling SDK Databricks job-submission path to correctly honor KINDLING_ARTIFACTS_STORAGE_PATH (notably /Volumes/... roots), preventing invalid relative python_file references during kindling app run / job registration.

Changes:

  • Added artifacts_path to DatabricksAPI and populate it from KINDLING_ARTIFACTS_STORAGE_PATH in from_env().
  • Updated _resolve_artifacts_storage_path() to prefer artifacts_path and to raise an actionable ValueError instead of falling back to a bare "artifacts" literal.
  • Added unit tests covering env precedence, Volumes path behavior, and the new failure mode; documented the fix in CHANGELOG.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/kindling_sdk/kindling_sdk/platform_databricks.py Adds artifacts_path support and improves artifacts-path resolution/error behavior for Databricks job submission.
tests/unit/test_platform_databricks_sdk_job_config.py Adds unit coverage for Volumes-only configuration and the new ValueError behavior.
CHANGELOG.md Records the Databricks SDK fix under Unreleased.

Comment on lines +218 to +223
raise ValueError(
"Databricks artifacts location is not configured. Set "
"KINDLING_ARTIFACTS_STORAGE_PATH (e.g. /Volumes/<catalog>/<schema>/"
"<volume>/kindling or abfss://...) or the legacy AZURE_STORAGE_ACCOUNT "
"(+ optional AZURE_CONTAINER, AZURE_BASE_PATH)."
)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fair point, but keeping this out of scope for this fix: the ValueError here only fires when nothing is configured for either mode, and the classic-mode env vars (KINDLING_DATABRICKS_CLASSIC_ARTIFACTS_PATH/KINDLING_DATABRICKS_CLASSIC_BOOTSTRAP_ROOT) already have their own resolution path elsewhere in this method — this issue targeted the UC/Volumes gap specifically. Enumerating every mode's env vars in one shared error message is a reasonable follow-up but not a correctness issue introduced by this change.

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.

[Bug] DatabricksAPI job submission ignores KINDLING_ARTIFACTS_STORAGE_PATH — produces invalid python_file for Volumes-only workspaces

2 participants