Forum Discussion
Issue when syncing git to workspace
I am syncing git to the workspace, when do so it fails with the following error
The pipeline runs fine in OG workspace, but after i merge the changes into git and then sync the other workspaces it fails with this error, which is unclear to me why, as in the json itself there is no workspace id which is null.
About the pipeline itself, i have a notebook activity, which calls the notebook by 'name' and the workspace_id is linked via system parameters nothing fancy, yet its beyond me why this keeps failing, any idea.
GitErrorDetails {"artifactType":"Pipeline","artifactDisplayName":"pl_fabric_metadata_gen","artifactLogicalId":"eb66152e-50e2-960e-4084-06cd686334a9","rootActivityId":"7add3aa1-c6b4-cd52-b92f-b2ce6fa55691","httpStatus":0,"errorType":null,"errorCode":null,"errorSource":1,"targetCommit":null,"artifacts":null,"errorDetails":{"ErrorCode":"RequestValidationFailed","ErrorMessage":"An internal error happened due to failed runtime assertion: ActivityName fabric_metadata_gen contains an invalid WorkspaceId <null>..","ErrorParameters":null,"ErrorCategory":null,"IsTransient":false,"AdditionalParameters":null,"ErrorSource":1,"UserInteractionRequest":null},"clientErrorParameters":null,"gitProviderErrorResponse":null,"culprit":1}
Thanks burakkaragoz and v-pnaroju-msft
Yea, it seems a bit patchy, anyway i have configured it using API's. I wanted a completed one click solution, so deployed github actions to call api, and configured pipelines with ids being fetched using the fabric rest calls.
8 Replies
- burakkaragozSuper User
Hi rookie111 ,
This error usually pops up when the workspace context isn't properly resolved during Git sync. A few things you might want to check:
System Parameter Binding
Make sure the workspace_id system parameter is actually being resolved at runtime in the target workspace. Sometimes, if the parameter is defined only in the OG workspace, it won’t carry over.Notebook Reference by Name
Referencing notebooks by name is fine, but if the workspace context is missing or null, the pipeline can’t resolve the notebook path correctly.Workspace Metadata in Git
Check if the .workspace metadata file is present and valid in your Git repo. If it's missing or malformed, the sync process might not know which workspace to target.Manual Fix
Try opening the pipeline JSON in Git and explicitly setting the workspace_id if it's missing. This is a bit hacky but can help isolate the issue.
Also, here's a Microsoft doc that might help clarify how Git integration handles workspace context:
Microsoft LearnLet me know if you want to walk through the pipeline JSON together.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
Translation and formatting supported by AI
- v-pnaroju-msftCommunity Support
Thankyou, burakkaragoz, for your response.
Hi rookie111,We appreciate your question on the Microsoft Fabric Community Forum.
From what I understand, the error happens because of a problem with Fabric Git integration. When new workspaces (especially those with Lakehouse or notebook files) are connected, the workspaceId does not get registered properly during sync. The WorkspaceId <null> error usually means the metadata was not fully set up when binding Git.
Please follow these steps to fix the workspace sync and correct the metadata:
- Disconnect Git by going to the workspace, then Workspace settings > Source control > Disconnect.
- Create an empty branch in your Git repo (for example, name it init-fix-workspace).
- Reconnect the Fabric workspace to this new empty branch and do a manual sync (Update from Git). This will rebuild the necessary .workspace and definition.json files with the correct workspace details.
- After the sync is successful, you can switch back to your original working branch if you want.
Also, please check these helpful links:
Git integration admin settings - Microsoft Fabric | Microsoft Learn
Get started with Git integration - Microsoft Fabric | Microsoft Learn
Git integration workspaces - Microsoft Fabric | Microsoft Learn
https://learn.microsoft.com/en-us/fabric/cicd/troubleshoot-cicd#branching-out-my-new-workspace-wasnt-synced-with-my-git-repositoryIf you find this answer useful, please mark it as the accepted solution and give kudos. This will help other community members with the same issue.
If you have more questions, feel free to ask the Microsoft Fabric community.
Thank you.
- rookie111Frequent Visitor
Thanks burakkaragoz and v-pnaroju-msft
Yea, it seems a bit patchy, anyway i have configured it using API's. I wanted a completed one click solution, so deployed github actions to call api, and configured pipelines with ids being fetched using the fabric rest calls.- v-pnaroju-msftCommunity Support
Hi rookie111,
Thank you for your update and for sharing your insights and approach to resolving the issue.
We kindly request you to mark your response as the accepted solution, as this will help other community members locate answers to similar challenges more efficiently.
Please continue to utilize the Fabric Community for any further assistance with your queries.
Thank you.
- KevinChantSuper User
It might be worth considering orchestrating a GitHub workflow using a combination of Fabric CLI and the fabric-cicd Pythin library for a more seamless experience.
Because you can get pipeline details with Fabric CLI:
https://microsoft.github.io/fabric-cli/examples/item_examples.html#getting-and-querying-item-details
- v-pnaroju-msftCommunity Support
Hi rookie111,
Thank you for your update and for sharing your insights and solution to the issue.
We kindly request you to mark your response as the accepted solution. This will help other community members find answers to similar problems more easily.
Please continue to use the Fabric Community for any further help with your questions.
Thank you.
- v-pnaroju-msftCommunity Support
Hi rookie111,
Thank you for your update and for providing your insights and solution to the issue.
We would request you to please mark your response as the accepted solution. Doing so will help other community members locate answers to similar questions with ease.
Kindly continue to use the Fabric Community for any further help regarding your questions.
Thank you.
- v-pnaroju-msftCommunity Support
Hi rookie111,
Thank you for your update and for sharing your solution and thoughts on the issue.
We kindly ask you to mark your reply as the accepted solution. This will help other members in the community find answers to the same questions easily.
Please feel free to keep using the Fabric Community if you need any more help with your questions.
Thank you.