Support one-shot agent execution mode#6150
Conversation
- Added log message before canceling in error case. - Return after calling ctxCancel. - This makes the control flow for the single-workflow case match what it was in the original implementation of woodpecker-ci#4019. As of commit 5c9fc61, the 'err' value is never propagated to the caller, so this implementation returns nil. - Fixed grammar in startup log message.
- Changes provided in review by qwerty287. Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
|
I built and ran the latest revisions and it looks good from my end. |
|
Surge PR preview deployment succeeded. View it at https://woodpecker-ci-woodpecker-pr-6150.surge.sh |
|
Thanks! Wouldn't it be better to directly use the |
I'll defer to you on which way it should operate. I tried changing it to call |
|
@6543 you introduced this |
|
I studied |
|
@cliffmccarthy please have some patience. @6543 will check this out when he has time for it... |
|
Thanks for following up! There's no rush from my end; feel free to proceed with this PR and any revisions as you see fit whenever your schedule allows. |
|
@6543 pinging you again… :) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6150 +/- ##
=======================================
Coverage 34.18% 34.18%
=======================================
Files 426 426
Lines 28528 28528
=======================================
Hits 9751 9751
Misses 17887 17887
Partials 890 890 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Removed WOODPECKER_ prefix from markdown heading, as per convention. Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This is an updated version of #4019, based on the current main branch. This supports the use case of having the agent itself be ephemeral, which may be useful in various situations, including use of the local backend.
See commit messages for details and revision history. The first commit preserves attribution to @theanurin, who wrote most of this change; I just rebased it and made minor revisions.