DVCS repository is not sync when linking to Gitlab
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Some Gitlab repositories are not synced in DVCS accounts
Environment
9.x
Diagnosis
The new Gitlab repository is not showing up on the DVCS repository page.
The new Gitlab repository can't be added to the DVCS repository page.
DVCS webhook is not created automatically for the new Gitlab repository.
Enable the following debug to the Logging and Profiling page in your Admin settings, and change the level to DEBUG. Enabled DEBUG logging for the mentioned package.
1 2 3 4
com.atlassian.jira.plugins.dvcs com.atlassian.jira.plugins.dvcs.event com.atlassian.jira.plugins.dvcs.service com.atlassian.jira.plugins.dvcs.sync
Notice the following error whereby the organization was not approved:
1
2023-06-05 05:25:07,246-0400 Caesium-1-1 DEBUG ServiceRunner [c.a.j.p.dvcs.service.RepositorySyncServiceImpl] Attempted to trigger repository list sync on organization [48] that has not been approved for some reason.
Run the following SQL query to find out which DVCS accounts were not in the Approved state:
1
select * from "AO_E8B6CC_ORGANIZATION_MAPPING" where "APPROVAL_STATE" = "PENDING_APPROVAL";
Cause
Due to the APPROVAL_STATE is not in the approved state, DVCS accounts keep failing to sync any new repository and old commits or pull requests from the existing repository.
Solution
Remove the DVCS accounts and add back the same DVCS accounts to update the APPROVAL_STATE to APPROVED status.
Please check the AO_E8B6CC_ORGANIZATION_MAPPING table to verify the status.
Was this helpful?