Bug #13851
closedWorkbench multi-site search bug
Description
session_db.self-4814f5dc77cd9abd79a4cae265aa417dbb16c0dc7ab99fece07391fac5bcaf23.js?body=1:73 Uncaught TypeError: db.discoveryDoc(...).map(...).catch is not a function at window.SessionDB.findAPI (session_db.self-4814f5dc77cd9abd79a4cae265aa417dbb16c0dc7ab99fece07391fac5bcaf23.js?body=1:73) at HTMLFormElement.onsubmit (sessions.self-729bb276a57aec159a0bcdbb99ca42f47fc9bcf52a6e18a1c0b514727bcb4f5b.js?body=1:79) at HTMLFormElement.callback (npm-dependencies.self-ad43882e3d5843bd283629f28ba745a7d3bde41937fa6e389b3ecd717d93ef6d.js?body=1:11776)
This is because SessionDB.discoveryDoc is returning a mithril stream (m.stream()) but SessionDB.findAPI is expecting a Javascript Promise.
Also I ran into another problem in SessionDB.findAPI:
return db.discoveryDoc({baseURL: url.origin}).map(function() {
This is a problem because url.origin does not end in "/", but SessionDB.discoveryDoc calls m.request(session.baseURL+'discovery/v1/apis/arvados/v1/rest')
(this results in "http://example.com:8000discovery/v1/apis/arvados/v1/rest")
- m.request(session.baseURL+'discovery/v1/apis/arvados/v1/rest') + var baseurl = session.baseURL; + if (baseurl[baseurl.length-1] != '/') { + baseurl += '/' + } + m.request(baseurl+'discovery/v1/apis/arvados/v1/rest')
Updated by Peter Amstutz over 6 years ago
- Related to Bug #13105: Missing federation config makes the multi-site search's session manager fail to log in added
Updated by Lucas Di Pentima over 6 years ago
- Assigned To set to Lucas Di Pentima
Updated by Lucas Di Pentima over 6 years ago
- Status changed from New to In Progress
Updated by Lucas Di Pentima over 6 years ago
Updates at 6c6617781 - branch 13851-wb-multisite-search
Test run: (not being able to run on Jenkins)
Reverted the use of discoveryDoc()
on findAPI()
to check if the API server exist, because it returns a mithril stream and not a Promise as observed by Peter. This was mistakenly changed in the past to take advantage of the discoveryDoc()
cache.
Updated by Peter Amstutz over 6 years ago
Lucas Di Pentima wrote:
Updates at 6c6617781 - branch
13851-wb-multisite-search
Test run: (not being able to run on Jenkins)Reverted the use of
discoveryDoc()
onfindAPI()
to check if the API server exist, because it returns a mithril stream and not a Promise as observed by Peter. This was mistakenly changed in the past to take advantage of thediscoveryDoc()
cache.
This LGTM, thanks!
Updated by Lucas Di Pentima over 6 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|bef56b9a22efac9ce73006623080e84a0b57f243.