Introduce ActionRunAttempt to represent each execution of a run#37119
Introduce ActionRunAttempt to represent each execution of a run#37119silverwind merged 167 commits intogo-gitea:mainfrom
ActionRunAttempt to represent each execution of a run#37119Conversation
3da69e5 to
7f338dd
Compare
RunAttempt to represent each execution of a runActionRunAttempt to represent each execution of a run
If you don't want to include it here, there can be separate PR to make it accept unix timestamp (before this one) |
|
Hmm I can re-add but then it must be consistently used at all call sites, IIRC, there is more than 1. |
Extend the vendored component's datetime parsing to recognise integer/decimal/negative numeric strings as unix seconds, in addition to ISO 8601 handled by Date.parse. This lets callers bind raw int64-unix-seconds values from the Go backend directly. Simplifies three call sites that were doing `new Date(x * 1000).toISOString()` and removes the `runTriggeredAtIso` computed. Adds coverage for integer, fractional, negative, and partial-numeric inputs. Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
|
Fixed in 90f8f1a and made all 3 call sites use it. |
|
|
Go's time.Time.Unix() returns int64, never fractional; realistic backend timestamps bound to <relative-time> are always positive. Drop the negative and decimal branches so out-of-domain inputs fall through to Date.parse and render the fallback slot. Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
|
Tailored the implementation a bit more to backend in 515b595, only positive integers. |
But .... why it needs to pass empty string as fallback? Backend never sends empty value for it
And do we have a clear definition for what "relative-time" should do for Not blocker, but I just found it's difficult to understand. |
|
The previous code also had the 90f8f1a#diff-2694e5409a944101daf84d16093d51b87f3cb841def732a59c1e75ad3b1c35e6L21 |
* origin/main: Allow fast-forward-only merge when signed commits are required (go-gitea#37335) Introduce `ActionRunAttempt` to represent each execution of a run (go-gitea#37119) Move review request functions to a standalone file (go-gitea#37358) Fix repo init README EOL (go-gitea#37388) Fix org team assignee/reviewer lookups for team member permissions (go-gitea#37365) Remove external service dependencies in migration tests (go-gitea#36866) Extend issue context popup beyond markdown content (go-gitea#36908) # Conflicts: # routers/api/v1/repo/action.go # web_src/js/components/RepoActionView.vue
* origin/main: (127 commits) Refactor pull request view (1) (go-gitea#37380) Improve AGENTS.md (go-gitea#37382) Remove dead CSS (go-gitea#37376) Add pr-review e2e test and speed up e2e tests (go-gitea#37345) Drop Fomantic tab, checkbox and form patches (go-gitea#37377) fix: dump with default zip type produces uncompressed zip (go-gitea#37401) Allow fast-forward-only merge when signed commits are required (go-gitea#37335) Introduce `ActionRunAttempt` to represent each execution of a run (go-gitea#37119) Move review request functions to a standalone file (go-gitea#37358) Fix repo init README EOL (go-gitea#37388) Fix org team assignee/reviewer lookups for team member permissions (go-gitea#37365) Remove external service dependencies in migration tests (go-gitea#36866) Extend issue context popup beyond markdown content (go-gitea#36908) fix: commit status reporting (go-gitea#37372) Support for Custom URI Schemes in OAuth2 Redirect URIs (go-gitea#37356) Fix cmd tests by mocking builtin paths (go-gitea#37369) chore: upgrade Go version in devcontainer image to 1.26 (go-gitea#37374) Fix button layout shift when collapsing file tree in editor (go-gitea#37363) Update `Block a user` form (go-gitea#37359) Remove IsValidExternalURL/IsAPIURL and use IsValidURL at call sites (go-gitea#37364) ... # Conflicts: # modules/eventsource/event.go # tests/e2e/events.test.ts
* origin/main: (51 commits) Fix color regressions, add `priority` color (go-gitea#37417) [skip ci] Updated translations via Crowdin Stabilize e2e logout propagation test (go-gitea#37403) refactor: serve site manifest via `/assets/site-manifest.json` endpoint (go-gitea#37405) feat(security): set X-Content-Type-Options: nosniff by default (go-gitea#37354) Refactor pull request view (1) (go-gitea#37380) Improve AGENTS.md (go-gitea#37382) Remove dead CSS (go-gitea#37376) Add pr-review e2e test and speed up e2e tests (go-gitea#37345) Drop Fomantic tab, checkbox and form patches (go-gitea#37377) fix: dump with default zip type produces uncompressed zip (go-gitea#37401) Allow fast-forward-only merge when signed commits are required (go-gitea#37335) Introduce `ActionRunAttempt` to represent each execution of a run (go-gitea#37119) Move review request functions to a standalone file (go-gitea#37358) Fix repo init README EOL (go-gitea#37388) Fix org team assignee/reviewer lookups for team member permissions (go-gitea#37365) Remove external service dependencies in migration tests (go-gitea#36866) Extend issue context popup beyond markdown content (go-gitea#36908) fix: commit status reporting (go-gitea#37372) Support for Custom URI Schemes in OAuth2 Redirect URIs (go-gitea#37356) ...




This PR introduces a new
ActionRunAttemptmodel and makes Actions execution attempt-scoped.Main Changes
ActionRunAttempt. The triggered jobs are then associated with this newActionRunAttemptrecord.ActionRunAttemptrecord for the workflow runActionRunJobrecords for the newActionRunAttemptrerunPlanto manage each rerun and refactored rerun flow into a two-phase plan-based model:buildRerunPlanexecRerunPlanRerunFailedWorkflowRunandRerunFailedno longer directly derives all jobs that need to be rerun; this step is now handled bybuildRerunPlan.RunAttemptID/actions/runs/{run_id})/actions/runs/{run_id}/attempts/{attempt_num})/repos/{owner}/{repo}/actions/runs/{run}/attempts/{attempt}/repos/{owner}/{repo}/actions/runs/{run}/attempts/{attempt}/jobsMAX_RERUN_ATTEMPTSCompatibility
LatestAttemptID = 0and legacy jobs useRunAttemptID = 0. Therefore, these fields can be used to identify legacy runs and jobs and provide backward compatibility.ActionRunAttemptwithattempt=1will be created to represent the original execution. Then a newActionRunAttemptwithattempt=2will be created for the real rerun.RunAttemptID = 0.Improvements
run_attemptsemantics are now aligned with GitHub.Screenshots
Run with only one attempt:
Rerunning:
Latest attempt:
Previous attempt (rerun is not allowed):
Dropdown for attempt records: