On Sat, Aug 18, 2012 at 6:02 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:
Hi David,
just made a run through it and fixed a number of tests that were still failing with 1.4.20,
I believe I have the whole GUI working with 1.4.20 now, so I’m trying to jump onwards to 1.5.7
Hi all,
so I’ve been working on moving that branch to 1.5.7.
The work to do so has proven to be substantive and painful so far: various classes we depended
on have been either renamed, severely refactored into new sets of classes, sometimes updated
in a way that makes them unusable for us, and sometimes even plainly removed without any
way to replace them.
The update has been so far following this update guide:
https://cwiki.apache.org/WICKET/migration-to-wicket-15.html
which could be renamed “how to upgrade simple wicket applications in 200 easy steps”…
GeoServer of course does not fall into this category and tapped into Wicket internals
into lots of ways that made upgrading more difficult.
Here are some examples of what upgrading means.
PageParameters does not work the way it did anymore, you have to go through an
intermediate object now, and when filling it you cannot use a map anymore:
https://github.com/geoserver/geoserver/commit/8e1875588baac368e125020a1d727c7cb58d4f83#L58R30
and:
https://github.com/geoserver/geoserver/commit/8e1875588baac368e125020a1d727c7cb58d4f83#L11L72
(which opens the potential for NPE, did not look into it so far)
ResorceReference is now a abstract class, the one we used has been factored out
into PackageResoureReference:
https://github.com/geoserver/geoserver/commit/8e1875588baac368e125020a1d727c7cb58d4f83#L1R45
When using a feedback border around components you now have one more item in the component
paths, meaning all tests hitting one of such components have to be updated:
https://github.com/geoserver/geoserver/commit/d6c70346368648c8edaa17602c7bb9bb1c5fa603#L6L38
HeaderContribution is gone, it has to be replaced with an override of the Page renderHead method:
From this:
https://github.com/geoserver/geoserver/commit/8e1875588baac368e125020a1d727c7cb58d4f83#L3R80
to this:
https://github.com/geoserver/geoserver/commit/8e1875588baac368e125020a1d727c7cb58d4f83#L3R184
Returning a streaming response with a resource (image, file) is simply completely different now:
https://github.com/geoserver/geoserver/commit/8e1875588baac368e125020a1d727c7cb58d4f83#L11L98
All ajax links and buttons have to include a onError method when implemented (the method was there,
but not abstract, now it is):
https://github.com/geoserver/geoserver/commit/8e1875588baac368e125020a1d727c7cb58d4f83#L13L156
Implementing a component visitor has changed significantly, now the visit is not controlled by the
return value but by a parameter of the visit call that controls what to do next:
https://github.com/geoserver/geoserver/commit/8e1875588baac368e125020a1d727c7cb58d4f83#L24L107
NumberValidator is gone, it’s now replaced by three different classes (min/max/range validator)
and has no more convenience instances for positive/negative checks:
https://github.com/geoserver/geoserver/commit/8e1875588baac368e125020a1d727c7cb58d4f83#L39R22
IBehavior is no more, now Behavior is a base class:
https://github.com/geoserver/geoserver/commit/8e1875588baac368e125020a1d727c7cb58d4f83#L42L49
The htmlvalidator utility, which we used to have a in-page report of xhtml validation, has been
modified a lot and now includes a reference to Saxon, which breaks solid our XML parsing.
I had to remove it, for HTML validation we’ll have to rely on browser plugins instead:
https://github.com/geoserver/geoserver/commit/c90ee17a1ab9122e538373c38473eb39270b8bbc#L0L40
URL encoding strategies are gone, now there is IRequestMapper that takes its place.
From this:
https://github.com/geoserver/geoserver/commit/c90ee17a1ab9122e538373c38473eb39270b8bbc#L4L0
to (hopefully working) this:
https://github.com/geoserver/geoserver/commit/c90ee17a1ab9122e538373c38473eb39270b8bbc#L5L-1
Ok, after all this, where are we? In the middle of an upgrade, web/core compiles but I haven’t got al tests
to pass so far, some are due to bugs in wicket tester that will be fixed in 1.5.8, others I still haven’t figured out.
Once that is done, there are the other web modules to upgrade and make compile and pass tests.
And then… we’ll need quite some time to do interactive testing I believe, the amount of changes is
large and the testing we have is light.
Given this I’m not so sure we want to also jump the 1.6.x series before it has stabilized a bit,
especially considering that extras outside of the core (wicket stuff, eventual jquery integrations
we might want to use to add some drag&drop support in the UI) usually lag behind and are
not ready for the .0 release.
Maybe that will be a job for GeoServer 2.4.0?
Anyways, I’m out of the pool till next weekend, if you want to give the thing a crack and fix
other compile errors/tests be my guest
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it