Skip to content

Fix resolve_entry returning raw String for non-leader workers#380

Open
ianks wants to merge 1 commit intomainfrom
ianks/fix-resolve-entry-raw-string
Open

Fix resolve_entry returning raw String for non-leader workers#380
ianks wants to merge 1 commit intomainfrom
ianks/fix-resolve-entry-raw-string

Conversation

@ianks
Copy link
Contributor

@ianks ianks commented Mar 25, 2026

Situation

#375 (lazy loading & streaming) introduced a regression: resolve_entry returns a raw String when neither @index nor entry_resolver is set. This affects every non-leader worker in eager mode — only the leader calls populate() to set @index, so followers crash with NoMethodError: undefined method 'queue_entry' for an instance of String. Found while testing #378 on a real pipeline.

Execution

Call configure_lazy_queue in the eager mode path of queue_population_strategy.rb so all workers get an entry_resolver fallback — in eager mode the classes are already loaded, so LazyEntryResolver handles them fine. As defense-in-depth, resolve_entry's final fallback now returns an UnresolvedEntry Struct (with .id and .queue_entry) instead of a bare string, so downstream callers never crash even if the resolver is somehow missing.

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
@ianks ianks force-pushed the ianks/fix-resolve-entry-raw-string branch from 2496b47 to c04081f Compare March 25, 2026 19:38
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