Skip to content

Commit 8fc2277

Browse files
🚑️ Allow provisioning of sourceproperty for spark_python_task (#793)
* allow flexibility for spark python task * provide bugfix * reflect to changelog * fix linter issues
1 parent 941743b commit 8fc2277

4 files changed

Lines changed: 46 additions & 26 deletions

File tree

CHANGELOG.md

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,25 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
**NOTE:** For CLI interfaces, we support SemVer approach. However, for API components we don't use SemVer as of now. This may lead to instability when using dbx API methods directly.
8+
**NOTE:** For CLI interfaces, we support SemVer approach. However, for API components we don't use SemVer as of now.
9+
This may lead to instability when using dbx API methods directly.
910

1011
[Please read through the Keep a Changelog (~5min)](https://keepachangelog.com/en/1.0.0/).
1112

1213
## [UNRELEASED] - YYYY-MM-DD
1314

15+
## [0.8.15] - 2023-06-02
16+
1417
### Fixed
1518

16-
- Added documentation for JOBS_API version usage to ensure ACLs are working as expected
19+
- Allow provisioning of `source` property for `spark_python_task`
1720

1821
## [0.8.14] - 2023-05-11
1922

23+
### Fixed
24+
25+
- Added documentation for JOBS_API version usage to ensure ACLs are working as expected
26+
2027
### Added
2128

2229
- Add `service_principal_name` support for ACLs
@@ -42,12 +49,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4249

4350
### Fixed
4451

45-
- Recursively upload required files when a directory is passed as a task parameter with `dbx execute` and `--upload-via-context`.
52+
- Recursively upload required files when a directory is passed as a task parameter with `dbx execute`
53+
and `--upload-via-context`.
4654

4755
## [0.8.10] - 2023-03-21
4856

49-
5057
### Added
58+
5159
- ✨ support for files bigger than 1MB in sync
5260

5361
## [0.8.9] - 2023-03-06
@@ -67,7 +75,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6775
# Fixed
6876

6977
- 👔 Docs: deleted lgtm badges from readme
70-
- 👔 Docs: added footer navigation, deleted the version layover
78+
- 👔 Docs: added footer navigation, deleted the version layover
7179
- 🩹 Reload config after build in case if there are any dynamic components dependent on it
7280
- 🩹 Check if target repo exists before syncing and produce more clear error message if it does not.
7381
- 🩹 Type recognition of `named_parameters` in `python_wheel_task`
@@ -88,30 +96,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8896

8997
- 🩹 Build logic in case when `no_build` is specified
9098

91-
9299
## [0.8.6] - 2022-11-09
93100

94101
### Changed
95102

96103
- ♻️ Allow `init_scripts` in DLT pipelines
97104
- 🔇 Hide the rst version overlay from read the docs
98105

99-
100106
## [0.8.5] - 2022-11-09
101107

102108
### Changed
103109

104110
- ⬆️ Bump typer to 0.7.0
105111
- 👔 improve docs and add landing page
106112

107-
108113
## [0.8.4] - 2022-11-07
109114

110115
### Fixed
111116

112117
- 🩹 Argument parsing logic in `dbx execute` without any arguments
113118

114-
115119
## [0.8.3] - 2022-11-06
116120

117121
### Fixed
@@ -132,15 +136,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
132136

133137
- 🩹 Deletion logic in the workflow eraser
134138

135-
136139
## [0.8.1] - 2022-11-02
137140

138141
### Changed
139142

140143
- 📖 Reference documentation for deployment file
141144
- ♻️ Add extensive caching for job listing
142145

143-
144146
## [0.8.0] - 2022-11-02
145147

146148
### Changed
@@ -167,7 +169,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
167169
- 🐛 Message with rich markup [] is properly displayed now
168170
- 📖 Broken link in the generated README.md in Python template
169171

170-
171172
## [0.7.6] - 2022-10-05
172173

173174
### Changed
@@ -257,14 +258,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
257258
- ✨Add flexible parameter overriding logic for `dbx execute` via new `--parameters` option
258259
- ✨Add flexible parameter overriding logic for `dbx launch` via new `--parameters` option (RunNow API)
259260
- ✨Add flexible parameter overriding logic for `dbx launch` via new `--parameters` option (RunSubmit API)
260-
- ✨Add inplace Jinja support for YAML and JSON files, can be configured via `dbx configure --enable-inplace-jinja-support`
261+
- ✨Add inplace Jinja support for YAML and JSON files, can be configured
262+
via `dbx configure --enable-inplace-jinja-support`
261263
- ✨Add build logic options for `pip`, `poetry` and `flit`
262264
- ✨Add build logic customization with `build.commands` section
263265
- ✨Add support for custom Python functions in Jinja templates
264266

265267
### Changed
266268

267-
- ✨Arguments `--allow-delete-unmatched`/`--disallow-delete-unmatched` were **replaced** with `--unmatched-behaviour` option.
269+
- ✨Arguments `--allow-delete-unmatched`/`--disallow-delete-unmatched` were **replaced** with `--unmatched-behaviour`
270+
option.
268271
- 🏷️Deprecate `jobs` section and rename it to `workflows`
269272
- 🏷️Deprecate `job` and `jobs` options and rename it to `workflow` argument
270273
- ✨Refactored all cluster-relevant methods into a separate `ClusterController`
@@ -274,7 +277,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
274277
- 🚩Deprecate `--files-only` and `--as-run-submit` options
275278
- 🚩Deprecate `--files-only` and `--as-run-submit` options
276279
- 🚩Delete the Azure Data Factory-related functionality.
277-
Unfortunately we're unable to make this integration stable and secure due to resource lack and lack of RunNow API.
280+
Unfortunately we're unable to make this integration stable and secure due to resource lack and lack of RunNow API.
278281
- 💎Documentation framework changed from `sphinx` to `mkdocs`
279282
- 💎Documentation has been heavily re-worked and improved
280283

@@ -317,8 +320,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
317320

318321
### Added
319322

320-
- Additional `sync` command options (`--no-use-gitignore`, `--force-include`, etc.) for more control over what is synced.
321-
- Additional `init` command option `--template` was added to allow using dbx templates distributed as part of python packages.
323+
- Additional `sync` command options (`--no-use-gitignore`, `--force-include`, etc.) for more control over what is
324+
synced.
325+
- Additional `init` command option `--template` was added to allow using dbx templates distributed as part of python
326+
packages.
322327
- Refactored the `--deployment-file` option for better modularity of the code
323328
- Add upload via context for `dbx execute`
324329

@@ -394,7 +399,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
394399

395400
- Added dev container config for VSCode and GitHub CodeSpaces
396401
- tests are now parallel (x2 less time spent per each CI pipeline launch)
397-
- url-strip behaviour for old-format workspace host names (which was unsupported in Mlflow API and caused a lot of hardly explainable errors)
402+
- url-strip behaviour for old-format workspace host names (which was unsupported in Mlflow API and caused a lot of
403+
hardly explainable errors)
398404

399405
### Changed
400406

@@ -552,18 +558,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
552558
- Fix issue which didn't update local package during remote execution.
553559

554560
## [0.1.5] - 2021-08-12
561+
555562
### Added
556563

557564
- Support for [yaml-based deployment files](https://github.com/databrickslabs/dbx/issues/39).
565+
558566
### Changed
559567

560568
- Now dbx finds the git branch name from any subdirectory in the repository.
561569
- Minor alterations in the documentation.
562570
- Altered the Changelog based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
563571
- Changed(for contributors): Makefile now requires pyenv.
564572
- Changed(for contributors): Makefile is more self describing and self-sufficient.
565-
- `make clean install` will set you up with all that is needed.
566-
- `make help` to see all available commands.
573+
- `make clean install` will set you up with all that is needed.
574+
- `make help` to see all available commands.
567575

568576
## [0.1.4]
569577

@@ -573,6 +581,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
573581
- Fix issue with multi-version package upload
574582

575583
## [0.1.3]
584+
576585
### Added
577586

578587
- Add explicit exception for artifact location change
@@ -595,12 +604,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
595604
### Added
596605

597606
- Integration with Azure Data Factory.
607+
598608
### Fixed
599609

600610
- Some small internal behaviour fixes.
611+
601612
### Changed
602613

603-
- Changed the behaviour of `dbx deploy --write-specs-to-file`, to make the structure of specs file compatible with environment structure.
614+
- Changed the behaviour of `dbx deploy --write-specs-to-file`, to make the structure of specs file compatible with
615+
environment structure.
604616

605617
## [0.0.14]
606618

@@ -609,16 +621,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
609621
- Added integrated permission management, please refer to documentation for details.
610622

611623
## [0.0.13]
624+
612625
### Added
613626

614627
- Added `--write-specs-to-file` option for `dbx deploy` command.
615628

616629
## [0.0.12]
630+
617631
### Fixed
618632

619633
- HotFix for execute command.
620634

621635
## [0.0.11]
636+
622637
### Changed
623638

624639
- Made Internal refactorings after code coverage analysis.

dbx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.8.14"
1+
__version__ = "0.8.15"

dbx/models/workflow/common/task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pathlib import Path
33
from typing import Optional
44

5-
from pydantic import validator, root_validator, BaseModel
5+
from pydantic import validator, root_validator
66

77
from dbx.constants import TASKS_SUPPORTED_IN_EXECUTE
88
from dbx.models.cli.execute import ExecuteParametersPayload
@@ -33,7 +33,7 @@ def _deprecated_msg(cls, value): # noqa
3333
return value
3434

3535

36-
class SparkPythonTask(BaseModel):
36+
class SparkPythonTask(FlexibleModel):
3737
python_file: str
3838
parameters: Optional[StringArray] = []
3939

dbx/models/workflow/v2dot1/task.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,21 @@ class SqlTaskAlert(FlexibleModel):
4545
alert_id: str
4646

4747

48+
class SqlFile(FlexibleModel):
49+
file: str
50+
51+
4852
class SqlTask(FlexibleModel):
4953
warehouse_id: str
5054
query: Optional[SqlTaskQuery]
5155
dashboard: Optional[SqlTaskDashboard]
5256
alert: Optional[SqlTaskAlert]
57+
file: Optional[SqlFile]
5358

5459
@root_validator(pre=True)
5560
def _validate(cls, values): # noqa
56-
at_least_one_of(["query", "dashboard", "alert"], values)
57-
mutually_exclusive(["query", "dashboard", "alert"], values)
61+
at_least_one_of(["query", "dashboard", "alert", "file"], values)
62+
mutually_exclusive(["query", "dashboard", "alert", "file"], values)
5863
return values
5964

6065

0 commit comments

Comments
 (0)