Skip to content

Update _git.py - added param to initialize_git_connection fn #490

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hurtn
Copy link
Contributor

@hurtn hurtn commented Feb 18, 2025

Added initializationStrategy strategy parameter. Used when content exists in the workspace prior to calling initialize connection

Added initializationStrategy strategy parameter. Used when content exists in the workspace prior to calling initialize connection
Copy link
Collaborator

@m-kovalsky m-kovalsky left a comment

Choose a reason for hiding this comment

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

Thanks Nick!

@@ -276,6 +276,11 @@ def initialize_git_connection(workspace: Optional[str | UUID] = None) -> str:
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
initialization_strategy : str
Copy link
Collaborator

Choose a reason for hiding this comment

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

initialization_strategy : str, default='None'

@@ -285,8 +290,14 @@ def initialize_git_connection(workspace: Optional[str | UUID] = None) -> str:

(workspace_name, workspace_id) = resolve_workspace_name_and_id(workspace)

Copy link
Collaborator

Choose a reason for hiding this comment

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

add a check that the initialization_strategy is one of the 3 valid options. raise ValueError if it's not in those 3 options. This is just to make better error messages.

Copy link

Choose a reason for hiding this comment

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

Just a helpful note for @hurtn: You can look at how conflict_resolution_policy is validated in the update_from_git function within the same file. If you want to do it consistent in the same style and so on.

Sign up for free to 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