Skip to content

Avoid duplicate selection step enqueueing#5675

Open
ydah wants to merge 1 commit into
rmosolgo:masterfrom
ydah:fix-selections-step-duplicate-enqueue
Open

Avoid duplicate selection step enqueueing#5675
ydah wants to merge 1 commit into
rmosolgo:masterfrom
ydah:fix-selections-step-duplicate-enqueue

Conversation

@ydah

@ydah ydah commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Prevent SelectionsStep from enqueueing field steps from previous selection groups more than once. continue_selections was initialized outside the group loop, so each group retained and re-enqueued every step collected from earlier groups.

For example, two groups containing first and second were enqueued as [first, first, second]. This change scopes continue_selections to each group, producing [first, second].

@rmosolgo

Copy link
Copy Markdown
Owner

Interesting ... I think the CI failures are real here. IIRC this array has something do about directives which pause execution. But I see what you mean about this array accumulating things outside of scope.

Another possible fix could be here:

continue_selections.each do |frs|
@runner.add_step(frs)
end

Maybe we could do a continue_selections.clear after the steps are all passed along. (That would also let us keep using the same Array instance.)

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.

2 participants