After the pull request is merged to the main branch on Github a sync error is generated on vRA "Version X already exists"
search cancel

After the pull request is merged to the main branch on Github a sync error is generated on vRA "Version X already exists"

book

Article ID: 321668

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Pull request is performed to commit the changes to the main branch.

Symptoms:

After the pull request is merged to the main branch on Github a sync error is generated on vRA "Version X already exists"

image.png

The Cloud Template is not correctly updated in VRA as it gets a message "New draft, version(s) not created"

image.png
 


Environment

VMware vRealize Automation 8.x

Cause

Lets assume two commits 5faedc2 & f0be2fc under the pull request.

5faedc2: commit on the new branch to update the version (eg: v+1)
f0be2fc: commit on the main branch to merge

In these two commits, the "blueprint.yaml" file content are identical, both their versions are modified from v to v+1.
When the user click the Sync button after merging two branches, the cloud template service calls cgs-service to compare commits from which in the database to the latest commit of the repository.

The cloud template service will process 5faedc2 first to update the version of cloud template in vRA, this operation is successful, so the version become v+1.
Then it process f0be2fc, since it tries to update the cloud template with the identical content, it throws an error. 
"Version X already exists"

On the other hand, there is no error when reproducing the issue with ABX type content source. The ABX service ignored the merge commit.

Resolution


To prevent vRA throwing the error message, Instead of creating a merge commit to merge a pull request, use "Rebase" or "Squash".

Workaround:
To prevent vRA throwing the error message, Instead of creating a merge commit to merge a pull request, use "Rebase" or "Squash".

Additional Information

Impact/Risks:
There is no impact to functionality however, The cloud template is not correctly updated in VRA as its gets the message "New draft, version(s) not created"
This is the limitation on Github API, we are not able to drop the merge commit which has the same content as previous commit.