microsoft / semantic-link-labs

Early access to new features for Microsoft Fabric's Semantic Link.
MIT License
129 stars 21 forks source link

update_from_git #172

Open muhssamy opened 2 days ago

muhssamy commented 2 days ago

i am using this code

labs.update_from_git(
    workspace=workspace,
    remote_commit_hash = remote_commit_hash,
    conflict_resolution_policy = 'PreferRemote',
    workspace_head = workspace_head,
    allow_override = False
)

and i am getting this error

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[22], line 1
----> 1 labs.update_from_git(
      2     workspace=workspace,
      3     remote_commit_hash = remote_commit_hash,
      4     conflict_resolution_policy = 'PreferRemote',
      5     workspace_head = workspace_head,
      6     allow_override = False
      7 )

File ~/cluster-env/clonedenv/lib/python3.10/site-packages/sempy_labs/_git.py:344, in update_from_git(remote_commit_hash, conflict_resolution_policy, workspace_head, allow_override, workspace)
    341 workspace, workspace_id = resolve_workspace_name_and_id(workspace)
    343 conflict_resolution_policies = ["PreferWorkspace", "PreferRemote"]
--> 344 if "remote" in conflict_resolution_policies.lower():
    345     conflict_resolution_policies = "PreferRemote"
    346 elif "workspace" in conflict_resolution_policies.lower():

AttributeError: 'list' object has no attribute 'lower'
m-kovalsky commented 2 days ago

This will be resolved in PR #170