forgejo/models/fixtures
Mathieu Fenniak e311aa7cae fix: action view 'Re-run all jobs' leaves UI on the last attempt, not the new attempt (#9172)
In #9017, the ability to view older logs of an action run was added.  However, the 'Re-run all jobs' button was not updated in any way.  When viewing the logs for attempt 1 and clicking 'Re-run all jobs', the UI would continue to show the logs for attempt 1.  Before #9017 the behavior would have begun to view the logs from the re-run operation.

There are two commits in this PR:
- Update the `Rerun` view handler so that it redirects the user to the next attempt number for the job.
- The next attempt number isn't actually persisted to the DB until the rerun is picked up from a worker.  By pure coincidence, viewing an out-of-range attempt number was fully functional because it also happened to be viewing a job that wasn't picked up by a worker, and fell into those code paths.  However, as there were no automated tests around this codepath and it felt fragile, new tests have been added around the template render, backend data fetch, and frontend UI component, to ensure it continues to work in this corner-case in the future.

## 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

- [x] I do not want this change to show in the release notes. (_Note_: This is a fix for an unreleased regression, no need for 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.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9172
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2025-09-05 19:31:22 +02:00
..
ModerationFeatures fix: make sure to use unaltered fields when saving a shadow copy for updated profiles or comments (#8533) 2025-07-20 23:52:58 +02:00
PrivateIssueProjects fix: consider public issues for project boards (#7143) 2025-03-06 23:26:08 +00:00
TestActivateUserEmail fix: user activation with uppercase email address (#8367) 2025-07-02 13:04:22 +02:00
TestAddTeamReviewRequest fix: PR not blocked by review request for a whitelisted team (#8511) 2025-07-15 23:21:42 +02:00
TestGetUnmergedPullRequestsByHeadInfoMax Add codespell support and fix a good number of typos with its help (#3270) 2024-05-09 13:49:37 +00:00
TestGetUsedForUser fix: ignore expired artifacts for quota calculation (#7976) 2025-05-28 18:22:10 +02:00
TestPackagesGetOrInsertBlob fix: package_blob.has_blake2b may be null (#7520) 2025-04-11 12:28:03 +00:00
TestParseCommitWithSSHSignature [GITEA] Add noreply email address as verified for SSH signed Git commits 2024-02-05 16:09:40 +01:00
TestPrivateRepoProjects fix: consider issues in repository accessible via access table (#7270) 2025-03-19 16:45:42 +00:00
access.yml Allow non-admin users to delete review requests (#29057) 2024-02-26 22:30:27 +01:00
access_token.yml Fix more yaml lint errors (#27284) 2023-09-26 12:56:42 -04:00
action.yml fix: make the action feed resilient to database inconsistencies (#8617) 2025-07-22 23:40:30 +02:00
action_artifact.yml feat: artifacts can be downloaded using their id instead of their name (#8957) 2025-08-25 15:51:26 +02:00
action_run.yml feat: make action runs available in api (#7699) 2025-06-02 22:05:12 +02:00
action_run_job.yml fix: action view 'Re-run all jobs' leaves UI on the last attempt, not the new attempt (#9172) 2025-09-05 19:31:22 +02:00
action_runner.yml feat: auto cleanup of offline runners (#7803) 2025-06-08 00:13:37 +02:00
action_runner_token.yml Add unit tests for action runner token (#27670) 2023-10-19 07:24:24 +00:00
action_task.yml feat: ability to view previous logs for Actions runs that have been retried (#9017) 2025-09-04 22:46:22 +02:00
action_task_output.yml Fix missing outputs for jobs with matrix (#32823) 2024-12-15 10:14:21 +01:00
attachment.yml Allow get release download files and lfs files with oauth2 token format (#26430) 2023-10-01 10:41:52 +00:00
branch.yml fix: fix ci dashboard e2e test (#7338) 2025-03-26 00:19:31 +00:00
collaboration.yml Allow non-admin users to delete review requests (#29057) 2024-02-26 22:30:27 +01:00
comment.yml fix: load OldMilestone based on OldMilestoneID, not MilestoneID (#8330) 2025-06-29 12:08:03 +02:00
commit_status.yml feat: improve GetLatestCommitStatusForPairs 2024-11-16 13:23:40 +01:00
commit_status_index.yml Fix more yaml lint errors (#27284) 2023-09-26 12:56:42 -04:00
email_address.yml Allow non-admin users to delete review requests (#29057) 2024-02-26 22:30:27 +01:00
follow.yml fix(ui): ensure same width of usercards in grid (#6799) 2025-05-25 13:31:53 +02:00
forgejo_blocked_user.yml [MODERATION] User blocking 2024-02-05 15:56:45 +01:00
gpg_key.yml Fix verifyCommits error when push a new branch (#26664) 2023-08-30 02:27:53 +00:00
hook_task.yml chore: QoL improvements to tests (#7917) 2025-05-21 15:45:56 +02:00
issue.yml [FEAT] Adds x-mode-only anchor styles to display images based if the theme is light or dark mode. (#3985) 2024-06-09 10:50:53 +00:00
issue_assignees.yml Fix issue overview for teams (#19652) 2022-05-16 17:49:17 +08:00
issue_index.yml [MODERATION] User blocking 2024-02-05 15:56:45 +01:00
issue_label.yml Add Organization Wide Labels (#10814) 2020-04-01 01:14:46 -03:00
issue_user.yml [API] ListIssues add more filters (#16174) 2021-06-16 18:33:37 -04:00
issue_watch.yml Refactor Issues Subscription (#8738) 2019-11-20 22:50:54 +08:00
label.yml test: prevent XSS for label rendering 2025-06-27 13:27:06 +02:00
lfs_meta_object.yml test: LFS gc should not delete all metadata objects 2024-04-26 10:16:59 +02:00
milestone.yml Add some api integration tests (#18872) 2022-10-18 00:23:27 +08:00
mirror.yml Fix bug of branches API with tests (#25578) 2023-07-01 10:52:52 +08:00
notice.yml Unit tests for models/admin 2017-01-09 21:49:51 +01:00
notification.yml [API] Add notification endpoint (#9488) 2020-01-09 11:56:32 +00:00
oauth2_application.yml test(oauth): RFC 6749 Section 10.2 conformance 2024-06-05 17:50:15 +02:00
oauth2_authorization_code.yml Record OAuth client type at registration (#21316) 2022-10-24 15:59:24 +08:00
oauth2_grant.yml Record OAuth client type at registration (#21316) 2022-10-24 15:59:24 +08:00
org_user.yml Allow non-admin users to delete review requests (#29057) 2024-02-26 22:30:27 +01:00
project.yml Add default board to new projects, remove uncategorized pseudo-board (#29874) 2024-03-30 07:17:31 +01:00
project_board.yml Add default board to new projects, remove uncategorized pseudo-board (#29874) 2024-03-30 07:17:31 +01:00
project_issue.yml Kanban board (#8346) 2020-08-16 23:07:38 -04:00
protected_tag.yml Protected tag is no internal server error (#30962) 2024-05-19 13:12:35 +02:00
public_key.yml Fix more yaml lint errors (#27284) 2023-09-26 12:56:42 -04:00
pull_request.yml fix: remove artificial delay for PR update (#7773) 2025-05-04 21:54:55 +00:00
reaction.yml Fix more yaml lint errors (#27284) 2023-09-26 12:56:42 -04:00
release.yml [GITEA] Improve HTML title on repositories 2024-02-05 16:05:50 +01:00
renamed_branch.yml Add a simple way to rename branch like gh (#15870) 2021-10-08 19:03:04 +02:00
repo_redirect.yml chore: add repo redirect unit test 2025-08-30 09:37:38 +02:00
repo_topic.yml Add API endpoint for accessing repo topics (#7963) 2019-09-03 23:46:24 +08:00
repo_transfer.yml Repository transfer has to be confirmed, if user can not create repo for new owner (#14792) 2021-03-01 01:47:30 +01:00
repo_unit.yml feat: make action runs available in api (#7699) 2025-06-02 22:05:12 +02:00
repository.yml feat: show more relevant results for 'dependencies' dropdown (#8003) 2025-06-26 20:06:21 +02:00
review.yml Fix the logic of finding the latest pull review commit ID (#32139) 2024-10-06 07:44:28 +02:00
star.yml Unit tests for models/star (#752) 2017-01-25 18:37:10 +08:00
stopwatch.yml [API] extend StopWatch (#9196) 2019-12-11 23:23:05 -05:00
system_setting.yml disable gravatar in test (#32529) 2024-11-24 15:42:36 +00:00
team.yml fix: always render detailed team permissions table in sidebar (#8108) 2025-06-09 10:37:31 +02:00
team_repo.yml Allow non-admin users to delete review requests (#29057) 2024-02-26 22:30:27 +01:00
team_unit.yml fix: always render detailed team permissions table in sidebar (#8108) 2025-06-09 10:37:31 +02:00
team_user.yml Allow non-admin users to delete review requests (#29057) 2024-02-26 22:30:27 +01:00
topic.yml Add some api integration tests (#18872) 2022-10-18 00:23:27 +08:00
tracked_time.yml [API] Extend times API (#9200) 2019-12-27 20:30:58 +00:00
two_factor.yml feat: migrate TOTP secrets to keying 2024-11-27 00:34:16 +01:00
user.yml fix: always render detailed team permissions table in sidebar (#8108) 2025-06-09 10:37:31 +02:00
user_open_id.yml Show user OpenID URIs in their profile (#1314) 2017-03-20 09:31:08 +01:00
user_redirect.yml chore: add unit test 2025-08-30 09:37:30 +02:00
watch.yml [MODERATION] User blocking 2024-02-05 15:56:45 +01:00
webauthn_credential.yml [FEAT] Add support for webauthn credential level 3 2024-08-29 10:05:03 +02:00
webhook.yml test: webhook fix branch filter tests 2024-04-30 09:38:35 +02:00