Closed bprusinowski closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
visualization-tool | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 26, 2024 2:21pm |
@bprusinowski unfortunately the upgrade of published charts does not to happen anymore. This needs to be fixed.
repro case:
... while in preview mode upgrade happens as expected repro case:
nit: there is a delay due to QGL queries being fired with old version and later relaunched with new version
Thanks for catching a problem with published charts @Rdataflow, should be fixed now 😄
Closes #1472
This goal of this PR is to make the server-side not aware of a "latest cube" concept and to always just pass
cubeIri
, without thelatest
property. Cube upgrade will happen once on the client side when initializing the chart (edit mode) or fetching the chart config (embed and published modes).The rationale for it is that there is no need to constantly ask for latest cube version in every GQL query. This will improve performance and reduce the number of queries we send to LINDAS.
This change should also make it easier to control when an upgrade should happen by having centralized place to define that behavior, instead of having to pass the latest property in every GQL query (
upgradeConfiguratorState
that could be called conditionally if at some we introduce an ability to pin cube version).Implementation logic
I introduced a new,
publishIri
property to chart config cube, which stores cube IRI at publish time. I decided to leave the currentiri
property to make it much easier to handle the change throughout the application without additional custom JS logic to keep the mapping somewhere and access upgraded iri in every query – because of this, majority of the code stays the same. We just keep the currently upgraded cube iri in theiri
property.This should make it easy to control the upgrade logic – if the cube is not meant to be upgraded, we assign
publishIri
toiri
; if it's meant to be upgraded, we keep upgraded iri iniri
, without affecting rest of the application.Questions
iri
withpublishIri
when updating the cube, at technically it's a "runtime" property?runtimeConfig
that would be a part of configurator state that is removed at publish time?