-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrect action duration time when rerun the job before executed once #28364
Conversation
ae5363f
to
3074f52
Compare
You are right. But it seems that the suggestion doesn't right. @wolfogre |
Convert |
It could happen, such as the run contains two jobs, the first one started and stopped yesterday and you rerun another job today. Then the duration of the run will be very long.
I'm not sure. The point is, how do you define the duration of a run? Jobs in a run could execute concurrently. Think about this: the run contains 100 jobs, all of them started at 9:00 and stopped at 9:01. So, would you say the run lasted for 1 minute or 100 minutes? I prefer 1 minute because I just want to know how much time I need to wait, instead of how much work time the runner takes. Let's say it's pretty clear but "rerun some or all jobs of a run" makes it complex. So I know that my patch is not perfect, but it's good enough for me.
It couldn't be right while Gitea now treats some works before any step as
I don't think the issue exists. Steps execute sequentially, and the job will be completely reset when you rerun it. While you cannot completely reset a run when rerun some jobs of it. Gitea doestn't support rerun a run yet, it's just "rerun all jobs of it". |
Ah, I'm considering this problem under the premise that runner can only run one task at once. 😕 |
I prefer For example, the run contains 100 jobs, all of them started at 9:00 and stopped at 9:01 today. And I rerun one of them at 9:00 today, and it stopped at 9:01. In another way, as a quick fix, maybe your solution is good enough. |
Sorry, I don't think it's a good idea to maintain Think about this:
So the run's duration is 5m while the job2's is 15m. |
Then we only reset start time when it is done? |
It makes sense, and I didn't find any logical loopholes. But I think it could be simpler if:
|
This sounds better. Let's do it. 😄
I agree. My previous plan is only creating the new column in the migration. |
Migration seems strange. v284.go is not used. |
|
I was unable to create a backport for 1.21. @yp05327, please send one manually. 🍵
|
* giteaofficial/main: [skip ci] Updated licenses and gitignores Prevent anonymous container access if `RequireSignInView` is enabled (go-gitea#28877) Don't show new pr button when page is not compare pull (go-gitea#26431) Avoid duplicate JS error messages on UI (go-gitea#28873) Fix branch list bug which displayed default branch twice (go-gitea#28878) Revert adding htmx until we finaly decide to add it (go-gitea#28879) Don't do a full page load when clicking the follow button (go-gitea#28872) Don't do a full page load when clicking the subscribe button (go-gitea#28871) Fix incorrect PostgreSQL connection string for Unix sockets (go-gitea#28865) Run `npm audit fix` (go-gitea#28866) Fix migrate storage bug (go-gitea#28830) Set the `isPermaLink` attribute to `false` in the `guid` sub-element (go-gitea#28860) In administration documentation about environment variables, point to those for the Go runtime instead of Go compiler (go-gitea#28859) Move doctor package from modules to services (go-gitea#28856) Add support for sha256 repositories (go-gitea#23894) Fix incorrect action duration time when rerun the job before executed once (go-gitea#28364) Fix some RPM registry flaws (go-gitea#28782) tests: missing refs/ in bare repositories (go-gitea#28844) Fix archive creating LFS hooks and breaking pull requests (go-gitea#28848)
… once (go-gitea#28364) Fix go-gitea#28323 Reason was mentioned here: go-gitea#28323 (comment) ### Changes: (maybe breaking) We can rerun jobs in Gitea, so there will be some problems in calculating duration time. In this PR, I use the exist `Started` and `Stopped` column to record the last run time instead of the total time, and add a new `PreviousDuration` column to record the previous duration time. You can also check the cost time of last run: ![image](https://github.com/go-gitea/gitea/assets/18380374/2ca39145-2c92-401a-b78b-43164f7ae061)
… once (go-gitea#28364) Fix go-gitea#28323 Reason was mentioned here: go-gitea#28323 (comment) ### Changes: (maybe breaking) We can rerun jobs in Gitea, so there will be some problems in calculating duration time. In this PR, I use the exist `Started` and `Stopped` column to record the last run time instead of the total time, and add a new `PreviousDuration` column to record the previous duration time. You can also check the cost time of last run: ![image](https://github.com/go-gitea/gitea/assets/18380374/2ca39145-2c92-401a-b78b-43164f7ae061)
Automatically locked because of our CONTRIBUTING guidelines |
Fix #28323
Reason was mentioned here: #28323 (comment)
Changes: (maybe breaking)
We can rerun jobs in Gitea, so there will be some problems in calculating duration time.
In this PR, I use the exist
Started
andStopped
column to record the last run time instead of the total time,and add a new
PreviousDuration
column to record the previous duration time.You can also check the cost time of last run: