Bug #14383

[API] Java SDK double slash bug with arvados-controller

Added by Peter Amstutz about 2 months ago. Updated 2 days ago.

Status:
New
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
(Total: 0.00 h)
Story points:
-

Description

We found the origin of the problem with the java SDK, the bug is in the new API server or the SDK, you decide. The SDK will query URLs with a double forward slash: https://$ARVADOS_API_HOST//arvados/v1/collections. The old Arvados would perform these queries, bu the new one issue a redirect (301). We fixed it by removing this line: https://github.com/curoverse/arvados/blob/master/sdk/java/src/main/java/org/arvados/sdk/Arvados.java#L94

That's the new arvados-controller component being more strict.

We should remove this line a publish a new package.


Subtasks

Task #14608: ReviewNewPeter Amstutz


Related issues

Related to Arvados - Story #13497: [API] Initial "arvados-controller" server that proxies API endpoints to Rails serverResolved2018-06-15

History

#1 Updated by Peter Amstutz about 2 months ago

  • Status changed from New to In Progress

#2 Updated by Peter Amstutz about 2 months ago

  • Subject changed from Java SDK double slash to Java SDK double slash bug with arvados-controller
  • Description updated (diff)
  • Status changed from In Progress to New

#3 Updated by Tom Morris about 2 months ago

  • Subject changed from Java SDK double slash bug with arvados-controller to [API] Java SDK double slash bug with arvados-controller

Actually, the correct fix is to fix the server so that it isn't breaking existing clients.

#4 Updated by Tom Morris about 2 months ago

  • Target version set to 2018-11-14 Sprint

#5 Updated by Tom Clegg about 1 month ago

I wonder why f0d62ea064d32b980f723e37972788cbd693c2ff didn't fix this. Merged Fri Jul 13 2018.

#6 Updated by Tom Clegg about 1 month ago

  • Related to Story #13497: [API] Initial "arvados-controller" server that proxies API endpoints to Rails server added

#7 Updated by Tom Morris about 1 month ago

  • Assigned To set to Tom Morris

#8 Updated by Tom Morris about 1 month ago

  • Target version changed from 2018-11-14 Sprint to 2018-11-28 Sprint

#9 Updated by Tom Clegg about 1 month ago

Tom Morris wrote:

Actually, the correct fix is to fix the server so that it isn't breaking existing clients.

Continuing to tolerate client bugs that were tolerated before should be easy enough here. But the buggy client should still be fixed. API endpoints are "/arvados/...", not "//arvados/...".

#10 Updated by Tom Morris 11 days ago

  • Release set to 14

#11 Updated by Tom Morris 11 days ago

  • Target version changed from 2018-11-28 Sprint to 2018-12-12 Sprint
  • Release deleted (14)

#12 Updated by Tom Morris 2 days ago

  • Target version changed from 2018-12-12 Sprint to 2018-12-21 Sprint

#13 Updated by Tom Clegg 2 days ago

Tom Clegg wrote:

I wonder why f0d62ea064d32b980f723e37972788cbd693c2ff didn't fix this. Merged Fri Jul 13 2018.

That "fix path transparently" bit doesn't apply to GET reqs, because following a 301 redirect doesn't change the request method. If a client simply can't handle redirects, even GET requests fail.

I think it's OK to say clients need to be able to follow 301 redirects -- especially clients that aren't paying attention to the paths specified in the discovery doc.

The best fix would be to make Java SDK follow redirects, and fix that broken path to avoid the extra request.

Also available in: Atom PDF