Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Redirects to latest cube #1391

Merged
merged 5 commits into from
Mar 8, 2024
Merged

Conversation

bprusinowski
Copy link
Collaborator

@bprusinowski bprusinowski commented Mar 6, 2024

Fixes #1390.

I think the problem was that we didn't treat the cube with version "2023-2" as versioned cube and failed to fetch latest iri. This PR solves this on a SPARQL query level (and removes relying on checking if a cube is versioned by a heuristic).

With this change, we try to look for newest version of the cube if an older version was passed in the URL (respecting published status).

How to test

PR

  1. Go to this link (NFI/2023-02).
  2. ✅ See that the latest version of the cube has been loaded.

TEST

  1. Go to this link (NFI/2023-02).
  2. ❌ See that there's a cube not found error.

@bprusinowski bprusinowski changed the title fix: Redirects to unversioned cubes fix: Redirects to latest cube Mar 6, 2024
Copy link

vercel bot commented Mar 6, 2024

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 Mar 7, 2024 2:44pm

@bprusinowski bprusinowski marked this pull request as ready for review March 6, 2024 15:54
@bprusinowski bprusinowski requested a review from ptbrowne as a code owner March 6, 2024 15:54
@Rdataflow
Copy link
Contributor

huh, the current state of this PR breaks unversioned cubes like i.e. eletricity price

@bprusinowski bprusinowski force-pushed the fix/redirects-to-latest-cube branch from a050eff to 106b48c Compare March 6, 2024 16:22
@bprusinowski
Copy link
Collaborator Author

Thanks for catching this @Rdataflow, I corrected the query 🤞

@Rdataflow
Copy link
Contributor

@bprusinowski according to my tests it works as expected now for versioned (superseeded and current) [i.e. NFI] as well as non-versioned [i.e. electricity prices] 👍

@bprusinowski bprusinowski marked this pull request as ready for review March 7, 2024 10:23
Copy link
Collaborator

@ptbrowne ptbrowne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !

@bprusinowski bprusinowski merged commit 0ffb970 into main Mar 8, 2024
6 checks passed
@bprusinowski bprusinowski deleted the fix/redirects-to-latest-cube branch March 8, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't preview an old version of a cube
3 participants