Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for #2181 /Workspace not prepended #2188

Merged
merged 3 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
workspace:
profile: profile_name
root_path: ${var.workspace_root}/path/to/root

variables:
workspace_root:
description: "root directory in the Databricks workspace to store the asset bundle and associated artifacts"
default: /Users/${workspace.current_user.userName}

targets:
dev:
default: true
prod:
variables:
workspace_root: /Shared

resources:
jobs:
my_job:
tasks:
- existing_cluster_id: 500
python_wheel_task:
named_parameters:
conf-file: "${workspace.file_path}/path/to/config.yaml"
67 changes: 67 additions & 0 deletions acceptance/bundle/variables/prepend-workspace-var/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/Workspace should be prepended on all paths, but it is not the case:
{
"bundle": {
"environment": "dev",
"git": {
"bundle_root_path": ".",
"inferred": true
},
"target": "dev",
"terraform": {
"exec_path": "$TMPHOME"
}
},
"resources": {
"jobs": {
"my_job": {
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Users/$USERNAME/path/to/root/state/metadata.json"
},
"edit_mode": "UI_LOCKED",
"format": "MULTI_TASK",
"permissions": [],
"queue": {
"enabled": true
},
"tags": {},
"tasks": [
{
"existing_cluster_id": "500",
"python_wheel_task": {
"named_parameters": {
"conf-file": "/Users/$USERNAME/path/to/root/files/path/to/config.yaml"
}
},
"task_key": ""
}
]
}
}
},
"sync": {
"paths": [
"."
]
},
"targets": null,
"variables": {
"workspace_root": {
"default": "/Users/$USERNAME",
"description": "root directory in the Databricks workspace to store the asset bundle and associated artifacts",
"value": "/Users/$USERNAME"
}
},
"workspace": {
"artifact_path": "/Users/$USERNAME/path/to/root/artifacts",
"current_user": {
"short_name": "$USERNAME",
"userName": "$USERNAME"
},
"file_path": "/Users/$USERNAME/path/to/root/files",
"profile": "profile_name",
"resource_path": "/Users/$USERNAME/path/to/root/resources",
"root_path": "/Users/$USERNAME/path/to/root",
"state_path": "/Users/$USERNAME/path/to/root/state"
}
}
2 changes: 2 additions & 0 deletions acceptance/bundle/variables/prepend-workspace-var/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo /Workspace should be prepended on all paths, but it is not the case:
$CLI bundle validate -o json
Copy link
Contributor

Choose a reason for hiding this comment

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

Please include a link to this PR and #2181 as well. Need git log otherwise to figure out where this comes from.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added link to #2181.

Loading