Project

General

Profile

Actions

Bug #12515

closed

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

Added by Tom Morris over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
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 1 (0 open1 closed)

Task #12577: Review 12515-configured-workbench-address & 12515-use-configured-wbResolvedTom Clegg10/31/2017Actions
Actions #1

Updated by Tom Clegg over 6 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.

Actions #2

Updated by Tom Clegg over 6 years ago

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

Actions #3

Updated by Tom Clegg over 6 years ago

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

Updated by Tom Clegg over 6 years ago

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

Actions #5

Updated by Lucas Di Pentima over 6 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?
Actions #6

Updated by Tom Clegg over 6 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
})
Actions #7

Updated by Lucas Di Pentima over 6 years ago

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

Actions #8

Updated by Anonymous over 6 years ago

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

Applied in changeset arvados|commit:2f66ce454917c8d9d016a9438e529a0a20317028.

Actions

Also available in: Atom PDF