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

Merge and replace multiple preloads ourselves #14

Closed
wants to merge 2 commits into from

Conversation

jhollinger
Copy link
Contributor

@jhollinger jhollinger commented May 14, 2024

Rails is supposed to handle things gracefully when one set of preloads is layered on top of another (e.g. when a Blueprinter's preloads are added to a query with existing preloads). We even have tests for it. But we're getting reports it may not be working in some cases - that sometimes the original, manually added preloads get (partially??) wiped out.

I haven't been able to duplicate it. But this PR would remove all ambiguity. Every time a Blueprint's preloads are added, they're merged into the existing preloads, instead of being added as a separate preload entry for Rails to deal with.

Has been tested against real-world preloads + autopreloads to ensure they merge as expected. Includes a version bump since this is a critical bugfix.

@jhollinger jhollinger force-pushed the fix-bad-preload-merge branch from 5976f52 to 4eefeaf Compare May 14, 2024 19:49
@jhollinger jhollinger force-pushed the fix-bad-preload-merge branch from 4eefeaf to 9ceeeba Compare May 14, 2024 21:21
Signed-off-by: Jordan Hollinger <[email protected]>
@jhollinger jhollinger force-pushed the fix-bad-preload-merge branch from b228b73 to 6fe663a Compare May 16, 2024 16:36
@jhollinger
Copy link
Contributor Author

Wasn't the cause.

@jhollinger jhollinger closed this May 21, 2024
@jhollinger jhollinger deleted the fix-bad-preload-merge branch May 21, 2024 16:59
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.

1 participant