BlueBrain / BlueBrain/nexus

Dashboard has error at saving, but still generates a FusionTable resource

Open
#4,167 0 comments 0 reactions 0 assignees View on GitHub
bug fusion
Dominant language
Scala
Stars
301
Forks
76
PR merge metrics
No merged PRs in 30d

Description

**Description**
I was trying to add a new Dashboard in the bbp/mouselight Studios, but I tried a couple of times and it displayed an error.
However, I copied the same query to the "Query" tab and it was a valid query, returning what I wanted.
Also, I noticed that multiple FusionTable resources were created, with empty queries. See attached images.

**What part of Nexus is affected**
- [x] Fusion
- [ ] Delta
- [ ] CLI
- [ ] Documentation

**To Reproduce**
Steps to reproduce the behavior, e.g. for Fusion:
1. Go to 'bbp/mouselight Studio
2. Click on 'Dashboard' / 'Add'
3. Select Sparql index
4. Add name
5. Copy the following query:
```
PREFIX nxv:
PREFIX nsg:
PREFIX schema:
PREFIX prov:
PREFIX rdf:
PREFIX rdfs:
PREFIX skos:
PREFIX vocab:

SELECT DISTINCT ?self ?name ?brainRegion ?subjectSpecies ?subjectStrain ?xCoordinate ?yCoordinate ?zCoordinate (STRAFTER(?atlas_identifier_, "data/") AS ?atlasIdentifier) ?contributor (STRAFTER(?registered_by_str, "users/") AS ?registeredBy) ?registeredAt
WHERE {
?entity nxv:self ?self ;
a nsg:NeuronMorphology ;
nxv:deprecated false ;
schema:name ?name ;
nxv:createdBy ?registered_by ;
nxv:createdBy ;
nxv:createdAt ?registeredAt .
OPTIONAL { ?entity nsg:contribution / prov:agent / schema:name ?contributor } .
OPTIONAL { ?entity nsg:subject / schema:name ?subjectName } .
OPTIONAL { ?entity nsg:subject / nsg:species / rdfs:label ?subjectSpecies } .
OPTIONAL { ?entity nsg:subject / nsg:strain / rdfs:label ?subjectStrain } .
OPTIONAL { ?entity nsg:brainLocation / nsg:coordinatesInBrainAtlas / nsg:valueX ?xCoordinate ;
nsg:brainLocation / nsg:coordinatesInBrainAtlas / nsg:valueY ?yCoordinate ;
nsg:brainLocation / nsg:coordinatesInBrainAtlas / nsg:valueZ ?zCoordinate} .
OPTIONAL { ?entity nsg:brainLocation / nsg:atlasSpatialReferenceSystem ?atlas_identifier } .
BIND (STR(?registered_by) AS ?registered_by_str) .
BIND (STR(?atlas_identifier) AS ?atlas_identifier_) .
GRAPH ?g {
OPTIONAL {
?entity nsg:brainLocation / nsg:brainRegion / rdfs:label ?brainRegion .
}
}
}
LIMIT 2000
```
6. Click on Configure Columns
7. Click on Save

**Screenshots**

![Screenshot 2023-08-17 at 11 26 52](https://github.com/BlueBrain/nexus/assets/3536415/a005bf1d-25fb-46c2-a96f-3efd817f7943)
![Screenshot 2023-08-17 at 11 17 29](https://github.com/BlueBrain/nexus/assets/3536415/04905f0d-5586-4859-b34f-3076d58c0570)
![Screenshot 2023-08-17 at 11 17 14](https://github.com/BlueBrain/nexus/assets/3536415/66cd8e3b-80aa-4d12-bb54-7317814f185b)

Contributor guide

Open the contributing guide

Research direction

Start with the Fusion Dashboard save flow described in the reproduction steps, then inspect how saving sends the query and creates FusionTable resources. Reproduce the failure using the supplied query and check whether the error path leaves empty resources behind. Done means a valid dashboard saves without an error and does not create duplicate empty resources.

Written by the indexing model from the issue text.

Assessment

Domain
backend, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.