Bug #12515

Workbench base URL for multi-site search results should be configurable

Added by Tom Morris almost 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
10/31/2017
Due date:
% Done:

100%

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

Description

Currently the workbench URL is hardcoded to be https://workbench.foo.arvadosapi.com, which doesn't work if, for example, a customer has their cluster configured so that the workbench lives at https://wb.foo.arvadosapi.com


Subtasks

Task #12577: Review 12515-configured-workbench-address & 12515-use-configured-wbResolvedTom Clegg

Associated revisions

Revision 9e6a74ae
Added by Tom Clegg almost 2 years ago

Merge branch '12515-configured-workbench-address'

refs #12515

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <>

Revision 2f66ce45
Added by Tom Clegg almost 2 years ago

Merge branch '12515-use-configured-wb'

closes #12515

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <>

History

#1 Updated by Tom Clegg almost 2 years ago

  • Status changed from New to In Progress

API server config already has this config. Need to add it to discovery doc, and have Workbench fetch discovery doc to find workbench address.

#2 Updated by Tom Clegg almost 2 years ago

part 1 (add to discovery doc): 12515-configured-workbench-address @ a5d1a2aa40ad211b4faf870c603ae7ad5263b6bc

#3 Updated by Tom Clegg almost 2 years ago

  • Target version changed from 2017-11-08 Sprint to 2017-11-22 Sprint

#4 Updated by Tom Clegg almost 2 years ago

part 2 (use advertised wb site when possible): 12515-use-configured-wb @ 63f1542e94f3f1e66cbf0d88f557105ff5d104d0

#5 Updated by Lucas Di Pentima almost 2 years ago

Some questions:

  • Can we have a workbench integration test to check that the correct URL is being selected? How about one for the new discovery doc value?
  • File apps/workbench/app/assets/javascripts/models/session_db.js
    • Line 146: I don’t quite understand how m.stream() works, and its relation with comment on line 130, could you explain a little? On mithril documentation, it seems to be some kind of callback, right?

#6 Updated by Tom Clegg almost 2 years ago

Lucas Di Pentima wrote:

  • Can we have a workbench integration test to check that the correct URL is being selected?

So far we've punted on tests for the client-side stuff. Doesn't seem worthwhile to write such tests in Ruby, and we don't have a js setup yet. I'm inclined to keep punting for now.

How about one for the new discovery doc value?

Sure, that one's easy.

12515-configured-workbench-address @ e1da2448fac9f060cdfe7f62a8783cd9b8cfaf96

  • File apps/workbench/app/assets/javascripts/models/session_db.js
    • Line 146: I don’t quite understand how m.stream() works, and its relation with comment on line 130, could you explain a little? On mithril documentation, it seems to be some kind of callback, right?

A stream is a getter-setter that can also register "on update" hooks, so you can do stuff like this

ddstream = db.discoveryDoc(session)
if (ddstream() !== null) {
  // discovery doc has arrived
  url = ddstream().workbenchUrl
}

or like this

ddstream = db.discoveryDoc(session)
ddstream.map(function(dd) {
  // this function runs when a discovery doc arrives
  url = dd.workbenchUrl
})

#7 Updated by Lucas Di Pentima almost 2 years ago

Sorry, for the delay.
This LGTM, thanks for the explanation, will have to read a lot more about Mithril.

#8 Updated by Anonymous almost 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:2f66ce454917c8d9d016a9438e529a0a20317028.

Also available in: Atom PDF