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 interference of entity prefetching data with store state #7207

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

kschiffer
Copy link
Contributor

@kschiffer kschiffer commented Jul 30, 2024

Summary

This quickfix fixes an issue with the entity fetching store logic in the Console redesign branch, related to how entities are prefetched for the top entities logic.

Changes

  • Introduce new actions for fetching entities without affecting the pagination store which stores the IDs of a particular pagination request
  • Update the create-request-logic middleware to allow for logics with multiple action types.

Testing

Steps
  1. Go to the application list view
  2. (As admin) click on the "All" tab
  3. Refresh
  4. See the correct tab being active and the correct entities being still shown

Notes for Reviewers

Some more background:
Previously I was using the regular GET_XXX_LIST-actions, which connect to the pagination reducer (pkg/webui/lib/store/reducers/pagination.js). This means that they store the list of IDs that are connected to the paginated requests, so that the Console can select them from the global list of entities and show them in the current list view. Currently the list actions run concurrently and whichever resolves last will win (I've also removed latest option for this reason), which can sometimes be the prefetch for the top entities. If we just fetch the entities to have them in the store, we don't want to mess with the pagination store, as they are not meant to be displayed the current list view. Hence, creating a new set of FETCH_XXX_LIST-actions which do the same as the regular GET_XXX_LIST except storing the IDs in the pagination store will resolve this issue.

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • Testing: The steps/process to test this feature are clearly explained including testing for regressions.
  • Infrastructure: If infrastructural changes (e.g., new RPC, configuration) are needed, a separate issue is created in the infrastructural repositories.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@kschiffer kschiffer added c/console This is related to the Console ui/web This is related to a web interface labels Jul 30, 2024
@kschiffer kschiffer self-assigned this Jul 30, 2024
@kschiffer kschiffer requested a review from a team as a code owner July 30, 2024 21:09
@kschiffer kschiffer requested review from mjamescompton and ryaplots and removed request for a team July 30, 2024 21:09
@kschiffer kschiffer merged commit 2d23233 into feature/console-redesign Aug 1, 2024
6 of 12 checks passed
@kschiffer kschiffer deleted the fix/top-entities-fetching branch August 1, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/console This is related to the Console ui/web This is related to a web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants