[Geoserver-devel] org.restlet version upgrade

Hey,

tried a tentative upgrade for the org.restlet dependencies version, from
1.0.8 to the latest stable 1.1.10, because I need support for setting
the HTTP header "content-disposition" and it was added only at version
1.1. Also note 1.0.x is more than three years old?

Any objection in upgrading to restlet api 1.1.10? (would need to be both
for trunk and 2.0.x.

--
Gabriel Roldan
groldan@anonymised.com
Expert service straight from the developers

On Sat, Oct 2, 2010 at 10:18 PM, Gabriel Roldán <groldan@anonymised.com> wrote:

Hey,

tried a tentative upgrade for the org.restlet dependencies version, from
1.0.8 to the latest stable 1.1.10, because I need support for setting
the HTTP header "content-disposition" and it was added only at version
1.1. Also note 1.0.x is more than three years old?

Any objection in upgrading to restlet api 1.1.10? (would need to be both
for trunk and 2.0.x.

Is it binary compatible? I thought they changed the API somehow
between versions.
As a line of principle I have nothing against upgrading trunk, but
2.0.x... it has to be
a rock solid upgrade to go there. I'm not clairvoyant but I guess next
2.0.x release,
if/when we make it, will be the last, so it would better to be stable :wink:

Just my two cents, hopefully others will bring more info to the table

Cheers
Andrea

-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584962313
fax: +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-----------------------------------------------------

On Sun, 2010-10-03 at 00:00 +0200, Andrea Aime wrote:

On Sat, Oct 2, 2010 at 10:18 PM, Gabriel Roldán <groldan@anonymised.com> wrote:
> Hey,
>
> tried a tentative upgrade for the org.restlet dependencies version, from
> 1.0.8 to the latest stable 1.1.10, because I need support for setting
> the HTTP header "content-disposition" and it was added only at version
> 1.1. Also note 1.0.x is more than three years old?
>
> Any objection in upgrading to restlet api 1.1.10? (would need to be both
> for trunk and 2.0.x.

Is it binary compatible? I thought they changed the API somehow
between versions.
As a line of principle I have nothing against upgrading trunk, but
2.0.x... it has to be
a rock solid upgrade to go there. I'm not clairvoyant but I guess next
2.0.x release,
if/when we make it, will be the last, so it would better to be stable :wink:

Just my two cents, hopefully others will bring more info to the table

I agree. As far as I can tell it's binary compatible and didn't see a
single deprecation warning when upgrading. Only thing is some tests
break what's solved with the patch copied bellow.
They're on 2.0-beta now so that's probably the one that will carry over
some incompatibility. But I'll be glad to test more thoroughly 1.1.10
before committing. By the other hand, to stay on the safest side for
2.0.x I would rather push for a 2.1-beta2 release sometime soon so
geonode could move on.

index e65c684..6bb6aa8 100644
--- a/rest/src/test/java/org/geoserver/rest/RestletTestSupport.java
+++ b/rest/src/test/java/org/geoserver/rest/RestletTestSupport.java
@@ -21,6 +21,7 @@ import net.sf.json.JSONSerializer;

import org.custommonkey.xmlunit.XMLUnit;
import org.custommonkey.xmlunit.XpathEngine;
+import org.restlet.Application;
import org.restlet.data.MediaType;
import org.restlet.data.Method;
import org.restlet.data.Request;
@@ -35,7 +36,7 @@ public abstract class RestletTestSupport extends
TestCase {
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-
+ Application.setCurrent(new Application());
         xp = XMLUnit.newXpathEngine();
     }

Cheers
Andrea

-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584962313
fax: +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-----------------------------------------------------

--
Gabriel Roldan
groldan@anonymised.com
Expert service straight from the developers

None here. I imagine all the rest config tests pass?

On Oct 2, 2010, at 2:18 PM, Gabriel Roldán <groldan@anonymised.com> wrote:

Hey,

tried a tentative upgrade for the org.restlet dependencies version, from
1.0.8 to the latest stable 1.1.10, because I need support for setting
the HTTP header "content-disposition" and it was added only at version
1.1. Also note 1.0.x is more than three years old?

Any objection in upgrading to restlet api 1.1.10? (would need to be both
for trunk and 2.0.x.

--
Gabriel Roldan
groldan@anonymised.com
Expert service straight from the developers

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

On Sat, 2010-10-02 at 18:06 -0600, Justin Deoliveira wrote:

None here. I imagine all the rest config tests pass?

Actually they don't. But _seems_ to be due to a bad assumption in the
test code originated by a bug in
com.noelios.restlet.ext.servlet.ResletCall.

The fix for geoserver is to replace the calls to
MockHttpServletResponse.getStatusCode() by a call to getErrorCode() for
the cases where an HTTP error code is expected.

For example:

public void testXXX(){
  assertEquals( 405, putAsServletResponse("/rest/...").
}
instead of
public void testXXX(){
  assertEquals( 405, putAsServletResponse("/rest/...").
}

All in all I think we better don't do that for 2.0.x, I'm already asking
the geonode dev branch to switch to geoserver-2.1.x anyways.

But for trunk it would be worth it.

Cheers,
Gabriel

On Oct 2, 2010, at 2:18 PM, Gabriel Roldán <groldan@anonymised.com> wrote:

> Hey,
>
> tried a tentative upgrade for the org.restlet dependencies version, from
> 1.0.8 to the latest stable 1.1.10, because I need support for setting
> the HTTP header "content-disposition" and it was added only at version
> 1.1. Also note 1.0.x is more than three years old?
>
> Any objection in upgrading to restlet api 1.1.10? (would need to be both
> for trunk and 2.0.x.
>
> --
> Gabriel Roldan
> groldan@anonymised.com
> Expert service straight from the developers
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--
Gabriel Roldan
groldan@anonymised.com
Expert service straight from the developers

Yeah seems like we should leave the stable branch be. +1 for upgrading on trunk.

On Oct 2, 2010, at 8:01 PM, Gabriel Roldán <groldan@anonymised.com> wrote:

On Sat, 2010-10-02 at 18:06 -0600, Justin Deoliveira wrote:

None here. I imagine all the rest config tests pass?

Actually they don't. But _seems_ to be due to a bad assumption in the
test code originated by a bug in
com.noelios.restlet.ext.servlet.ResletCall.

The fix for geoserver is to replace the calls to
MockHttpServletResponse.getStatusCode() by a call to getErrorCode() for
the cases where an HTTP error code is expected.

For example:

public void testXXX(){
assertEquals( 405, putAsServletResponse("/rest/...").
}
instead of
public void testXXX(){
assertEquals( 405, putAsServletResponse("/rest/...").
}

All in all I think we better don't do that for 2.0.x, I'm already asking
the geonode dev branch to switch to geoserver-2.1.x anyways.

But for trunk it would be worth it.

Cheers,
Gabriel

On Oct 2, 2010, at 2:18 PM, Gabriel Roldán <groldan@anonymised.com> wrote:

Hey,

tried a tentative upgrade for the org.restlet dependencies version, from
1.0.8 to the latest stable 1.1.10, because I need support for setting
the HTTP header "content-disposition" and it was added only at version
1.1. Also note 1.0.x is more than three years old?

Any objection in upgrading to restlet api 1.1.10? (would need to be both
for trunk and 2.0.x.

--
Gabriel Roldan
groldan@anonymised.com
Expert service straight from the developers

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--
Gabriel Roldan
groldan@anonymised.com
Expert service straight from the developers