Tips for git level shortcut when using coarchi

Started by raimondb, January 14, 2025, 11:39:15 AM

Previous topic - Next topic

raimondb

Hi, I am using to Archi to the model across multiple branches, we are using a branch-per-architect and feature-branch kind of mechanism.

This works OK as long as we each time do the process of:
- 1. Merge latest master to branch (sync with master)
- 2. Merge all branches to master
- 3. If above successful, merge master to all branches again

Above process is done on a weekly basis, and during a maintenance window where no other people will be committing changes.

I want to check on which part of the process, I could safely just use the git merge and bypass archi itself, since the change detection takes quite a lot of time.

Shortcuts I was thinking about
A. Check via git if branches are actually ahead of each other (master->feature or other way around), only sync the ones that are not up to date, (first get the latest version via git fetch)
B. Check if a branch can be fast forwarded, if so use git and not coarchi

So in essence, first determine if there will be merge conflicts via git and only use coarchi if that is the case. Is that a safe approach, or can it also be that will git thinks the merge is not conflicting, coarchi does actually need to resolve some more logical conflicts?

Phil Beauvoir

Hi,

coArchi does some model checks and object resolving so using git on its own is definitely not recommended. I would say that if you do use git on its own there is no guarantee that the model will be valid.

Phil
If you value and use Archi, please consider making a donation.
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Jean-Baptiste Sarrodie

Hi,

Quote from: raimondb on January 14, 2025, 11:39:15 AMIs that a safe approach, or can it also be that will git thinks the merge is not conflicting, coarchi does actually need to resolve some more logical conflicts?

That's not safe for the reason you mention: a merge can be non conflicting but leading to an invalid model.

Quote from: raimondb on January 14, 2025, 11:39:15 AMCheck if a branch can be fast forwarded, if so use git and not coarchi

Fast-forward is safe from git because it doesn't create any new commit.

Quote from: raimondb on January 14, 2025, 11:39:15 AMsince the change detection takes quite a lot of time.

That should not be the case... unless you have an antivirus which is not well configured (Archi user folder, especially the "model-repository" one, should not be scanned).

Quote from: raimondb on January 14, 2025, 11:39:15 AMIf above successful, merge master to all branches again

I would instead let Archi remove the branches just after merging them into master, and create them back from git.

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.