From 42114d262701c65c3b012b7b2d6141359fdcfa06 Mon Sep 17 00:00:00 2001 From: Mathieu Fenniak Date: Tue, 30 Dec 2025 02:31:23 +0100 Subject: [PATCH] fix: build-release workflow stops its own end-to-end checks when run concurrently (#10632) `build-release.yml` attempts to run an end-to-end check with a cascading PR, but it doesn't target the currently building branch. When two releases build simultaneously (eg. `forgejo/v14.0` and `forgejo`), whichever one starts the end-to-end test first is then "cancelled" by the second one as it pushes an update to the same branch. This will be a bit of an experimental change due to the difficulty in setting up a test environment. After merge, I intend to watch a v14 and forgejo build and verify that they are independent, and, that both are actually tested with the correct target build. This introduces a need to backport any changes to `.forgejo/cascading-release-end-to-end` in the future to maintain cascading functionality in all active releases. ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Tests - I added test coverage for Go changes... - [ ] in their respective `*_test.go` for unit tests. - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [x] I do not want this change to show in the release notes. - [ ] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/.md` to be be used for the release notes instead of the title. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10632 Reviewed-by: Michael Kriese Co-authored-by: Mathieu Fenniak Co-committed-by: Mathieu Fenniak --- .forgejo/cascading-release-end-to-end | 3 +++ .forgejo/workflows/build-release.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.forgejo/cascading-release-end-to-end b/.forgejo/cascading-release-end-to-end index 9be0737b0f..f78c3aeedb 100755 --- a/.forgejo/cascading-release-end-to-end +++ b/.forgejo/cascading-release-end-to-end @@ -2,6 +2,9 @@ set -ex +# WARNING: Changes to the behaviour of this file should be backported to all active releases, as it is used in +# `build-release.yml` from release branches. + end_to_end=$1 end_to_end_pr=$2 forgejo=$3 diff --git a/.forgejo/workflows/build-release.yml b/.forgejo/workflows/build-release.yml index 4a17e30174..7b38c27c83 100644 --- a/.forgejo/workflows/build-release.yml +++ b/.forgejo/workflows/build-release.yml @@ -206,7 +206,7 @@ jobs: origin-url: ${{ env.GITHUB_SERVER_URL }} origin-repo: ${{ github.repository }} origin-token: ${{ secrets.CASCADE_ORIGIN_TOKEN }} - origin-ref: refs/heads/forgejo + origin-ref: ${{ github.ref }} destination-url: https://code.forgejo.org destination-fork-repo: ${{ vars.CASCADE_DESTINATION_DOER }}/end-to-end destination-repo: forgejo/end-to-end