Repository navigation
Conversation
…children When children of a reusable-workflow caller finish as Skipped, UpdateRunJob → RefreshReusableCallerStatus updates the caller in the DB, but the in-memory jobStatusResolver still holds the pre-cascade caller status. Jobs that `needs:` the caller then stay Pending forever (go-gitea#39587). Re-emit the run after such a cascade so a follow-up pass resolves dependants (and unsticks commit status for the caller, go-gitea#39586). Fixes go-gitea#39587
Contributor
|
Related to your PR @bircni ? |
Member
Yep |
Contributor
|
@mitre88 what do you think? (please discuss by human but not by AI) |
wxiaoguang
marked this pull request as draft
October 4, 2026 13:31
This branch has not been deployed
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.
Fixes #39587
Summary
When children of a reusable-workflow caller finish as
Skipped(schedulerif:),UpdateRunJobcascadesRefreshReusableCallerStatusand persists the caller asSuccessin the DB. The in-memoryjobStatusResolverstill holds the pre-cascade caller status, so a job thatneeds:the caller staysPendingforever and the run never completes.Change
After applying resolver updates for a non-caller job with
ParentJobID > 0, setcallerCascadedand add the run toRunIDsToReEmit(same pattern as caller/matrix expansion). A follow-up pass reloads jobs and resolves dependants.This should also unblock the stuck caller commit status described in #39586 once the run can finish.
Test
New regression:
Test_checkJobsOfCurrentRunAttempt_CallerCascadeReEmitsForDependants.AI assistance
This change was prepared with AI assistance. I reviewed the root-cause analysis in #39587, kept the patch minimal, and ran the unit tests above.