Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket syncronization skipping submodules

Ian Dorion June 14, 2024

Greetings.

I have notice the following. When a PR is behind the destination branch, Bitbucket offers the option to sync the featured branch. When used, it brings the featured branch up to date with destination branch.

However, it is not updating the submodules. The only way to get a real sync that include submodules, is to merge the destination branch into the featured branch.


Is this something that was overlooked or not implemented?
Will different merge technique allows for the submodules to be updated as well?

We currently use the squash technique when merging but the synchronisation is not updating the submodules.

Anyone have a solution for this?

2 answers

1 accepted

1 vote
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 18, 2024

Hello @Ian Dorion ,

thank you for reaching out to the Community!

The parent repository and the submodule repository are different repos, and they are not automatically kept in sync. This means that the parent repository will always explicitly point to a specific commit in the submodule.

If you push new commits to the submodule, it will not automatically update the parent repository with the new version. You will need to make a new commit in the parent repository to "update" the pointer to this new commit on the submodule repository.

The sync operation in the UI essentially merges the destination branch of the pull request into the source branch so that the source branch is up to date with the new changes introduced in the destination branch after the source branch was branched off.

If a new commit was pushed to the destination branch updating the pointer of a submodule to a different commit, the Sync operation in a pull request targeting that branch will also contain that update. You can confirm that after clicking on the Sync option and checking the merge commit that was created. It should look similar to the below : 

Screenshot 2024-06-18 at 5.32.58 PM.png

This is the merge commit automatically created by the Sync button. As you can see, it includes the updated pointer to the submodule that was previously pushed in a new commit to the destination branch.

Could you confirm if you are getting a different behavior? If yes, could you share the exact steps you are taking to get to that state? 

Let us know in case you have any questions.

Thank you, @Ian Dorion !

Patrik S

Ian Dorion June 19, 2024

Thank You @Patrik S 

So I guess it's comes down to how the devs manage their PR. The update on the submodules with and old commit must come as a change made on the devs side.











 

0 votes
Nicolas Grossi
Banned
June 14, 2024

@Ian Dorion Ha ve you reached support regarding this question ?

 

Nicolas

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events