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

Try setting queue enabled for Python notebook jobs #856

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
### Fixes

- Replace array indexing with 'get' in split_part so as not to raise exception when indexing beyond bounds ([839](https://github.com/databricks/dbt-databricks/pull/839))
- Set queue enabled for Python notebook jobs ([856](https://github.com/databricks/dbt-databricks/pull/856))

### Under the Hood

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ def compile(self, path: str) -> PythonJobDetails:
if access_control_list:
job_spec["access_control_list"] = access_control_list

job_spec["queue"] = {"enabled": True}
return PythonJobDetails(self.run_name, job_spec, additional_job_config)


Expand Down
2 changes: 2 additions & 0 deletions tests/unit/python/test_python_job_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def test_compile__empty_configs(self, client, permission_builder, parsed_model,
"notebook_path": "path",
},
"libraries": [],
"queue": {"enabled": True},
}
assert details.additional_job_config == {}

Expand All @@ -182,5 +183,6 @@ def test_compile__nonempty_configs(self, client, permission_builder, parsed_mode
"cluster_id": "id",
"libraries": [{"pypi": {"package": "foo"}}],
"access_control_list": [{"user_name": "user", "permission_level": "IS_OWNER"}],
"queue": {"enabled": True},
}
assert details.additional_job_config == {"foo": "bar"}
Loading