ABAP – Using git for safety and transparency
abapGit has been around for a while now, one of its newer features is background mode, where it automatically pushes changed objects to the remote git repository.
Not all organizations have a git server in-house, and sometimes it might be difficult to get permission to put all the ABAP code into the cloud. So the abapGitServer project was started, it is a git server which can be installed on the ABAP application server, it is open source and MIT licensed.
If you want to try out git in connection with ABAP, abapGitServer uses the existing SAP infrastructure and does not require any licenses, plus it does not require the ABAP system to be connected to the internet. User administration is also easy, as abapGitServer can be installed on the ABAP development system, so all developers will automatically have access.
If you have something like Github Enterprise, Gitlab CE or similar in your landscape this can be used instead of abapGitServer. However, something has to be setup regarding authentication, authentication with abapGit and abapGitServer is easy as it uses logon tickets.
Follow this guide to setup automatic push from abapGit to abapGitServer.
abapGitServer can be started via transaction ZABAPGITSERVER. And is organized in repositories, e.g. one repository for each project.
Commits can be listed for each repository,
And show exactly what has been changed,
With abapGit running in the background, all objects are automatically backed up regularly, e.g. every hour. SAP automatically creates a version when the transport is released, however with abapGit all details will be kept in history down to the hour. This is useful if code are deleted by accident, or doing too much heavy refactoring and forgetting to generate a version :o)
Full chronological history
It gives a complete overview of what has been changed across object types. If something suddenly breaks somewhere, it is possible to check the history for what has recently been changed, to see if this might have caused the error.
Versioning for non-versioned objects
abapGit works with message classes and smartforms, which are not versioned in standard SAP. With automatic backup, the non-versioned object types are versioned in git, and it is possible to see what/who has been changed.
Non-disruptive developer workflow
abapGit runs as a background job, and automatically tries to determine which developer changed the object. So there are no changes to the developer workflow, developers keep working as normal. The git backup just runs automatically and adds insights into your ABAP development.
Anyhow, try it out, its free and open source, just requires a developer key and a ABAP 7.03+ system.
Download from https://github.com/larshp/abapGitServer
Issues and pull requests welcome on the github page.
we installed it on our server and it seems to work. We like it a lot, but there is one thing we find a bit cumbersome.
We were not able to connect our ADT eclipse to the git repository and work on that. We tried it with the standard git client, that comes with eclipse, but we are not relly sure if this would be the right way, since the ADT would not know how to deal with it.
What we would need is the ability to perform commits directly out of eclipse ADT. Has somebody found a solution for that?
Cool 🙂 few notes on both client and server side:
I will recommend using abapGit as the git client, however it does not have any integration into Eclipse, so you have to start ZABAPGIT to perform the git actions. As described above you can also schedule abapGit to run regularly in background and push changes automatically.
See issue https://github.com/larshp/abapGit/issues/636 regarding abapGit Eclipse support.
abapGitServer was developed so it could be used with abapGit as the client, and this should work. However there are some issues with using normal git clients, see https://github.com/larshp/abapGitServer/issues/59, note that 'git clone' works.
All things has to start somewhere, and hopefully more features will be implemented over time. If you 'watch' the abapGit and abapGitServer repositories on github you will automatically get notified when something new happens.
We were actually quite stunned, with which wealth of problems you had to deal in the abapGit Client 🙂
Our favorite part of the code (as far as we read it) is:
What we also like a lot is your swagger implementation 🙂
Its part of the custom zlib implementation it was a lot of fun to implement.
Oh now it makes sense 🙂
how about using an inline SAPGui window in eclipse running ABAPGit? Something like this:
It works quite well for me.
Since some time there’s also an option to enable navigation to ADT from ABAPGit. Not quite what you’re looking for, I know, but a first step to a tighter integration. #734
thats a good idea!
Our project is quite large and the client takes 2 minutes to load it all (which is done several times if you want to commit). We have scheduled it in background to run every hour.
Nevertheless, we think of speeding it up, so it can handle our load 🙂
We have a nice framework for starting new processes which we might use here for parallelization.
I don't know if you remember me haha. I've been a little bit bussy with some projects so I couldn't stay tunned to abapGit.
One question, how does abapGitServer work when setted in background mode? What does it do in general words? I would like to test it with a very large package (~25k objects) so I would like to know if it checks every object or not.
The client checks which objects to send to the git server. So it will take the same time as mentioned in https://github.com/larshp/abapGit/issues/537 to determine which objects to send to the server.
However there is an open issue with the idea just to look at objects in unreleased transports, https://github.com/larshp/abapGit/issues/245. I assume the ~25k objects are changed and transported regularly?
On the server side I have not tested this many objects, but a lot of the heavy lifting code is shared between abapGit and abapGitServer, so it might work out
No, all of them are not changed regularly. I gues the unreleased transport request filter would help a lot.
Hoping to start contributing again 🙂
Is it possible to delete a abapGitServer Repo?
yep, there is a report for it, https://github.com/larshp/abapGitServer/blob/master/src/frontend/zags_repo_delete.prog.abap
Few questions on Gitserver. I installed the gitserver on our landscape as instructed.
1. suggest opening an issue on github, did you activate the SICF node?
2. abapGitServer is a git server installed on the abap system, only git clients does pushes