forgejo/models
Andreas Ahlenstorf 72b35c5a73 feat: display detailed action run diagnostics (#9966)
Forgejo Actions allows variables in `jobs.<job_id>.runs-on`. However, the action list [skips checking whether a suitable runner](c3412d0579/routers/web/repo/actions/actions.go (L114-L148)) is available if an expression contains variables. That hampers a user's ability to figure out whether an expression was evaluated correctly and why a job might not be picked up by an available runner.

This PR adds the ability to surface more complex and additional diagnostic information on the action view screen. Previously, only a job's status (waiting, running, ...) was displayed. Now, extended messages like "Waiting for a runner with the following labels: docker, trixie" are displayed with the possibility to show multiple messages simultaneously.

How it looked before:

![old](/attachments/019e4e83-d44e-4143-8df0-7fceb611a3bd)

How it looks after updating Forgejo without reloading the window:

![old-after-update](/attachments/e909af81-cf9e-4f44-a011-75585a2d1950)

How it looks afterwards with a single label:

![new-single-label](/attachments/72f4a862-e23d-4ab5-9f96-09545954f982)

How it looks afterwards with multiple labels:

![new-multiple-labels](/attachments/53036d7b-3589-4eeb-bad1-4da4cd5ff4b5)

## 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...
  - [x] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [x] 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

- [ ] 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/<pull request number>.md` to be be used for the release notes instead of the title.

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/9966): <!--number 9966 --><!--line 0 --><!--description ZGlzcGxheSBkZXRhaWxlZCBhY3Rpb24gcnVuIGRpYWdub3N0aWNz-->display detailed action run diagnostics<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9966
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Co-authored-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
Co-committed-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
2025-11-11 04:39:02 +01:00
..
actions feat: display detailed action run diagnostics (#9966) 2025-11-11 04:39:02 +01:00
activities chore: Remove IsDeleted from action (activity) table (#9829) 2025-11-08 04:20:05 +01:00
admin feat: use keying for task secrets (#9923) 2025-11-03 13:42:32 +01:00
asymkey feat: ensure only expected ssh public keys are in authorized_keys file (#10010) 2025-11-09 01:06:04 +01:00
auth feat: add foreign keys to forgejo_auth_token (#9886) 2025-10-29 01:09:06 +01:00
avatars chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
db feat: add foreign keys to table pull_request (#9832) 2025-10-24 18:02:14 +02:00
dbfs Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
fixtures feat: allow/disallow users to run workflows when pushing to a pull request from a fork (#9397) 2025-11-09 01:40:29 +01:00
forgefed Federated user activity following: Isolated model changes (#8078) 2025-06-21 12:02:58 +02:00
forgejo/semver Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
forgejo_migrations feat: allow/disallow users to run workflows when pushing to a pull request from a fork (#9397) 2025-11-09 01:40:29 +01:00
forgejo_migrations_legacy fix: strict error handling on corrupted DB migration tracking tables (#9773) 2025-10-20 18:03:30 +02:00
git feat: always publish the link to the commit status (#8177) 2025-06-13 12:41:34 +02:00
gitea_migrations feat: add ActionUser model & fields to ActionRun 2025-11-06 11:07:38 +01:00
issues feat: allow/disallow users to run workflows when pushing to a pull request from a fork (#9397) 2025-11-09 01:40:29 +01:00
moderation feat(build): improve lint-locale-usage further (#8736) 2025-08-27 23:47:34 +02:00
organization fix: prevent orgs from being added as members of orgs (#9757) 2025-11-08 22:05:21 +01:00
packages fix: replace limit/offset pagination in debian SearchPackages (#9892) 2025-10-29 09:57:55 +01:00
perm feat: add foreign keys to the access table (#9557) 2025-10-14 05:39:47 +02:00
project feat(build): improve lint-locale-usage further (#8736) 2025-08-27 23:47:34 +02:00
pull fix: do not ignore automerge while a PR is checking for conflicts (#8189) 2025-06-17 10:58:07 +02:00
quota fix: quotas double counting repo size when calculating size:all (#9234) 2025-09-11 16:30:04 +02:00
repo fix: prevent deadlocks updating repo.num_action_runs/num_closed_action_runs (#9927) 2025-11-02 22:24:56 +01:00
secret feat: migrate action secrets to keying to store them more securely (#8692) 2025-07-29 01:03:36 +02:00
shared/types chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
system Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
unit feat(build): add support for the base.Messenger, $.locale.Tr, Form structs to lint-locale-usage (#9095) 2025-09-30 03:25:45 +02:00
unittest fix: reduce deadlocks merging PRs by using caching for repo issue count stats (#9922) 2025-10-31 23:50:05 +01:00
user fix: prevent orgs from being added as members of orgs (#9757) 2025-11-08 22:05:21 +01:00
webhook fix: paginate GET /api/v1/admin/hooks response (#9915) 2025-11-06 00:08:13 +01:00
error.go fix: don't allow credentials in migrate/push mirror URL 2025-08-30 08:07:23 +02:00
main_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
org.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
org_team.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
org_team_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
org_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
repo.go fix: reduce deadlocks merging PRs by using caching for repo issue count stats (#9922) 2025-10-31 23:50:05 +01:00
repo_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
repo_transfer.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
repo_transfer_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00