Contenu connexe
Similaire à Guiding Diffy to the Enterprise land
Similaire à Guiding Diffy to the Enterprise land (20)
Plus de Dariusz Łuksza (9)
Guiding Diffy to the Enterprise land
- 1. 1 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT
Guiding Diffy to the Enterprise land
Dariusz Luksza
Eryk Szymanski
CollabNet Engineering, Potsdam, Germany
- 2. 2 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
●
First TeamForge Gerrit integration was hacked into
2.1 – this means close to zero possibility of update
●
About 1,5 year ago we started our journey …
●
So we started from scratch with 2.6 and its plugin
architecture
●
We had only three requirements:
– Keep same behaviour and API as we had in 2.1
– Keep same performance characteristics
– Make it easy to update to newest upstream version
- 3. 3 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
●
Few stats about our biggest plugin:
– cat `find src/main/java -name "*.java"` | wc -l
11962
– du -sh src/main/java
828K src/main/java
●
This is actually plugin responsible for
synchronization with TeamForge
- 4. 4 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
Expectations
Reality
The Road From 2.1 to 2.6
- 5. 5 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
The Road From 2.1 to 2.6
Reality
- 7. 7 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
Obstacle 1
missing extension points
- 8. 8 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
●
We are contributing back all our modifications to Gerrit:
– Initial support for Web UI plugins (#38330, #38331, #38332),
– Fix binding of @Listen annotated extensions points in HTTP and SSH module
(#39293),
– Bump GWT to 2.5.0 version and fix connected issues (#39540, #39610 #38962),
– Prevent from deleting refs/changes/ (#40385),
– Fix GitWeb Caching (#41360),
– Add additional context for group name suggester API (#40123),
– Initial work on making JavaSript plugins architecture more pleasant for JS
developers (#39270),
– Allow include external group into internal one and set external group as a owner
of internal one (#46840, #47020),
– Add --list-plugins and --install-pliugin parameters to init step (#47818, #47819),
– Fix ChangeMergedEvent parameter for merged patch sets (#48221)
– Improvements to logging subsystem (#51890, #52164)
– Make plugin servlet's context path authorization aware (#51192)
– Get rid of JdbcSQLException while numbers are read from cache (#51193)
- 9. 9 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
●
But still some of our core contributions are in the
review:
– Authentication extension point
– Secure store extension point
– Commit verification fast path
●
So what?
– Instead of investing our time in new features (like Angular-
Gerrit) we are burning our cycles rebasing, resolving conflicts
and testing above functionalities with current stable branch
- 11. 11 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
●
Each plugin runs in separate ClassLoader
●
If one of your libraries is not behaving well (eg. is
not cleaning thread locals like Apache Axis does)
you will get out of PermGen space after 5th or 10th
deploy
●
Solution? Simple, always restart gerrit before next
deploy
●
This work for us for quite long time... since our 4th
plugin appears... we loaded Axis (and other
dependencies) fourth time and we need to change
container.javaOptions to increase PermGen size
because Gerrit was unable to load all plugins
- 12. 12 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
●
What is more, separate ClassLoaders for each
plugin means NO class instance sharing between
plugins!
●
Solution? We didn't find one. Currently we share
only one single piece of information (the repository
ID) between our plugins, using refs/meta/teamforge
ref
- 14. 14 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
HistoryProtection UI:
Notification UI:
- 15. 15 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
●
Even after our contribution to 2.6 extending Web UI
was hard (things dramatically changed in Gerrit 2.8)
●
Further modifications in Gerrit were required:
– GWT module for REST api
– JSNI extensions for REST calls
●
Can't start GWT debug session with plugin
(fallback to Window.alert() “debugging”)
●
GWT based development is SLOOOOW!!
- 16. 16 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
Chasing the community
the never ending story
- 17. 17 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
●
Gerrit is a moving target
●
Now we are on 2.7
●
Still with 70 additional patches
●
Most of them were contributed back... but were not
merged yet
●
So we are rebasing them on top of upstream
●
Next stop? Gerrit 2.8...
●
What is the hard part? Finding balance between
contributions and our internal modifications
- 18. 18 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT
Thank you!
Dariusz Luksza
Eryk Szymanski
CollabNet Engineering, Potsdam, Germany