1
0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2026-10-24 16:59:19 +03:00

9 Commits

Author SHA1 Message Date
Erwan Leboucher
dee06d63ab fix(plugin): respect job timeout for environment lifetime (#1739)
Fixes  #1676

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1739
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-09-18 01:42:59 +00:00
Mathieu Fenniak
6095cb17bf fix: move environment-related description fields from capability to create RPC (#1719)
Fields that could vary between different environments in a plugin, such as the operating system identifier, are now returned in the `CreateResponse` rather than the `CapabilitiesResponse`.

Fixes #1677.

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1719
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-31 15:43:44 +00:00
Mathieu Fenniak
86dbc5c24b feat(plugin): allow streaming logs from start operation (#1713)
Fixes #1681.  Changes the response value of the `Start` RPC to a stream, so that it can output logs.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- features
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1713): <!--number 1713 --><!--line 0 --><!--description ZmVhdChwbHVnaW4pOiBhbGxvdyBzdHJlYW1pbmcgbG9ncyBmcm9tIHN0YXJ0IG9wZXJhdGlvbg==-->feat(plugin): allow streaming logs from start operation<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1713
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-27 15:20:21 +00:00
Mathieu Fenniak
8f6679eb6b fix(plugin): remove hard-coded 'mkdir -p' (#1710)
Fixes #1673

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1710
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2026-08-25 19:49:52 +00:00
Renovate Bot
5d7b46ed25 Update module mvdan.cc/gofumpt to v0.11.0 (#1709)
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [mvdan.cc/gofumpt](https://github.com/mvdan/gofumpt) | `v0.10.0` โ†’ `v0.11.0` | ![age](https://developer.mend.io/api/mc/badges/age/go/mvdan.cc%2fgofumpt/v0.11.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/mvdan.cc%2fgofumpt/v0.10.0/v0.11.0?slim=true) |

---

### Release Notes

<details>
<summary>mvdan/gofumpt (mvdan.cc/gofumpt)</summary>

### [`v0.11.0`](https://github.com/mvdan/gofumpt/blob/HEAD/CHANGELOG.md#v0110---2026-07-27)

[Compare Source](https://github.com/mvdan/gofumpt/compare/v0.10.0...v0.11.0)

Like v0.10.0, this release is based on Go 1.26's gofmt, and requires Go 1.25 or later.

The multi-line function call rule introduced in v0.10.0 proved controversial,
so it is now the extra rule `balance_calls`, disabled by default.
It is also narrowed to only place the closing parenthesis on its own line
when the opening parenthesis ends a line. See [#&#8203;74](https://github.com/mvdan/gofumpt/issues/74).

Avoid crashing when compiled with tinygo for Wasm, which lacks recover support,
by detecting commented-out code without the parser's bailout panic. See [#&#8203;230](https://github.com/mvdan/gofumpt/issues/230).

Produce stable output in a single pass when a lone var declaration is adjacent
to a single-element var group, which previously required a second run. See [#&#8203;355](https://github.com/mvdan/gofumpt/issues/355).

Keep the parentheses around an expression which begins with a composite literal
of the form `T{...}`, such as `(s{}.Foo())`, as they are required when the
expression starts an `if`, `for`, or `switch` clause. See [#&#8203;356](https://github.com/mvdan/gofumpt/issues/356).

</details>

---

### Configuration

๐Ÿ“… **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)
- Automerge
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)

๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

โ™ป **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4zOS4zIiwidXBkYXRlZEluVmVyIjoiNDQuMzkuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiS2luZC9EZXBlbmRlbmN5VXBkYXRlIiwicnVuLWVuZC10by1lbmQtdGVzdHMiXX0=-->

Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1709
2026-08-25 03:04:16 +00:00
Mathieu Fenniak
fef7d81f38 fix(plugin): clarify content of ExecOutput to having one type of data at a time (#1705)
Fixes #1678.  Rather than returning a stream of chunks that may have stdout/stderr data, and may have an exit code, and may have an error message, separates them into three different messages and uses protobuf's `oneof` message type to allow one-and-only-one to be streamed at a time.

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1705
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-24 19:45:04 +00:00
Mathieu Fenniak
dcd2277b33 chore: add documentation of concurrency & cancellation to plugin protocol (#1699)
Fixes #1675, clarifies requirements for automatic implementation of #1682.

Requirements documented here have been experimentally verified w/ runn-systemd-nspawn resulting in [cancellation fixes](https://codeberg.org/mfenniak/runner-systemd-nspawn/pulls/22) to that implementation.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1699): <!--number 1699 --><!--line 0 --><!--description Y2hvcmU6IGFkZCBkb2N1bWVudGF0aW9uIG9mIGNvbmN1cnJlbmN5ICYgY2FuY2VsbGF0aW9uIHRvIHBsdWdpbiBwcm90b2NvbA==-->chore: add documentation of concurrency & cancellation to plugin protocol<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1699
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-24 19:44:34 +00:00
Mathieu Fenniak
cc052b63e3 fix: remove duplicate working directory & environment from plugin protocol (#1686)
Fixes #1679.

Rather than specifying `env` and `working_dir` in both the `CreateRequest` and `ExecRequest`, the runner will provide the complete information in the `ExecRequest`.  This simplifies a plugin author's job by providing just have one source of this information when executing commands.

Separate from the mock testing performed here, I've integration tested this with workflow-level, job-level, and step-level environment variables, and confirmed that they are all set and override each other as expected.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1686): <!--number 1686 --><!--line 0 --><!--description Zml4OiByZW1vdmUgZHVwbGljYXRlIHdvcmtpbmcgZGlyZWN0b3J5ICYgZW52aXJvbm1lbnQgZnJvbSBwbHVnaW4gcHJvdG9jb2w=-->fix: remove duplicate working directory & environment from plugin protocol<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1686
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-22 16:11:51 +00:00
Erwan Leboucher
55b6724479 feat(plugin): add experimental gRPC v1alpha plugin backend support (#1500)
Implements an experimental gRPC protocol for plugable backend systems, per https://code.forgejo.org/forgejo/forgejo-actions-feature-requests/issues/107#issuecomment-85284.

---

(Notes from @mfenniak, Forgejo merger):

Implements an experimental gRPC protocol for plugable backend systems, per https://code.forgejo.org/forgejo/forgejo-actions-feature-requests/issues/107#issuecomment-85284.  This allows future development of new job container execution models, such as Firecracker VMs, qEMU VMs, systemd-nspawn containers, Kubernetes pods, etc.

As an v1alpha protocol, the protocol is subject to change with no stability guarantees at the moment.

As an experimental feature, the Forgejo team is not yet willing to fully commit that this feature will be a permanent addition.  We believe it is a good direction, and we believe we can continue to iterate it to a fully supportable and capable feature based upon feedback from ourselves and other users.  But as that feedback is collected and incorporated, we leave open the possibility that we may gain new knowledge and be required to change direction.

---

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- features
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1500): <!--number 1500 --><!--line 0 --><!--description ZmVhdChwbHVnaW4pOiBhZGQgZXhwZXJpbWVudGFsIGdSUEMgdjFhbHBoYSBwbHVnaW4gYmFja2VuZCBzdXBwb3J0-->feat(plugin): add experimental gRPC v1alpha plugin backend support<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1500
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-08-16 00:37:20 +00:00