Skip to content

[26.0] Fix infinite request loop on dataset preview fetch failure#21881

Merged
mvdbeek merged 3 commits intogalaxyproject:release_26.0from
dannon:fix/dataset-preview-request-loop
Feb 20, 2026
Merged

[26.0] Fix infinite request loop on dataset preview fetch failure#21881
mvdbeek merged 3 commits intogalaxyproject:release_26.0from
dannon:fix/dataset-preview-request-loop

Conversation

@dannon
Copy link
Copy Markdown
Member

@dannon dannon commented Feb 18, 2026

When navigating to a dataset preview for a dataset you can't access (or with a bad ID), the useKeyedCache composable would retry the failed fetch indefinitely. On error, nothing was written to storedItems, so the next reactive evaluation of getItemById would see undefined and fire off another request. This adds a check against loadingErrors to stop that loop, and updates DatasetView to show an error message instead of spinning forever.

Fixes #21863

When navigating to a dataset preview for a dataset you don't have
access to (or with an invalid ID), the useKeyedCache composable would
retry the failed fetch indefinitely. On error, nothing was written to
storedItems, so the next reactive evaluation of getItemById would see
undefined and trigger another fetch. Now getItemById skips re-fetching
when a loadError is already recorded for that ID. Also updated
DatasetView to show an error message instead of spinning forever.

Fixes galaxyproject#21863
@github-actions github-actions Bot changed the title Fix infinite request loop on dataset preview fetch failure [26.0] Fix infinite request loop on dataset preview fetch failure Feb 18, 2026
@github-actions github-actions Bot added this to the 26.1 milestone Feb 18, 2026
Comment thread client/src/composables/keyedCache.ts Outdated
return (id: string) => {
const item = storedItems.value[id];
if (shouldFetch(item)) {
// TODO: consider allowing retries for transient errors (e.g. 5xx, network)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should probably also keep going on 429 ... could you give that a shot ? We do have rate limiting on on usegalaxy.org

Adds an ApiError class that preserves HTTP status codes from API
responses. The keyedCache now distinguishes transient errors (429, 5xx)
from permanent ones (403, 404) -- transient errors get up to 3 retry
attempts while permanent errors stop immediately. Updated
fetchDatasetDetails to use rethrowSimpleWithStatus so the status code
propagates through to the cache layer.
@dannon
Copy link
Copy Markdown
Member Author

dannon commented Feb 18, 2026

One note, there are a bunch of other stores also using useKeyedCache with a plain rethrowSimple that may need review? Not sure we want to do that against 26.0 at this point, but worth considering moving forward that these should use consistent retry handling.

@ahmedhamidawan ahmedhamidawan modified the milestones: 26.1, 26.0 Feb 19, 2026
@mvdbeek mvdbeek merged commit 734a2c8 into galaxyproject:release_26.0 Feb 20, 2026
29 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in Galaxy Dev - weeklies Feb 20, 2026
@itisAliRH itisAliRH deleted the fix/dataset-preview-request-loop branch March 9, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

3 participants