Forum Discussion
Source Control - Syncing with existing reports in both workspace and ADO. Will it delete reports?
I'm new with PBI Source Control. Can you please help with the issue I'm encountering?
The scenario:
Using source control, we have committed reports from the workspace (2 of 5 reports have been synced) - and it was all working well. But after adding a policy to the main branch in ADO, we are now unable to commit from the workspace (not sure which policy affected it):
The workaround (didn't know if it is correct) :
- Workspace: Source Control > Switch branch > Created a new branch: me_branch
- Committed another report (now 3 of 5 reports have been synced)
- ADO: Created a pull request and deleted me_branch
- Workspace: Since it now says me_branch (Deleted), we switched it back to main branch
- It is now showing that the report is Synced. BUT...
The issue:
Source Control > Updates:
Since we haven't synced the rest of the reports (2 remaining), it is now showing that the Status of those 2 are 'Deleted'. And if we will click the 'Update all' button, it will cease to exist in the workspace(?) - Which we do not want.
Question:
- ADO: Which part of the branch policy affects the commits from the workspace?
- Workspace: Is there another way where we avoid the deletion of the reports that are not yet synced? Or should we connect to a new ADO Repo and sync all of the reports over again?
- What is the best approach / practice for this?
Hi PBI_Chii,
Pulling from a branch that has deleted items will delete things in your workspace. While deployment pipelines do not delete things, git source control does.
Likely you protected the main branch in ADO preventing any commits directly to the main branch.
Generally the best practice is to never commit directly to main anyway, feature branching or trunk branching are common workflows in the software development space. Here's an article outlining them:
https://circleci.com/blog/trunk-vs-feature-based-dev/If you found this helpful, cosnider giving Kudos. If I solved your problem or answered your question, mark this post as a solution.
Hi PBI_Chii,
Thanks for sharing the detailed background and screenshots. Also, thanks to tayloramy, for his inputs on this thread.
The “Deleted” status appears because Power BI is comparing your workspace with what currently exists in the Azure DevOps (ADO) branch. Since only part of your reports were synced earlier, the remaining ones aren’t found in the repo so Power BI flags them as “deleted.” They will not be removed until you select “Update all.”
The branch policy you recently added in ADO is most likely preventing direct commits from Power BI for example, if it now requires a pull request or approval before merging to the main branch.
To avoid losing any un synced reports, I would suggest reconnecting your workspace to a new working branch, committing all reports there, and then merging via a pull request. This ensures everything stays in sync without deleting workspace content.Refer these links:
1. https://learn.microsoft.com/en-us/fabric/cicd/troubleshoot-cicd
2. https://learn.microsoft.com/en-us/rest/api/fabric/core/git/get-status?tabs=HTTP
3. https://learn.microsoft.com/en-us/fabric/cicd/git-integration/git-integration-process?tabs=Azure%2Cazure-devops
Hope that clarifies. Let us know if you have any doubts regarding this. We will be happy to help.Thank you for using the Microsoft Fabric Community Forum.
4 Replies
- tayloramy
Super User
Hi PBI_Chii,
Pulling from a branch that has deleted items will delete things in your workspace. While deployment pipelines do not delete things, git source control does.
Likely you protected the main branch in ADO preventing any commits directly to the main branch.
Generally the best practice is to never commit directly to main anyway, feature branching or trunk branching are common workflows in the software development space. Here's an article outlining them:
https://circleci.com/blog/trunk-vs-feature-based-dev/If you found this helpful, cosnider giving Kudos. If I solved your problem or answered your question, mark this post as a solution.
- v-kpoloju-msft
Community Support
Hi PBI_Chii,
Thanks for sharing the detailed background and screenshots. Also, thanks to tayloramy, for his inputs on this thread.
The “Deleted” status appears because Power BI is comparing your workspace with what currently exists in the Azure DevOps (ADO) branch. Since only part of your reports were synced earlier, the remaining ones aren’t found in the repo so Power BI flags them as “deleted.” They will not be removed until you select “Update all.”
The branch policy you recently added in ADO is most likely preventing direct commits from Power BI for example, if it now requires a pull request or approval before merging to the main branch.
To avoid losing any un synced reports, I would suggest reconnecting your workspace to a new working branch, committing all reports there, and then merging via a pull request. This ensures everything stays in sync without deleting workspace content.Refer these links:
1. https://learn.microsoft.com/en-us/fabric/cicd/troubleshoot-cicd
2. https://learn.microsoft.com/en-us/rest/api/fabric/core/git/get-status?tabs=HTTP
3. https://learn.microsoft.com/en-us/fabric/cicd/git-integration/git-integration-process?tabs=Azure%2Cazure-devops
Hope that clarifies. Let us know if you have any doubts regarding this. We will be happy to help.Thank you for using the Microsoft Fabric Community Forum.
- v-kpoloju-msft
Community Support
Hi PBI_Chii,
Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that’s great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.Thank you.
- v-kpoloju-msft
Community Support
Hi PBI_Chii,
Just wanted to follow up. If the shared guidance worked for you, that’s wonderful hopefully it also helps others looking for similar answers. If there’s anything else you'd like to explore or clarify, don’t hesitate to reach out.Thank you.