Skip to content

Commit

Permalink
Remove checkout branch check when not an official starter (#4389)
Browse files Browse the repository at this point in the history
* Remove branch check when not a starter

Signed-off-by: Ankita Katiyar <[email protected]>

* fix docslink + tests

Signed-off-by: Ankita Katiyar <[email protected]>

* fix docslink + tests

Signed-off-by: Ankita Katiyar <[email protected]>

* no cover

Signed-off-by: Ankita Katiyar <[email protected]>

* Add release notes

Signed-off-by: Ankita Katiyar <[email protected]>

---------

Signed-off-by: Ankita Katiyar <[email protected]>
  • Loading branch information
ankatiyar authored Jan 2, 2025
1 parent f6ecca5 commit ab35173
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

## Bug fixes and other changes
* Added validation to ensure dataset versions consistency across catalog.
* Fixed a bug in project creation when using a custom starter template offline.

## Breaking changes to the API
## Documentation changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ The Databricks API enables you to programmatically interact with Databricks serv

1. [Set up your Kedro project for deployment on Databricks](#set-up-your-project-for-deployment-to-databricks)
2. Create a JSON file containing your job's configuration.
3. Use the Jobs API's [`/create` endpoint](https://docs.databricks.com/workflows/jobs/jobs-api-updates.html#create) to create a new job.
4. Use the Jobs API's [`/runs/submit` endpoint](https://docs.databricks.com/workflows/jobs/jobs-api-updates.html#runs-submit) to run your newly created job.
3. Use the Jobs API's [`/create` endpoint](https://docs.databricks.com/en/reference/jobs-2.0-api.html#create) to create a new job.
4. Use the Jobs API's [`/runs/submit` endpoint](https://docs.databricks.com/en/reference/jobs-2.0-api.html#runs-submit) to run your newly created job.

### How to use the Databricks CLI to automatically deploy a Kedro project

Expand Down
3 changes: 1 addition & 2 deletions kedro/framework/cli/starters.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ def new( # noqa: PLR0913
checkout = _select_checkout_branch_for_cookiecutter(checkout)
elif starter_alias is not None:
template_path = starter_alias
checkout = _select_checkout_branch_for_cookiecutter(checkout)
else:
template_path = str(TEMPLATE_PATH)

Expand Down Expand Up @@ -520,7 +519,7 @@ def _get_available_tags(template_path: str) -> list:
# tags: ['/tags/version', '/tags/version^{}']
# unique_tags: {'version'}

except git.GitCommandError:
except git.GitCommandError: # pragma: no cover
return []
return sorted(unique_tags)

Expand Down
6 changes: 0 additions & 6 deletions tests/framework/cli/test_starters.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,9 +861,6 @@ def test_git_repo(self, fake_kedro_cli, mock_determine_repo_dir, mock_cookiecutt
"template": "git+https://github.com/fake/fake.git",
"directory": None,
}
starters_version = mock_determine_repo_dir.call_args[1].pop("checkout", None)

assert starters_version in [version, "main"]
assert kwargs.items() <= mock_determine_repo_dir.call_args[1].items()
del kwargs["directory"]
assert kwargs.items() <= mock_cookiecutter.call_args[1].items()
Expand Down Expand Up @@ -910,9 +907,6 @@ def test_git_repo_custom_directory(
"template": "git+https://github.com/fake/fake.git",
"directory": "my_directory",
}
starters_version = mock_determine_repo_dir.call_args[1].pop("checkout", None)

assert starters_version in [version, "main"]
assert kwargs.items() <= mock_determine_repo_dir.call_args[1].items()
assert kwargs.items() <= mock_cookiecutter.call_args[1].items()

Expand Down

0 comments on commit ab35173

Please sign in to comment.