Open angiehjort opened 1 month ago
Full config
currently here https://github.com/Gapminder/tools-page/blob/develop/src/config/toolconfigs/MountainChart-v8.js#L354
billy: {
data: {
space: ["person", "time"],
source: "billy"
},
requiredEncodings: ["x"],
encoding: {
"order": {
modelType: "order",
direction: "desc",
data: {
ref: "markers.billy.config.encoding.x.data"
}
},
x: {
data: {
space: ["person", "time"],
concept: null,
stash: "daily_income"
}
},
name: {
data: {
space: ["person"],
concept: null,
stash: "name"
}
},
slices: {
data: {
space: ["person"],
concept: null,
stash: "countries"
}
},
frame: {
value: "2022",
modelType: "frame",
loop: false,
data: {
concept: "time"
},
scale: {
clampDomainToData: true
}
},
selected: {
modelType: "selection"
},
highlighted: {
modelType: "selection"
}
}
}
The issue happens on vizabi mountain-chart + small-waffle, when the billy feature is disabled
mountain chart sends a query with empty "select.value" array to Billy dataset
LINK
To which ddfcsv reader in small waffle errors and pollutes the error log. Returns 500.
Big-waffle would gracefully return an empty array in this case (try)
Response:
billy mark has the config as provided before. notice how concept is null in many places, and the value for concept it is instead kept in "stash"
when needed, there is a UI logic that pulls the values out of stash, currently here
this is a weird pattern but whatever. it would be nice to add a protection on vizabi core level, which would detect such situation and not send any query as it is known that there will be no data.