Author Topic: Evaluating a manual version control scheme  (Read 5981 times)

admilden

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Evaluating a manual version control scheme
« on: December 04, 2020, 08:45:58 am »
I am currently evaluating using version control, specifically Perforce, to control changes to EA projects. I have been using LemonTree for diff and merge functionality. The question I'm trying to answer is: can an EA project be broken up into smaller modules that will maintain links between elements? I don't want to store everything in the design as a single eapx file

I have tried using Controlled Packages to export separate packages and sub packages to XMI files, which I can then version control and import into a local copy of the design project file to get any changes. The issue is that I cannot check out and change a single sub-package, as all of the XMI files up to the project root need to be updated as well. It also makes LemonTree comparisons more difficult. Is there a way to do create similar split-up files that contain references to other files so that entire hierarchies don't need to be exported for every change?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Evaluating a manual version control scheme
« Reply #1 on: December 04, 2020, 09:19:29 am »
Who ever thinks a UML model could be version controlled is dreaming. A model is nothing you version. It's in a continuous state of change to reflect a possible picture of the future. Any rollback only makes sense for backup reasons (accidential deletion or so) and that can be accomplished in simple ways (also with any VC).

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Evaluating a manual version control scheme
« Reply #2 on: December 04, 2020, 09:19:49 am »
Hi,

I have been using EA for over 10 years and have NEVER used version control!  It is my contention that a model Repository is NOT a suitable "Universe of Discourse" for version control.  Instead, we use snapshot backups to help recover from failures and other issues.

That's NOT to say we don't use controlled packages.  We use them to transfer metadata between related repositories, but we DON'T use them for version control.

That said, I'm talking about enterprise-wide repositories (with many users), it sounds like that's not your use case.  However, you've already noted some of the reasons why a model repository isn't coding and doesn't behave like code and so can't really be version controlled like code.

Sorry if that puts a damper on your plan.
Paolo

[Edit:  I see qwerty beat me by 20secs on the first publish]
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Evaluating a manual version control scheme
« Reply #3 on: December 04, 2020, 09:34:11 am »
Two hearts, one soul xD

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Evaluating a manual version control scheme
« Reply #4 on: December 04, 2020, 06:34:02 pm »
Can an EA repository be split up and still maintain references? Yes
Will this be easy and lead to a useful result? Maybe

What you can do is add your model to version control. If we put a part of the model in version control, we control each and every package.

Then if you want to isolate a part of your model, say "PackageA", you'll can load that into a separate repository.
Then you have to figure out all of the direct dependencies from PackageA, and make sure you load those as well.

Now you have a repository for editing PackageA, without the risk of loosing relations to elements outside of package A
The trick is to make sure you only ever check out PackageA in this repository, since that is the only one guaranteed to be complete.
If you would checkout any of the dependencies outside of packageA you risk loosing relations.

I have some clients where a variation of this scheme is used, but you have to be very careful to not mess it up.

You might want to look into RAS as wel. I've never used it myself, but apparently that tool has a way to automatically detect dependencies.

If Uffe reads this post he'll surely be able to add some more insights about RAS

Geert

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1145
  • Karma: +30/-8
    • View Profile
Re: Evaluating a manual version control scheme
« Reply #5 on: December 05, 2020, 02:44:39 am »
I think it is important to distinguish between version control, (change) auditing, reusable assets - such as patterns - and documentary baselines.

As both qwerty and Paolo have explain, models and, in particular, enterprise models are not best suited for version control. At best, version control gives you a fall-back position in case something happens to the repository.

Auditing changes, something Sparx is also capable of doing, is not the same as version control. With auditing enable, it should be possible to track every single change in the model. Unfortunately, there are some deficiencies with Sparx auditing capabilities that should really be addressed by Sparx Systems; the most serious of them is that Sparx does not/did not audit relationship changes.

Needless to say that reusable assets should go through a governance process and only approved assets should be published to the registry. RAS is an efficient way to reuse and version control them, but I wish it was easier to configure. The pre-requisites to create a cloud store.

Documentary baselines could be treated as reusable assets but they could also be stored in the document library.

In short, it depends on what you are trying to do: audit changes, re-use patterns or have a document library.

P.S.: I would not recommend any of the above to track how an enterprise architecture evolves over time.


admilden

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Evaluating a manual version control scheme
« Reply #6 on: December 05, 2020, 09:09:39 am »
Hi,

I have been using EA for over 10 years and have NEVER used version control!  It is my contention that a model Repository is NOT a suitable "Universe of Discourse" for version control.  Instead, we use snapshot backups to help recover from failures and other issues.

That's NOT to say we don't use controlled packages.  We use them to transfer metadata between related repositories, but we DON'T use them for version control.

That said, I'm talking about enterprise-wide repositories (with many users), it sounds like that's not your use case.  However, you've already noted some of the reasons why a model repository isn't coding and doesn't behave like code and so can't really be version controlled like code.

Sorry if that puts a damper on your plan.
Paolo

[Edit:  I see qwerty beat me by 20secs on the first publish]

One of the other requirements that I need to meet is that there needs to be branching and merging of the design. I'll admit I'm not very familiar with database management. Is is practical to do this sort of management, perhaps using the snapshot backups?

Just to clarify, do you mean that you use Controlled Packages so that parts of a design can be reused?

And you are correct, the intention is that the designs have a similar workflow process to existing code, but maybe that isn't practical. Ultimately I just want to figure out what will work for us, and plans are certainly changeable!

admilden

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Evaluating a manual version control scheme
« Reply #7 on: December 05, 2020, 09:18:18 am »
Can an EA repository be split up and still maintain references? Yes
Will this be easy and lead to a useful result? Maybe

What you can do is add your model to version control. If we put a part of the model in version control, we control each and every package.

Then if you want to isolate a part of your model, say "PackageA", you'll can load that into a separate repository.
Then you have to figure out all of the direct dependencies from PackageA, and make sure you load those as well.

Now you have a repository for editing PackageA, without the risk of loosing relations to elements outside of package A
The trick is to make sure you only ever check out PackageA in this repository, since that is the only one guaranteed to be complete.
If you would checkout any of the dependencies outside of packageA you risk loosing relations.

I have some clients where a variation of this scheme is used, but you have to be very careful to not mess it up.

You might want to look into RAS as wel. I've never used it myself, but apparently that tool has a way to automatically detect dependencies.

If Uffe reads this post he'll surely be able to add some more insights about RAS

Geert

I tried out using the VC integration after I read your comment. I must say that it does seem quite streamlined. The unfortunate issue I have is that I am working with an existing (and well established) version control system using Perforce, which has deprecated support for its EA plugin. Do you know if there is any way to use a similar system in EA that does not require linking to an existing VCS? That way I could use the EAB files and branch XMI structure with my existing VCS.

I'll have to check out RAS as well, that is still a blind spot for me.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Evaluating a manual version control scheme
« Reply #8 on: December 05, 2020, 09:30:52 am »
Yes, you can control your packages without linking to a VCS.
You'll have to remember to export them on a regular basis though (there's an option to export all of them at once) and then upload the files to your VCS

I do something similar for some parts of my model stored at github.

Geert

admilden

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Evaluating a manual version control scheme
« Reply #9 on: December 05, 2020, 09:32:47 am »
I think it is important to distinguish between version control, (change) auditing, reusable assets - such as patterns - and documentary baselines.

As both qwerty and Paolo have explain, models and, in particular, enterprise models are not best suited for version control. At best, version control gives you a fall-back position in case something happens to the repository.

Auditing changes, something Sparx is also capable of doing, is not the same as version control. With auditing enable, it should be possible to track every single change in the model. Unfortunately, there are some deficiencies with Sparx auditing capabilities that should really be addressed by Sparx Systems; the most serious of them is that Sparx does not/did not audit relationship changes.

Needless to say that reusable assets should go through a governance process and only approved assets should be published to the registry. RAS is an efficient way to reuse and version control them, but I wish it was easier to configure. The pre-requisites to create a cloud store.

Documentary baselines could be treated as reusable assets but they could also be stored in the document library.

In short, it depends on what you are trying to do: audit changes, re-use patterns or have a document library.

P.S.: I would not recommend any of the above to track how an enterprise architecture evolves over time.

This comment definitely gives me a lot to think about, I certainly appreciate the questioning of the fundamentals behind the question. I would probably say that what we want to get out of this is:

  • Auditing, definitely. In that we want the ability to see the history of changes, and revert them if necessary. I understand that this is less practical with the complex structures of some models
  • The ability to take a design at a point in time a branch off from it. Then the branched version may or may not make its way back to the original design
  • Not just re-using assets, but being able to link them to their attributes, even if those attributes change. It sounds like I may need to check out RAS, which I don't know too much about yet for this one.

I also have to ask, what exactly do you mean by "tracking enterprise architecture evolution over time"? And what would you recommend for tracking that evolution?

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Evaluating a manual version control scheme
« Reply #10 on: December 06, 2020, 11:31:10 pm »
Hello all,


As Geert mentioned earlier, I favour the reusable asset service for this type of scenario. However, nothing in this world is free or even cheap, and you do need to carefully consider your requirements and your options.

Paolo and Qwerty have both expressed the opinion that version control just isn't appropriate for models. With this I disagree in principle.
It's not that you can't do version control for models, it's more that any version control system out there (Git, Subversion, etc etc) is designed to manage versions of source code -- ie text files, individually and as collections. This doesn't work well with EA's XMI structure because one project does not equal one XMI file, and the XMI files from one project are interdependent to a degree that source code files are not.

In the case of source code, the files are presented to a person through an editor (eg Visual Studio). While there may be dependencies between files that need to be resolved in order for the code to compile, crucially, the editor can show each file as is: the text is the relevant data, and the editor does not need to interpret it in order to show it.
By contrast, EA in its role as model editor is not able to show the source data as it is. The model data has to be interpreted in order for EA to draw the contents of each diagram. And an XMI file may well be incomplete in the sense that it may contain diagrams whose included elements are not defined in that same XMI file.

Any tool that supports multiple version-controlled files (again, Visual Studio is a good example) also has a concept of a collection of such files (in Visual Studio, this is realized by projects and solutions). This provides a scope for dependency management, and not only that, the collection itself can be version-controlled, meaning you can manage whole collections of source code in terms of releasing, branching, merging, etc.
EA's corresponding concept is the project, but crucially, an EA project is not a collection of files. It is instead a database. What you version-control with EA is only the model content, but there are masses of critical information that is not included in the model content but only stored as configuration data in the database (and indeed, some of it in the registry and some of it in the file system). This means you can't manage the collection of XMI files as a self-contained whole.

Both these issues, the interpretation by the editor and the absence of critical information in the XMI data, make a version control scheme based on multiple XMI files per EA project fundamentally unsound. Any setup based on this will require a high degree of manual synchronization between participants -- basically, going back to source code version control c:a 1980.


Modesto adds some good insights, but I do have to take issue with one point.

I think it is important to distinguish between version control, (change) auditing, reusable assets - such as patterns - and documentary baselines.

As both qwerty and Paolo have explain, models and, in particular, enterprise models are not best suited for version control. At best, version control gives you a fall-back position in case something happens to the repository.

In addition to distinguishing between version control, auditing and baselines, it is also vital to distinguish backups. If you are using version control with the aim to have that serve as your backup strategy, you will lose your data. Backing up data is a completely separate proposition to tracking changes in it. Do not confuse these. Do not think that setting up a version control system means you've solved your backup problem. It doesn't. You will lose your data.


So that's by way of a preamble. :)

Moving on to
I would probably say that what we want to get out of this is:
  • Auditing, definitely. In that we want the ability to see the history of changes, and revert them if necessary. I understand that this is less practical with the complex structures of some models
  • The ability to take a design at a point in time a branch off from it. Then the branched version may or may not make its way back to the original design
  • Not just re-using assets, but being able to link them to their attributes, even if those attributes change. It sounds like I may need to check out RAS, which I don't know too much about yet for this one.

First off, "assets" in RAS can mean a few different things, but the core functionality is for packages. And yes, it is based on XMI export. But there is (some level of) dependency management.

Secondly, auditing and change tracking are not the same thing. Modesto was talking about EA's model audit feature. He also mentioned that it doesn't work very well, and I certainly agree with that.
One of the things auditing should do is tell you who made what change when. EA's auditing functionality does that, but none of its other features in this space (version control, baselines, RAS) do. If that is a requirement, auditing is the only way to go. And I would urge you not to go down this path: it's a performance nightmare and doesn't work well enough.

If you want to compare versions and revert them, you need baselines or RAS. In earlier versions of EA, baselines were stored in the project, but more recent versions have introduced the option of storing them in RAS. I would recommend this over in-project storage.

RAS also provides a rudimentary form of dependency management, so that when importing a package from RAS, EA will offer to also import its dependents. Note, however, that this does not mean you can forget about having a good structure. Indeed, RAS will only work well if your RAS package dependencies form a tree (well, rather a directed acyclic graph).

RAS also allows you to control write access separately from read access, so that you can allow only certain users to update packages in RAS, while a larger number of users can retrieve them.

However, RAS does not give you any meaningful version control. RAS is baselines++, and baselines are just stored snapshots. The concept of branching is not recognized by either baselines or RAS. This is related to what I described earlier, that EA has no concept of a collection of models that itself can be version-controlled. I think you could implement some kind of branch type functionality possibly using multiple RAS storages, but it's a lot of effort for questionable returns.

So for anything approaching what you've been getting out of the box with any source code version control system since the eighties, you will need to do a lot of thinking and planning of your own. Or get a consultant in. :D

Quote
I also have to ask, what exactly do you mean by "tracking enterprise architecture evolution over time"? And what would you recommend for tracking that evolution?

This is a question for Modesto, but I would say that the comparison tools provided by EA (which can be used in conjunction with baselines or RAS) can't do this for you because they track things like elements changing positions in diagrams, attributes added/deleted, etc -- it's at a very fine level of detail which tells you nothing about the grand sweep of changes to your design. There's just no way of doing that using EA's version-control-space functionality. I'm not saying you can't document architectural changes in a model, but I am saying that EA's version comparison facilities don't help.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1145
  • Karma: +30/-8
    • View Profile
Re: Evaluating a manual version control scheme
« Reply #11 on: December 08, 2020, 01:41:25 am »
Modesto adds some good insights, but I do have to take issue with one point.

I think it is important to distinguish between version control, (change) auditing, reusable assets - such as patterns - and documentary baselines.

As both qwerty and Paolo have explain, models and, in particular, enterprise models are not best suited for version control. At best, version control gives you a fall-back position in case something happens to the repository.

In addition to distinguishing between version control, auditing and baselines, it is also vital to distinguish backups. If you are using version control with the aim to have that serve as your backup strategy, you will lose your data. Backing up data is a completely separate proposition to tracking changes in it. Do not confuse these. Do not think that setting up a version control system means you've solved your backup problem. It doesn't. You will lose your data.
Indeed, I fully agree. Version control should not be used as a backup strategy. Regular backups are the only way to ensure data is not lost. Furthermore reversing specific changes, either intentional or accidental, should not be done by restoring backups; this is where auditing, baselines, and version control play a role.

I also have to ask, what exactly do you mean by "tracking enterprise architecture evolution over time"? And what would you recommend for tracking that evolution?
Any enterprise architecture evolves over time, it is subject to change. Most enterprise architectures have a stable part and a something that is undergoing change or transformation. Tracking how a stable part is going to change or has changed overtime is something that is best done explicitly - i.e., by designing a suitable repository structure - and not by using version control, auditing or baselines to track and audit this types of changes.

Version control, auditing or baselines are best suited to track changes of areas of the repository that are undergoing elaboration. In some cases, this may include charting an area of the stable architecture. If an area of the stable architecture needs to be charted before it is changed, it is best to do the former first, then baseline the model, and lastly design the changes in a separate area of the repository.

ducatiross

  • EA User
  • **
  • Posts: 114
  • Karma: +1/-0
    • View Profile
Re: Evaluating a manual version control scheme
« Reply #12 on: December 08, 2020, 02:08:05 am »
Glad I stumbled across this topic as I am grappling with how to version control my SQL Server-based EA model, and pretty much came to the same conclusions :
- It's largely futile to think that an EA model can be successfully version controlled
- EA Audit function provides a basic albeit granular view of what was changed by whom, but it doesn't say 'why' and it doesn't allow changes to be undone or grouped together
- Baselines are only useful as snapshots at a point in time, but can be used to review against the current model and do or undo certain elements that have changed

Thanks for saving me more time flogging a dead horse !

Matthew

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Evaluating a manual version control scheme
« Reply #13 on: December 08, 2020, 06:02:44 am »
When it comes to fixing "accidents" I tend to use our backups.
We make weekly .eap project transfers.

So if someone did an "oopsie" we take the backup from before the accident, export a (temp) package with the smallest possible part to fix the problem
Then import that xmi from the backup, and restore it to it's original location.

When a package is version controlled, we also sometimes use "undo checkout" to go back the the latest "good" version.
Only in very specific circumstances have I ever done a rollback to a previous version using version control.

Geert