Question

Will there be Git integration with FME Workbench?

  • 29 April 2024
  • 7 replies
  • 87 views

Badge +13
  • Supporter
  • 61 replies

Hello everyone,
 

I have colleagues who were wondering whether there would be git integration available with fme workbench.
I understand now at the moment there is no integration directly in fme workbench with git. However it's possible to manually check in .fmw scripts in git I heard, but I think it would be an useful functionality if you dan do that directly from fme workbench. I was wondering whether something like that would be available in the future.


7 replies

Userlevel 3
Badge +19

If you have the FME FLOW product there is GitHub integration from >2023.1 version where you can specify the repository to sync and fetch/push updates.

I’m a little sceptical how only from workbench such synchronisation with a git repo can be achieved. It requires the FME REST api available via the flow 

Userlevel 5
Badge +29

It is something they teased at the most recent conference in Germany. Safe appears to be working towards a solution, but it is still early days

Userlevel 5
Badge +28

You can definitely, with FME 2023+, use the comapre tool to help with merge conflicts. I use SourceTree and have set FME Workbench up as a custom diff tool. I can compare in FME the various changes per commit.

I've yet to really use it for conflict resolution as most of our development is still on FME pre 2023 so can't save workspaces in FME 2023 yet. I can't wait until we're in a position to use that. 

 

There is a tutorial floating around on how to get rhe integration working. 

 

It's still not at the point where you can see your git tree etc in FME itself, however, I think what is there already is still a game changer if you're working in teams. 

 

My biggest complaint is that the compare tool doesn't work yet with fmx files (Custom Transformers) only the .fmw file. Many of out tools are Custom Transformers and there's no real was to diff against these at the moment. 

Badge +13

You can definitely, with FME 2023+, use the comapre tool to help with merge conflicts. I use SourceTree and have set FME Workbench up as a custom diff tool. I can compare in FME the various changes per commit.

I've yet to really use it for conflict resolution as most of our development is still on FME pre 2023 so can't save workspaces in FME 2023 yet. I can't wait until we're in a position to use that. 

 

There is a tutorial floating around on how to get rhe integration working. 

 

It's still not at the point where you can see your git tree etc in FME itself, however, I think what is there already is still a game changer if you're working in teams. 

 

My biggest complaint is that the compare tool doesn't work yet with fmx files (Custom Transformers) only the .fmw file. Many of out tools are Custom Transformers and there's no real was to diff against these at the moment. 

 

I am looking forward to the tutorial on how to get the integration working. Even while I read the following link: I wouldn't be able to get easily the integration working. It's a bit cryptic to me.

I have not much experience with git, but I heard that the benefit of using git is the branching capabilities. You can have difference branches emerge from a master branch and decide later on which branches can be merged with the master branch. At the moment that is not yet possible in fme, so it's more about looking what the differences are between scripts I assume? So I assume you meant with already a game changer is that several people are working on a different version and then based on the two versions/scripts you can then see what the differences are made by each member of a team?

Userlevel 5
Badge +28

This is a screen shot from Sourcetree which I use to help me do my git stuff. There are a few options out there and a lot of people like to just go with the command line version but that’s a bit out of scope for me. I’m very much a git noob but I wanted to just share how great it is.

So here I have created a project, and I’ve created several branches each where a different change has happened.
The “master” branch (blue) is the main branch in this example and the branch and in where the “initial workspace” commit was made. Following this a new branch called “fix-random-test-fix” was created (in green) from the master branch and in that branch a change was made to the workspace to fix a test. 
In parallel to that fix a new branch was created also off the master called “feature-BoundingBoxRepleacer” (pink) to add some new functionality. Crucially though this branch does not contain the fix.
And to make things works an extra change has been made to the master branch “add note to workspace”. This change doesn’t have either the fix or the new feature.

What we want now is the new feature and the fix and the change about the note to be all together in the master branch. 

but because we have now 3 slightly different versions of the workspace we need to figure out what to to. In git this kind of action is called merge conflict resolution.

With text based code it’s pretty easy because git is designed to check changes in a file and you can pick and choose which lines of code you want to keep or throw away. Not so much for a workspace. 

In soucetree there is an option to resolve conflicts with an external tool - enter FME Compare tool.

 


Here we can see t​wo versions of the workspace “Ours” on the left and “Theirs” on the right. The “Ours” version is the master branch where we can see the Workspace Notes. The right is the fix- branch where a test has been changed.

I can look through the list of changes and pick and choose what features I want to merge into the master version. I the above case I would select the tester and then click the “Copy to Left” button. FME will copy this change to the master brach and update the compare view (below).

 

Now there are no more changes. I can now Save and click “Resolve” to officially merge the fix into the master branch.

I can do the same for the new feature as well.

Here you can see that now I’ve been able to merge both the fix and the new feature into the master branch. The compare tool is really nice because it means that you can pick and choose what you want to merge. 

​​​​​​None of this work was done with code or a command line interface. It was all just done with a gui. None of this was really possible before FME 2023 and it’s still not perfect but I think it’s great.The previous workflow required you to make a copy of each and then visually compare them. It often required lot of communication with the author and there was quite a large change of missing something. 

There is only one thing you need to do to get this working - All you have to do is configure the Eternal Diff / Merge settings in Sourcetree (e.e., below). You con’t have to mess with the command line or anything or a gitattributes file etc. 

 



So while the main FME workbench doesn't have some kind of git tree viewer built in or anything it can still be used to do conflict resolution in the context of git. 

I suppose another direction that FME could go it would be similar to something like Microsoft Work where you can “Track Changes” all of these changes then start getting saved in the workspace which can later be reviewed by someone. But git is a pretty key part of developer workflows and it’s great that now I can use fme workspace in git. 

 

Userlevel 5
Badge +26

Thanks for that very elaborate reply @virtualcitymatt, much appreciated!

Badge +13

@virtualcitymatt Thank you very much for the thourough elaboration and use of pictures. It makes me now understand how compare workpaces tool does fit in the workflow in the context of git and how one is able to choose which changes will be merged with the master branch.

I think your current workflow is already quite neat, since you can decide yourself which changes will be merged with the masterbranch and save it. The benefit is also like you mentioned, you don't need to type on a command line, so I guess it's also less prone to make mistakes and probably more user-friendly.

The only downside is that you need to make use of extra software like sourcetree which I am not sure that can be installed at my organization. My preference would be to have everything in FME, but in the context of git is your workflow quite nice.

I have to ask within my organization whether it’s possible install sourcetree, but I would really like to try out your workflow.

Reply