Manual Deploy Jobs Remain in Waiting State and Retrigger Build #2941
Satyajeet Patil opened 3 weeks ago

Hi @robin ,

After upgrading OneDev from 13.0.0 to 15.0.0, we started seeing an issue with our pipelines. We have several manual deploy jobs that depend on a build job. Normally, the build job is triggered automatically when code is pushed to a branch. However, after the upgrade, when we manually trigger a deploy job, the build job starts again instead of using the existing successful build. At the same time, the deploy job remains in the Waiting state until the new build finishes. We are specifically seeing this behavior in the following cases:

  • When a deploy job fails and we click Rerun on the failed deploy job.
  • When we rerun a deploy job that had already completed successfully. In both cases, the build job is triggered again, which was not the behavior in OneDev 13.0.0.

Could you please let us know: Is this a known issue or bug in OneDev 15.0.0? Or is there any new setting or configuration required to prevent the build job from being triggered again when rerunning a manual deploy job?

Thank you.

  • Service Desk commented 3 weeks ago

    This is expected behavior in OneDev 15.0.0, not a bug or misconfiguration.

    What changed

    OneDev 15.0.0 added the ability to re-run dependency jobs when you re-run a job (see OneDev 15 release notes and issue #2735).

    • Before (e.g. 13.0.0): Rerunning a finished deploy job reused already successful dependency builds. Only unsuccessful required dependencies were resubmitted.
    • From 15.0.0: Rerunning a finished job also resubmits its job dependencies. The deploy build stays in Waiting until those dependency builds finish, then continues. That matches what you are seeing for both failed and successful deploy reruns.

    There is currently no setting to restore the old “reuse successful dependencies on Rerun” behavior.

    First-time run vs Rerun

    If you run a deploy job for a commit for the first time (not Rerun on an existing deploy build), OneDev still resolves job dependencies against existing builds for the same commit / job / parameters when they already exist. The new always-rerun-dependencies behavior applies specifically when you Rerun an existing build.

    Next step

    If you need an option such as “Rerun this job only; keep successful dependencies”, please say so and we can track that as an improvement. Otherwise, this question can be closed as answered.

  • Robin Shen commented 3 weeks ago

    This will be addressed in OD-2949

  • Robin Shen changed state to 'Closed' 3 weeks ago
    Previous Value Current Value
    Open
    Closed
  • Satyajeet Patil commented 2 weeks ago

    Hi @robin ,

    Thanks for the clarification.

    Yes, we'd like this to be tracked as an improvement.

    Our expectation is that when rerunning a job, only the selected job should be rerun, while any successful dependency jobs should be reused and not triggered again. Only failed or missing dependencies should be rerun if required.

    This behavior would help reduce unnecessary execution time and resource usage.

    Thanks!

  • Satyajeet Patil commented 2 weeks ago

    Hi @robin ,

    Thanks for the clarification.

    Yes, we'd like this to be tracked as an improvement.

    Our expectation is that when rerunning a job, only the selected job should be rerun, while any successful dependency jobs should be reused and not triggered again. Only failed or missing dependencies should be rerun if required.

    This behavior would help reduce unnecessary execution time and resource usage.

    Thanks!

  • Service Desk commented 2 weeks ago

    Thanks for confirming.

    Your expected behavior—rerun only the selected job, reuse successful dependencies, and only rerun failed or missing ones—is tracked in issue OD-2949. That improvement has already been completed and shipped in OneDev 16.4.0.

    After upgrading to 16.4.0 or later, rerunning a deploy job should no longer retrigger successful upstream/dependency builds. Please comment here if anything still looks wrong after upgrading.

1/1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2941
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover