Skip to content

Add relative path translation for alert_task.workspace_path in job tasks - #4836

Merged
shreyas-goenka merged 1 commit into
mainfrom
alert-task-workspace-path
Apr 28, 2026
Merged

Add relative path translation for alert_task.workspace_path in job tasks#4836
shreyas-goenka merged 1 commit into
mainfrom
alert-task-workspace-path

Conversation

@shreyas-goenka

@shreyas-goenkashreyas-goenka commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add alert_task.workspace_path to the job task path rewrite patterns so relative paths (e.g. ./my_alert.dbalert.json) are translated to full workspace paths
  • Covers both regular tasks and for_each_task nested tasks via TranslateModeFile

Test plan

  • Unit tests for path visitor (TestVisitJobPaths, TestVisitJobPaths_foreach)
  • Unit test for path translation (TestTranslatePathsInSubdirectories)
  • Acceptance test (acceptance/bundle/resources/jobs/alert-task) — deploys a job with alert_task.workspace_path, reads it back via jobs get, and asserts the fully qualified workspace path. Runs on both local (mock server) and cloud, on both terraform and direct engines.

This pull request was AI-assisted by Isaac.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Mar 26, 2026

Copy link
Copy Markdown
Collaborator

Commit: 825581a

Run: 23603427603

Env💚​RECOVERED🙈​SKIP✅​pass🙈​skipTime
💚​aws linux7102708057:11
💚​aws windows7102728036:04
💚​aws-ucws linux71036672115:09
💚​aws-ucws windows71036871915:17
💚​azure linux1122738037:25
💚​azure windows1122758018:07
💚​azure-ucws linux11237171715:01
💚​azure-ucws windows11237371510:50
💚​gcp linux1122698067:34
💚​gcp windows1122718047:13
17 interesting tests: 10 SKIP, 7 RECOVERED
Test Nameaws linuxaws windowsaws-ucws linuxaws-ucws windowsazure linuxazure windowsazure-ucws linuxazure-ucws windowsgcp linuxgcp windows
💚​TestAccept💚​R💚​R💚​R💚​R💚​R💚​R💚​R💚​R💚​R💚​R
🙈​TestAccept/bundle/resources/permissions🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
💚​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions💚​R💚​R💚​R💚​R🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
💚​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct💚​R💚​R💚​R💚​R
💚​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform💚​R💚​R💚​R💚​R
💚​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions💚​R💚​R💚​R💚​R🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
💚​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct💚​R💚​R💚​R💚​R
💚​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform💚​R💚​R💚​R💚​R
🙈​TestAccept/bundle/resources/postgres_branches/basic🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_branches/recreate🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_branches/update_protected🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_branches/without_branch_id🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_endpoints/basic🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_endpoints/recreate🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_projects/update_display_name🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/synced_database_tables/basic🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/ssh/connection🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
Top 29 slowest tests (at least 2 minutes):
durationenvtestname
5:41azure windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
5:20azure-ucws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:40gcp linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:24azure-ucws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:12gcp linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:55azure-ucws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:52gcp windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:50aws-ucws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:43gcp windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:35aws-ucws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:31aws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:28aws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:13aws-ucws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:09aws-ucws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:09aws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:02azure-ucws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:01aws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:40azure linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:30azure-ucws linuxTestAccept/bundle/destroy/jobs-and-pipeline/DATABRICKS_BUNDLE_ENGINE=terraform
2:22azure windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:20aws-ucws linuxTestAccept/bundle/resources/volumes/recreate/DATABRICKS_BUNDLE_ENGINE=terraform
2:19aws-ucws windowsTestAccept/bundle/resources/permissions/jobs/delete_one/cloud/DATABRICKS_BUNDLE_ENGINE=terraform
2:17aws-ucws linuxTestAccept/bundle/resources/model_serving_endpoints/basic/DATABRICKS_BUNDLE_ENGINE=direct
2:14azure linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:13azure-ucws windowsTestAccept/bundle/resources/permissions/jobs/delete_one/cloud/DATABRICKS_BUNDLE_ENGINE=terraform
2:10aws-ucws windowsTestAccept/bundle/resources/model_serving_endpoints/basic/DATABRICKS_BUNDLE_ENGINE=terraform
2:09azure-ucws windowsTestAccept/bundle/resources/dashboards/generate_inplace/DATABRICKS_BUNDLE_ENGINE=direct
2:07azure-ucws windowsTestSparkJarTaskDeployAndRunOnWorkspace/Databricks_Runtime_14.3_LTS
2:02azure-ucws linuxTestFilerWorkspaceFilesExtensionsReadDir

RecordRequests = false
Ignore = ["databricks.yml", ".databricks"]

[EnvMatrix]

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

the current TF version does not support this yet.

@shreyas-goenka
shreyas-goenkaforce-pushed the alert-task-workspace-path branch from 3f84960 to 825581aCompareMarch 26, 2026 15:38
@shreyas-goenka
shreyas-goenka marked this pull request as ready for review March 26, 2026 15:40
@simonfaltum
simonfaltum removed their request for review April 13, 2026 09:13
@shreyas-goenka

Copy link
Copy Markdown
ContributorAuthor

Integration test failures are unrelated.

@shreyas-goenka
shreyas-goenka merged commit 30e21b5 into mainApr 28, 2026
25 of 26 checks passed
@shreyas-goenka
shreyas-goenka deleted the alert-task-workspace-path branch April 28, 2026 09:58
shreyas-goenka added a commit that referenced this pull request Apr 28, 2026
## Summary
- Add `Bundles` changelog entry for
[#4836](#4836), which added
relative path translation for `alert_task.workspace_path` in job tasks.
## Test plan
- [x] N/A — changelog-only change.
This pull request was AI-assisted by Isaac.
deco-sdk-taggingBot added a commit that referenced this pull request Apr 29, 2026
## Release v0.299.0
### CLI
* Moved file-based OAuth token cache management from the SDK to the CLI. No user-visible change; part of a three-PR sequence that makes the CLI the sole owner of its token cache ([#5056](#5056)).
* Remove the `--experimental-is-unified-host` flag and stop reading `experimental_is_unified_host` from `.databrickscfg` profiles and the `DATABRICKS_EXPERIMENTAL_IS_UNIFIED_HOST` env var. Unified hosts are now detected exclusively from `/.well-known/databricks-config` discovery. The `experimental_is_unified_host` field is retained as a no-op in `databricks.yml` for schema compatibility ([#5047](#5047)).
* Added interactive pagination for list commands that have a row template (jobs, clusters, apps, pipelines, etc.). When stdin, stdout, and stderr are all TTYs, `databricks <resource> list` now streams 50 rows at a time and prompts `[space] more [enter] all [q|esc] quit`. ENTER can be interrupted by `q`/`esc`/`Ctrl+C` between pages. Colors and alignment match the existing non-paged output; column widths stay stable across pages. Piped output and `--output json` are unchanged ([#5015](#5015)).
* Added experimental OS-native secure token storage opt-in via `DATABRICKS_AUTH_STORAGE=secure`. Legacy file-backed token storage remains the default ([#5008](#5008), [#5013](#5013)).
* Fixed a panic in `databricks warehouses update-default-warehouse-override` when invoked without all required positional arguments (e.g. picking a warehouse from the interactive drop-down and then hitting an index-out-of-range crash). The command now validates arguments up front and returns a usage error. Fixes [#5070](#5070) via [#5079](#5079).
### Bundles
* Translate relative paths in `alert_task.workspace_path` on job tasks to fully qualified workspace paths, matching the behavior of other task path fields. Applies to both regular tasks and `for_each_task` nested tasks ([#4836](#4836)).
### Dependency updates
* Added `github.com/zalando/go-keyring` as a new dependency (dormant until a later release enables experimental secure-storage for OAuth tokens) ([#5008](#5008)).
denik pushed a commit that referenced this pull request May 20, 2026
…sks (#4836)
## Summary
- Add `alert_task.workspace_path` to the job task path rewrite patterns
so relative paths (e.g. `./my_alert.dbalert.json`) are translated to
full workspace paths
- Covers both regular tasks and `for_each_task` nested tasks via
`TranslateModeFile`
## Test plan
- [x] Unit tests for path visitor (`TestVisitJobPaths`,
`TestVisitJobPaths_foreach`)
- [x] Unit test for path translation
(`TestTranslatePathsInSubdirectories`)
- [x] Acceptance test (`acceptance/bundle/resources/jobs/alert-task`) —
deploys a job with `alert_task.workspace_path`, reads it back via `jobs
get`, and asserts the fully qualified workspace path. Runs on both local
(mock server) and cloud, on both terraform and direct engines.
This pull request was AI-assisted by Isaac.
denik pushed a commit that referenced this pull request May 20, 2026
## Summary
- Add `Bundles` changelog entry for
[#4836](#4836), which added
relative path translation for `alert_task.workspace_path` in job tasks.
## Test plan
- [x] N/A — changelog-only change.
This pull request was AI-assisted by Isaac.
denik pushed a commit that referenced this pull request May 20, 2026
## Release v0.299.0
### CLI
* Moved file-based OAuth token cache management from the SDK to the CLI. No user-visible change; part of a three-PR sequence that makes the CLI the sole owner of its token cache ([#5056](#5056)).
* Remove the `--experimental-is-unified-host` flag and stop reading `experimental_is_unified_host` from `.databrickscfg` profiles and the `DATABRICKS_EXPERIMENTAL_IS_UNIFIED_HOST` env var. Unified hosts are now detected exclusively from `/.well-known/databricks-config` discovery. The `experimental_is_unified_host` field is retained as a no-op in `databricks.yml` for schema compatibility ([#5047](#5047)).
* Added interactive pagination for list commands that have a row template (jobs, clusters, apps, pipelines, etc.). When stdin, stdout, and stderr are all TTYs, `databricks <resource> list` now streams 50 rows at a time and prompts `[space] more [enter] all [q|esc] quit`. ENTER can be interrupted by `q`/`esc`/`Ctrl+C` between pages. Colors and alignment match the existing non-paged output; column widths stay stable across pages. Piped output and `--output json` are unchanged ([#5015](#5015)).
* Added experimental OS-native secure token storage opt-in via `DATABRICKS_AUTH_STORAGE=secure`. Legacy file-backed token storage remains the default ([#5008](#5008), [#5013](#5013)).
* Fixed a panic in `databricks warehouses update-default-warehouse-override` when invoked without all required positional arguments (e.g. picking a warehouse from the interactive drop-down and then hitting an index-out-of-range crash). The command now validates arguments up front and returns a usage error. Fixes [#5070](#5070) via [#5079](#5079).
### Bundles
* Translate relative paths in `alert_task.workspace_path` on job tasks to fully qualified workspace paths, matching the behavior of other task path fields. Applies to both regular tasks and `for_each_task` nested tasks ([#4836](#4836)).
### Dependency updates
* Added `github.com/zalando/go-keyring` as a new dependency (dormant until a later release enables experimental secure-storage for OAuth tokens) ([#5008](#5008)).
Sign up for freeto 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.

3 participants

@shreyas-goenka@eng-dev-ecosystem-bot@denik