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

Re-adding formatter when SQL cache is enabled #300

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

MbolotSuse
Copy link
Contributor

Issue

This was the root cause of a few UI issues (at minimum rancher/dashboard#12262).

Previously, the formatter for state/relationships was disabled when the sql cache was enabled, since a transform function was adding those values before they were added to the cache. However, the get/watch calls currently don't use the cache, causing the state/relationships to be missing.

Solution

The formatter now runs even when the cache is enabled. This will cause some duplication (i.e. on list requests, the already existing state and relationships will be overridden and re-calculated), but that's acceptable in order to make sure that they are present on all request types.

@MbolotSuse MbolotSuse requested a review from a team as a code owner October 17, 2024 16:27
@MbolotSuse MbolotSuse requested review from moio and tomleb October 17, 2024 16:29
Previously, the formatter for state/relationships was disabled when the
sql cache was enabled, since a transform function was adding those
values before they were added to the cache. However, the get/watch calls
currently don't use the cache, causing the state/relationships to be
missing.
Copy link
Contributor

@moio moio left a comment

Choose a reason for hiding this comment

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

LGTM

@MbolotSuse MbolotSuse merged commit f6c6ca8 into rancher:main Oct 18, 2024
1 check passed
MbolotSuse added a commit to MbolotSuse/steve that referenced this pull request Oct 29, 2024
Previously, the formatter for state/relationships was disabled when the
sql cache was enabled, since a transform function was adding those
values before they were added to the cache. However, the get/watch calls
currently don't use the cache, causing the state/relationships to be
missing.
MbolotSuse added a commit that referenced this pull request Oct 31, 2024
Previously, the formatter for state/relationships was disabled when the
sql cache was enabled, since a transform function was adding those
values before they were added to the cache. However, the get/watch calls
currently don't use the cache, causing the state/relationships to be
missing.
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.

3 participants