Fix resolve_entry returning raw String for non-leader workers#380
Open
Fix resolve_entry returning raw String for non-leader workers#380
Conversation
PR #375 introduced a regression where resolve_entry falls through to returning a raw String when neither @index nor entry_resolver is set. This happens for every non-leader worker in eager mode, crashing downstream callers with NoMethodError on queue_entry. Two-part fix: - Call configure_lazy_queue in the eager mode path so all workers get an entry_resolver fallback - Add UnresolvedEntry Struct as defense-in-depth so resolve_entry never returns a bare String
2496b47 to
c04081f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Situation
#375 (lazy loading & streaming) introduced a regression:
resolve_entryreturns a raw String when neither@indexnorentry_resolveris set. This affects every non-leader worker in eager mode — only the leader callspopulate()to set@index, so followers crash withNoMethodError: undefined method 'queue_entry' for an instance of String. Found while testing #378 on a real pipeline.Execution
Call
configure_lazy_queuein the eager mode path ofqueue_population_strategy.rbso all workers get anentry_resolverfallback — in eager mode the classes are already loaded, soLazyEntryResolverhandles them fine. As defense-in-depth,resolve_entry's final fallback now returns anUnresolvedEntryStruct (with.idand.queue_entry) instead of a bare string, so downstream callers never crash even if the resolver is somehow missing.