Project

General

Profile

Actions

Bug #14738

closed

[Workbench] Tag editor not loading

Added by Peter Amstutz almost 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
-
Release relationship:
Auto

Description

On the workbench collection page, the "Tags" tab is not loading, it just says "Loading tags..."


Subtasks 1 (0 open1 closed)

Task #14750: Review 14738-tag-editor-fixResolvedEric Biagiotti01/29/2019Actions
Actions #1

Updated by Peter Amstutz almost 6 years ago

  • Description updated (diff)
Actions #2

Updated by Lucas Di Pentima almost 6 years ago

  • Assigned To set to Lucas Di Pentima
Actions #3

Updated by Lucas Di Pentima almost 6 years ago

  • Target version set to 2019-01-16 Sprint
Actions #4

Updated by Lucas Di Pentima almost 6 years ago

  • Target version changed from 2019-01-16 Sprint to 2019-01-30 Sprint
Actions #5

Updated by Lucas Di Pentima almost 6 years ago

Tom Morris reported that the error seems to be about not handling correctly the lack of a vocabulary.json file.

Checking qr1hi and 4xphq I'm also seeing errors like:

[Error] Cross-origin redirection to https://4xphq.arvadosapi.com/arvados/v1/collections?filters=%5B%5B%22uuid%22%2C%22%3D%22%2C%224xphq-4zz18-003mqj38ytfl1om%22%5D%5D&select=%5B%22properties%22%5D denied by Cross-Origin Resource Sharing policy: Origin https://workbench.4xphq.arvadosapi.com is not allowed by Access-Control-Allow-Origin.
[Error] XMLHttpRequest cannot load https://4xphq.arvadosapi.com//arvados/v1/collections?filters=%5B%5B%22uuid%22%2C%22%3D%22%2C%224xphq-4zz18-003mqj38ytfl1om%22%5D%5D&select=%5B%22properties%22%5D due to access control checks.
Actions #6

Updated by Lucas Di Pentima almost 6 years ago

It seems that the real issue is about CORS, as I've created a vocabulary.json file on an arvbox instance and the problem persisted.

Actions #7

Updated by Lucas Di Pentima almost 6 years ago

  • Status changed from New to In Progress
Actions #8

Updated by Lucas Di Pentima almost 6 years ago

Updates at 1c0566366 - branch 14738-tag-editor-fix
Test run: https://ci.curoverse.com/job/developer-run-tests/1046/

Fixed the way request URL are built on the tag editor to avoid double slashes. Running tests just in case, but this editor isn't explicitly tested.

Actions #9

Updated by Lucas Di Pentima almost 6 years ago

One way to test if this works is pointing your local workbench to 4xphq or qr1hi and try the Tags tab inside a collection.

Actions #11

Updated by Eric Biagiotti almost 6 years ago

In reference to 1c0566366:

- Nit picky, but I generally like spaces before and after '+' when concatenating. Not sure what our coding convention for that is.
- Is it safe to assume the variables used on line 195 and 199 are OK to use for a URL? Is there a better way to build URLs in javascript or is this the convention for javascript code in arvados?

Otherwise, LGTM.

Actions #12

Updated by Lucas Di Pentima almost 6 years ago

Eric Biagiotti wrote:

- Nit picky, but I generally like spaces before and after '+' when concatenating. Not sure what our coding convention for that is.
- Is it safe to assume the variables used on line 195 and 199 are OK to use for a URL? Is there a better way to build URLs in javascript or is this the convention for javascript code in arvados?

I thought we didn't have any coding standards regarding Javascript, but after a quick look at https://dev.arvados.org/projects/arvados/wiki/Coding_Standards, it seems that we should follow what's described in https://github.com/airbnb/javascript.

Actions #13

Updated by Lucas Di Pentima almost 6 years ago

Update at 608588c42

Used templates to build strings whenever possible, following AirBnB JS style guide.

Actions #14

Updated by Eric Biagiotti almost 6 years ago

Lucas Di Pentima wrote:

Update at 608588c42

Used templates to build strings whenever possible, following AirBnB JS style guide.

At the risk of scope creep, I would update lines 232 and 31 to be consistent in the entire file.

Actions #15

Updated by Lucas Di Pentima almost 6 years ago

Updates at cf71576a6

  • Use string templates on those 2 cases, didn't know that ${...} were just any expression, thanks!
  • Replaced "a_string" with 'a_string' following the style guide.
Actions #16

Updated by Lucas Di Pentima almost 6 years ago

It seems that using string templates are not compatible with our testing infrastructure because it causes SyntaxError failures. (ES5 vs ES6 issue?)

Reverted to 163c8f8750193b791eb62f5a8d73dc44a006b69e and branched out to a new one: 14738-tag-editor-fix-es5, fixing the double quotes. (e17cd76f8)
Test run: https://ci.curoverse.com/job/developer-run-tests/1048/
WB integration tests re-run: https://ci.curoverse.com/job/developer-run-tests-apps-workbench-integration/1079/

Actions #17

Updated by Lucas Di Pentima almost 6 years ago

  • Target version changed from 2019-01-30 Sprint to 2019-02-13 Sprint
Actions #18

Updated by Lucas Di Pentima almost 6 years ago

  • Status changed from In Progress to Resolved
Actions #19

Updated by Tom Morris almost 6 years ago

  • Release set to 21
Actions

Also available in: Atom PDF