Skip to content

Promote JobGetStuck into the pilot#1317

Open
brandur wants to merge 2 commits into
masterfrom
brandur-pilot-job-get-stuck
Open

Promote JobGetStuck into the pilot#1317
brandur wants to merge 2 commits into
masterfrom
brandur-pilot-job-get-stuck

Conversation

@brandur

@brandur brandur commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

While fixing up some bugs in the active rescue feature, I found that we
need to have slightly divergent variations of JobGetStuck for when the
rescuer is using the feature versus not.

It's possible to implement the variation entirely on the pro executor by
overriding JobGetStuck there, but doing so makes the code more
roundabout because you need to fetch an extra parameter off the pro
pilot. Things become more direct by instead making JobGetStuck a pilot
function and having two separate implementations, and this is also more
conventional elsewhere too.

While fixing up some bugs in the active rescue feature, I found that we
need to have slightly divergent variations of `JobGetStuck` for when the
rescuer is using the feature versus not.

It's possible to implement the variation entirely on the pro executor by
overriding `JobGetStuck` there, but doing so makes the code more
roundabout because you need to fetch an extra parameter off the pro
pilot. Things become more direct by instead making `JobGetStuck` a pilot
function and having two separate implementations, and this is also more
conventional elsewhere too.
@brandur
brandur requested a review from bgentry July 21, 2026 00:27
Active-rescue pilots need to distinguish ordinary age-based rescue from newer jobs selected using producer liveness. Carry the batch's selection horizon into JobRescueMany so guarded updates can preserve standard rescue behavior.
@brandur

brandur commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Also added one extra commit here for passing a stuck horizon down into the function. This was needed to fix another bug Codex identified in the active job rescue branch. It's a pretty small change though.

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