Strange action errors in mirrored projects?! #13585

Closed
opened 2025-11-02 10:47:00 -06:00 by GiteaMirror · 38 comments
Owner

Originally created by @somera on GitHub (Oct 10, 2024).

Description

After update to 1.22.3 I see many of errors

image

in many mirrored projects?!

And than I saw this

image

or

image

or

image

or

image

What was activated with 1.22.3 release? What happens here?

Gitea Version

1.22.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.47.0

Operating System

Ubuntu 22.04.3 LTS x86_64

How are you running Gitea?

gitea-1.22.3-linux-amd64

Database

PostgreSQL

Originally created by @somera on GitHub (Oct 10, 2024). ### Description After update to 1.22.3 I see many of errors ![image](https://github.com/user-attachments/assets/b218c669-5ee7-4bd8-a778-44949c0ef8cc) in many mirrored projects?! And than I saw this ![image](https://github.com/user-attachments/assets/e3544d5d-8b7b-41b5-a8e8-22b2a484da30) or ![image](https://github.com/user-attachments/assets/d81af016-5d1f-4797-80df-8833fbbcf29d) or ![image](https://github.com/user-attachments/assets/df7319bd-bc81-4ab2-a178-c9b0ca9a40be) or ![image](https://github.com/user-attachments/assets/cee9a4f7-deb2-47b0-8810-ff0ec6deefde) What was activated with 1.22.3 release? What happens here? ### Gitea Version 1.22.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.47.0 ### Operating System Ubuntu 22.04.3 LTS x86_64 ### How are you running Gitea? gitea-1.22.3-linux-amd64 ### Database PostgreSQL
GiteaMirror added the topic/gitea-actionstype/bugissue/workaround labels 2025-11-02 10:47:00 -06:00
Author
Owner

@somera commented on GitHub (Oct 10, 2024):

I see that

image

are activated. But not for all mirror.

And I didn't activate it.

I have currently 319 mirrors with

select
	*
from
	repository
where
	is_mirror = true
and
	(num_action_runs > 0 or num_closed_action_runs > 0);

How can I check in the DB which mirrors has activated actions? I don't know the structure and I didn't find other corresponding columns.

@somera commented on GitHub (Oct 10, 2024): I see that ![image](https://github.com/user-attachments/assets/fc1522f3-baf4-4ed4-8765-1ef2a72411f0) are activated. But not for all mirror. And I didn't activate it. I have currently 319 mirrors with ``` select * from repository where is_mirror = true and (num_action_runs > 0 or num_closed_action_runs > 0); ``` How can I check in the DB which mirrors has activated actions? I don't know the structure and I didn't find other corresponding columns.
Author
Owner

@somera commented on GitHub (Oct 10, 2024):

How can I fix it?

I can't go over the whole list and do it manualy.

When I deacticate the Actions in one specific project than I see the error

image

and when I click on the x I get 404 error.

@somera commented on GitHub (Oct 10, 2024): How can I fix it? I can't go over the whole list and do it manualy. When I deacticate the Actions in one specific project than I see the error ![image](https://github.com/user-attachments/assets/d46f88f7-b0be-4ef9-892f-10af47a9dbee) and when I click on the x I get 404 error.
Author
Owner

@somera commented on GitHub (Oct 10, 2024):

@lunny ?

@somera commented on GitHub (Oct 10, 2024): @lunny ?
Author
Owner

@lunny commented on GitHub (Oct 10, 2024):

@lunny ?

I will take a look today

@lunny commented on GitHub (Oct 10, 2024): > @lunny ? I will take a look today
Author
Owner

@somera commented on GitHub (Oct 12, 2024):

@lunny I see more and more mirrors with ...

image

@somera commented on GitHub (Oct 12, 2024): @lunny I see more and more mirrors with ... ![image](https://github.com/user-attachments/assets/15b4b3bd-588b-457f-abd8-9265da3eb89b)
Author
Owner

@lunny commented on GitHub (Oct 13, 2024):

I have no idea, maybe it's related to #32120 . @yp05327 @Zettat123

@lunny commented on GitHub (Oct 13, 2024): I have no idea, maybe it's related to #32120 . @yp05327 @Zettat123
Author
Owner

@Zettat123 commented on GitHub (Oct 14, 2024):

I see that

image

are activated. But not for all mirror.

And I didn't activate it.

Do you mean that the "Actions" unit of some repositories are automatically enabled after upgrading to v1.22.3? If so, I think this issue is not related to #32120. Did you upgrade from v1.22.2 to v1.22.3?

@Zettat123 commented on GitHub (Oct 14, 2024): > I see that > > ![image](https://private-user-images.githubusercontent.com/8334250/375352159-fc1522f3-baf4-4ed4-8765-1ef2a72411f0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mjg4NzIxMDUsIm5iZiI6MTcyODg3MTgwNSwicGF0aCI6Ii84MzM0MjUwLzM3NTM1MjE1OS1mYzE1MjJmMy1iYWY0LTRlZDQtODc2NS0xZWYyYTcyNDExZjAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MTAxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDEwMTRUMDIxMDA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YWViYjkzZjM2MWNjYjhhZDI5OTJhNGQ1YWYyYWQ5MmE4NzlkN2IyM2Y1NGQ1ZWI5NTI3OThkZThlZWFlZDc4MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.8nhqSiKmhkmoFZ-0KtC5p-wRE0DUf-EBQ7ouYOnmTPg) > > are activated. But not for all mirror. > > And I didn't activate it. Do you mean that the "Actions" unit of some repositories are automatically enabled after upgrading to v1.22.3? If so, I think this issue is not related to #32120. Did you upgrade from v1.22.2 to v1.22.3?
Author
Owner

@somera commented on GitHub (Oct 14, 2024):

I see that
image
are activated. But not for all mirror.
And I didn't activate it.

Do you mean that the "Actions" unit of some repositories are automatically enabled after upgrading to v1.22.3? If so, I think this issue is not related to #32120. Did you upgrade from v1.22.2 to v1.22.3?

Yes. After upgrade from 1.22.2 to 1.22.3 I see

image

And Actions are for the Mirrors activated. It makes no sense.

@somera commented on GitHub (Oct 14, 2024): > > I see that > > ![image](https://private-user-images.githubusercontent.com/8334250/375352159-fc1522f3-baf4-4ed4-8765-1ef2a72411f0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mjg4NzIxMDUsIm5iZiI6MTcyODg3MTgwNSwicGF0aCI6Ii84MzM0MjUwLzM3NTM1MjE1OS1mYzE1MjJmMy1iYWY0LTRlZDQtODc2NS0xZWYyYTcyNDExZjAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MTAxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDEwMTRUMDIxMDA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YWViYjkzZjM2MWNjYjhhZDI5OTJhNGQ1YWYyYWQ5MmE4NzlkN2IyM2Y1NGQ1ZWI5NTI3OThkZThlZWFlZDc4MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.8nhqSiKmhkmoFZ-0KtC5p-wRE0DUf-EBQ7ouYOnmTPg) > > are activated. But not for all mirror. > > And I didn't activate it. > > Do you mean that the "Actions" unit of some repositories are automatically enabled after upgrading to v1.22.3? If so, I think this issue is not related to #32120. Did you upgrade from v1.22.2 to v1.22.3? Yes. After upgrade from 1.22.2 to 1.22.3 I see ![image](https://github.com/user-attachments/assets/ac7072bb-9f1f-4f73-80af-7fd24f88f676) And Actions are for the Mirrors activated. It makes no sense.
Author
Owner

@somera commented on GitHub (Oct 14, 2024):

Example

image

image

I didn't activate the Actions for all the affected projects.

image

And the red x is now after upgrade to 1.22.3.

When I add new mirror, Actions are activated -> is this right? Was this activated in 1.22.2 too?

image

  • Should the Actions be activated or not? If yes, what happens here for mirrors?
  • Why I see the whole failed old history?
  • Why will be the red x shown for mirrors? Looks like an error for me. What changed here from 1.22.2 to 1.22.3?
  • Is something broken is the main question for me.
@somera commented on GitHub (Oct 14, 2024): Example ![image](https://github.com/user-attachments/assets/37a76ecd-723c-45c6-9985-b0cb8e250c77) ![image](https://github.com/user-attachments/assets/919c2540-8e20-4077-9c33-47ee91d43c71) I didn't activate the Actions for all the affected projects. ![image](https://github.com/user-attachments/assets/64fd013f-c74d-45e2-a5c4-0ce346fd2800) And the red x is now after upgrade to 1.22.3. When I add new mirror, Actions are activated -> is this right? Was this activated in 1.22.2 too? ![image](https://github.com/user-attachments/assets/4ae592ed-7b5e-4160-b892-92a1f53d3f6e) - Should the Actions be activated or not? If yes, what happens here for mirrors? - Why I see the whole failed old history? - Why will be the red x shown for mirrors? Looks like an error for me. What changed here from 1.22.2 to 1.22.3? - Is something broken is the main question for me.
Author
Owner

@somera commented on GitHub (Oct 14, 2024):

I compared 1.22.2 (older mirror status) and 1.22.3 instances for same mirrors.

1.22.2 -> actions tab is not activated, no red x visible
1.22.3 -> actions tab is activated, red x visible for "failed" actions in some projects

@somera commented on GitHub (Oct 14, 2024): I compared 1.22.2 (older mirror status) and 1.22.3 instances for same mirrors. 1.22.2 -> actions tab is not activated, no red x visible 1.22.3 -> actions tab is activated, red x visible for "failed" actions in some projects
Author
Owner

@somera commented on GitHub (Oct 14, 2024):

Strange.

I imported an existing mirror in 1.22.2 in other orga on the same gite instance. And the new mirror has activated actions tab. In the old mirror the actions tab is not activated. When I update the old mirror the actions stay disabled.

What happens here?

@somera commented on GitHub (Oct 14, 2024): Strange. I imported an existing mirror in 1.22.2 in other orga on the same gite instance. And the new mirror has activated actions tab. In the old mirror the actions tab is not activated. When I update the old mirror the actions stay disabled. What happens here?
Author
Owner

@Zettat123 commented on GitHub (Oct 15, 2024):

When I add new mirror, Actions are activated -> is this right? Was this activated in 1.22.2 too?

Yes. New repositories (including mirrors) created in versions after v1.22 will have "Actions" enabled by default. See #27482. However, I don't think repositories created before v1.22 will automatically enable "Actions" after upgrading. I'll do some testing to confirm.


I've done my testing and can now confirm that mirror repositories created before v1.22 will not have "Actions" enabled after Gitea upgraded to v1.22. So I think repositories with "Actions" enabled should be created after v1.22.0


There is a proposal to disable "Actions" for mirror repositories by default. I support this idea.

@Zettat123 commented on GitHub (Oct 15, 2024): > When I add new mirror, Actions are activated -> is this right? Was this activated in 1.22.2 too? Yes. New repositories (including mirrors) created in versions after v1.22 will have "Actions" enabled by default. See #27482. However, I don't think repositories created before v1.22 will automatically enable "Actions" after upgrading. I'll do some testing to confirm. --- I've done my testing and can now confirm that mirror repositories created before v1.22 will not have "Actions" enabled after Gitea upgraded to v1.22. So I think repositories with "Actions" enabled should be created after v1.22.0 --- There is a proposal to disable "Actions" for mirror repositories by default. I support this idea. - #30350
Author
Owner

@yp05327 commented on GitHub (Oct 15, 2024):

When does these jobs start being triggered?

I can see some of them, but I'm sorry I don't know the language in your screenshot.
image
Does this mean last month?

And when did you upgrade the instance?

If the jobs are triggered before the update, it make sense. And I think this means before the update, the action unit is already enabled. But you said, they are disabled before the update, and enabled after the update, which is strange. And I have no idea about it yet.
But if they are all triggered after the update, it means during the update, action units was forcibly enabled. Then it should be a bug or something was wrong from Gitea side.

@yp05327 commented on GitHub (Oct 15, 2024): When does these jobs start being triggered? I can see some of them, but I'm sorry I don't know the language in your screenshot. ![image](https://github.com/user-attachments/assets/3827f3a9-c200-41e4-8134-38ae736a0883) Does this mean `last month`? And when did you upgrade the instance? If the jobs are triggered before the update, it make sense. And I think this means before the update, the action unit is already enabled. But you said, they are disabled before the update, and enabled after the update, which is strange. And I have no idea about it yet. But if they are all triggered after the update, it means during the update, action units was forcibly enabled. Then it should be a bug or something was wrong from Gitea side.
Author
Owner

@Zettat123 commented on GitHub (Oct 15, 2024):

But if they are all triggered after the update, it means during the update, action units was forcibly enabled. Then it should be a bug or something was wrong from Gitea side.

This is where I suspect a bug exists. But I can't find any evidence that Gitea forcibly enabled the "Actions" unit.

@Zettat123 commented on GitHub (Oct 15, 2024): > But if they are all triggered after the update, it means during the update, action units was forcibly enabled. Then it should be a bug or something was wrong from Gitea side. This is where I suspect a bug exists. But I can't find any evidence that Gitea forcibly enabled the "Actions" unit.
Author
Owner

@yp05327 commented on GitHub (Oct 15, 2024):

@Zettat123
Yes. I think it is the point, as there are several possible cases, so I asked, and then we can know what happened.

@yp05327 commented on GitHub (Oct 15, 2024): @Zettat123 Yes. I think it is the point, as there are several possible cases, so I asked, and then we can know what happened.
Author
Owner

@somera commented on GitHub (Oct 15, 2024):

When does these jobs start being triggered?

I can see some of them, but I'm sorry I don't know the language in your screenshot. image Does this mean last month?

It's German. And it mean last month.

I'm wondering too, that I see this actions.

And when did you upgrade the instance?

~2 days aftrer 1.22.3 was released.

If the jobs are triggered before the update, it make sense. And I think this means before the update, the action unit is already enabled. But you said, they are disabled before the update, and enabled after the update, which is strange. And I have no idea about it yet. But if they are all triggered after the update, it means during the update, action units was forcibly enabled. Then it should be a bug or something was wrong from Gitea side.

But i didn't enable any actions. I checked a lot of mirrors and most of them has no activated actions.

@somera commented on GitHub (Oct 15, 2024): > When does these jobs start being triggered? > > I can see some of them, but I'm sorry I don't know the language in your screenshot. ![image](https://private-user-images.githubusercontent.com/18380374/376454273-3827f3a9-c200-41e4-8134-38ae736a0883.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mjg5NzM0NDYsIm5iZiI6MTcyODk3MzE0NiwicGF0aCI6Ii8xODM4MDM3NC8zNzY0NTQyNzMtMzgyN2YzYTktYzIwMC00MWU0LTgxMzQtMzhhZTczNmEwODgzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDEwMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMDE1VDA2MTkwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFjODA5ZmI4YjAwMzcxODI4MzExOTJhMTFmMTI3OTY1MjcxZWI2MTVhMDUwNjZkYzE4MmYxYmZjZjBjNzI2OGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.V61fSXlO2WGtNDfZCFN9DSn1KT5Y0NEOk2uI42KfFVw) Does this mean `last month`? It's German. And it mean last month. I'm wondering too, that I see this actions. > > And when did you upgrade the instance? ~2 days aftrer 1.22.3 was released. > If the jobs are triggered before the update, it make sense. And I think this means before the update, the action unit is already enabled. But you said, they are disabled before the update, and enabled after the update, which is strange. And I have no idea about it yet. But if they are all triggered after the update, it means during the update, action units was forcibly enabled. Then it should be a bug or something was wrong from Gitea side. But i didn't enable any actions. I checked a lot of mirrors and most of them has no activated actions.
Author
Owner

@somera commented on GitHub (Oct 15, 2024):

This https://github.com/auth0/go-auth0 is an mirror.

2 months ago
image

And 1.22.3 was upgraded on 09.10.2024

image

And here othe mirror with activated action but wihout any errors

image

Other mirror ...

image

I don't know how many are affected.

@somera commented on GitHub (Oct 15, 2024): This https://github.com/auth0/go-auth0 is an mirror. 2 months ago ![image](https://github.com/user-attachments/assets/cde75107-6324-4ac2-8670-4b559dcdf592) And 1.22.3 was upgraded on 09.10.2024 ![image](https://github.com/user-attachments/assets/ab37e953-02ed-4a36-9100-93b2e179a2cc) And here othe mirror with activated action but wihout any errors ![image](https://github.com/user-attachments/assets/32110b59-d9fc-40c7-84af-b618795bccd5) Other mirror ... ![image](https://github.com/user-attachments/assets/dba62ae4-f1cc-4af1-9a10-67a6b82ed558) I don't know how many are affected.
Author
Owner

@yp05327 commented on GitHub (Oct 15, 2024):

And here othe mirror with activated action but wihout any errors

This is because the trigger of these 2 workflows are creating PR to main branch and workflow_dispatch (manually excute)

ps: for @Zettat123, the workflow files:
https://github.com/stanford-oval/storm/tree/main/.github/workflows

@yp05327 commented on GitHub (Oct 15, 2024): > And here othe mirror with activated action but wihout any errors This is because the trigger of these 2 workflows are creating PR to main branch and workflow_dispatch (manually excute) ps: for @Zettat123, the workflow files: https://github.com/stanford-oval/storm/tree/main/.github/workflows
Author
Owner

@yp05327 commented on GitHub (Oct 15, 2024):

So IMO, actually, there's no bug and the only thing you need is #30350

@yp05327 commented on GitHub (Oct 15, 2024): So IMO, actually, there's no bug and the only thing you need is #30350
Author
Owner

@Zettat123 commented on GitHub (Oct 15, 2024):

And here othe mirror with activated action but wihout any errors

This is because the trigger of these 2 workflows are creating PR to main branch and workflow_dispatch (manually excute)

ps: for @Zettat123, the workflow files: https://github.com/stanford-oval/storm/tree/main/.github/workflows

I see. Actually, the "Actions" unit was enabled for all repositories, but only some of them had actions runs due to workflow triggers.

@Zettat123 commented on GitHub (Oct 15, 2024): > > And here othe mirror with activated action but wihout any errors > > This is because the trigger of these 2 workflows are creating PR to main branch and workflow_dispatch (manually excute) > > ps: for @Zettat123, the workflow files: https://github.com/stanford-oval/storm/tree/main/.github/workflows I see. Actually, the "Actions" unit was enabled for all repositories, but only some of them had actions runs due to workflow triggers.
Author
Owner

@somera commented on GitHub (Oct 15, 2024):

Will the patch make it like it was before or does something still need to be fixed in the database?

@somera commented on GitHub (Oct 15, 2024): Will the patch make it like it was before or does something still need to be fixed in the database?
Author
Owner

@yp05327 commented on GitHub (Oct 15, 2024):

In another way, it is not difficult to implement a new options when migrating the repo.
But how to handle these existing mirrors, adding a migration or a maintenance operation or doctor command?

@yp05327 commented on GitHub (Oct 15, 2024): In another way, it is not difficult to implement a new options when migrating the repo. But how to handle these existing mirrors, adding a migration or a maintenance operation or doctor command?
Author
Owner

@Zettat123 commented on GitHub (Oct 15, 2024):

To batch disable the "Actions" unit of existing mirrors, users can use the API PATCH
/repos/{owner}/{repo}
to update repos.

@Zettat123 commented on GitHub (Oct 15, 2024): To batch disable the "Actions" unit of existing mirrors, users can use the API [PATCH /repos/{owner}/{repo}](https://gitea.com/api/swagger#/repository/repoEdit) to update repos.
Author
Owner

@somera commented on GitHub (Oct 15, 2024):

In another way, it is not difficult to implement a new options when migrating the repo. But how to handle these existing mirrors, adding a migration or a maintenance operation or doctor command?

Doctor commands sounds good. I have ~20000 mirrors.

How can I check in the DB how many mirrors are at the moment affeced?

And when I disable Actions for some mirrors in the UI the red x and orange o stay.

image

@somera commented on GitHub (Oct 15, 2024): > In another way, it is not difficult to implement a new options when migrating the repo. But how to handle these existing mirrors, adding a migration or a maintenance operation or doctor command? Doctor commands sounds good. I have ~20000 mirrors. How can I check in the DB how many mirrors are at the moment affeced? And when I disable Actions for some mirrors in the UI the red x and orange o stay. ![image](https://github.com/user-attachments/assets/9eba21ce-9ed5-4c78-9309-5f0b92be592a)
Author
Owner

@somera commented on GitHub (Oct 15, 2024):

And today I see first system messages

image

I missing here info to the project.

2024/10/15 19:50:18 ...eb/routing/logger.go:102:func1() [I] router: completed GET /repo/search?sort=updated&order=desc&uid=1&team_id=undefined&q=&page=1&limit=15&mode=&archived=false for 192.168.178.21:0, 200 OK in 95.1ms @ repo/repo.go:556(repo.SearchRepo)
2024/10/15 19:50:22 ...ns/schedule_tasks.go:87:startTasks() [E] CreateScheduleTask: SetJob: yaml: line 15: did not find expected key
        /source/services/actions/schedule_tasks.go:87 (0x1ec5678)
        /source/services/actions/schedule_tasks.go:24 (0x25858bc)
        /source/services/cron/tasks_actions.go:63 (0x25858bd)
        /source/services/cron/tasks.go:111 (0x25824c7)
        /source/modules/graceful/manager.go:92 (0xaa9d26)
        /source/services/cron/tasks.go:88 (0x258223a)
        /source/services/cron/tasks.go:67 (0x2586d93)
        /usr/local/go/src/reflect/value.go:596 (0x4fccc5)
                Value.call: call(frametype, fn, stackArgs, uint32(frametype.Size()), uint32(abid.retOffset), uint32(frameSize), &regArgs)
        /usr/local/go/src/reflect/value.go:380 (0x4fbdd8)
                Value.Call: return v.call("Call", in)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/gocron.go:122 (0x2563904)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:87 (0x2561b31)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:213 (0x2562817)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:269 (0x25632b7)
        /usr/local/go/src/runtime/asm_amd64.s:1695 (0x47b0a0)
                goexit: BYTE    $0x90   // NOP

and a lot exceptions

2024/10/15 14:04:22 ...irror/mirror_pull.go:178:parseRemoteUpdateOutput() [W] parseRemoteUpdateOutput: unexpected update line " * [new ref]         refs/pull/798/head  -> refs/pull/798/head"
2024/10/15 14:04:22 ...irror/mirror_pull.go:178:parseRemoteUpdateOutput() [W] parseRemoteUpdateOutput: unexpected update line " * [new ref]         refs/pull/798/merge -> refs/pull/798/merge"
2024/10/15 14:05:22 ...ns/schedule_tasks.go:87:startTasks() [E] CreateScheduleTask: SetJob: yaml: line 15: did not find expected key
        /source/services/actions/schedule_tasks.go:87 (0x1ec5678)
        /source/services/actions/schedule_tasks.go:24 (0x25858bc)
        /source/services/cron/tasks_actions.go:63 (0x25858bd)
        /source/services/cron/tasks.go:111 (0x25824c7)
        /source/modules/graceful/manager.go:92 (0xaa9d26)
        /source/services/cron/tasks.go:88 (0x258223a)
        /source/services/cron/tasks.go:67 (0x2586d93)
        /usr/local/go/src/reflect/value.go:596 (0x4fccc5)
                Value.call: call(frametype, fn, stackArgs, uint32(frametype.Size()), uint32(abid.retOffset), uint32(frameSize), &regArgs)
        /usr/local/go/src/reflect/value.go:380 (0x4fbdd8)
                Value.Call: return v.call("Call", in)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/gocron.go:122 (0x2563904)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:87 (0x2561b31)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:213 (0x2562817)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:269 (0x25632b7)
        /usr/local/go/src/runtime/asm_amd64.s:1695 (0x47b0a0)
                goexit: BYTE    $0x90   // NOP


2024/10/15 14:06:22 ...ns/schedule_tasks.go:87:startTasks() [E] CreateScheduleTask: SetJob: yaml: line 15: did not find expected key
        /source/services/actions/schedule_tasks.go:87 (0x1ec5678)
        /source/services/actions/schedule_tasks.go:24 (0x25858bc)
        /source/services/cron/tasks_actions.go:63 (0x25858bd)
        /source/services/cron/tasks.go:111 (0x25824c7)
        /source/modules/graceful/manager.go:92 (0xaa9d26)
        /source/services/cron/tasks.go:88 (0x258223a)
        /source/services/cron/tasks.go:67 (0x2586d93)
        /usr/local/go/src/reflect/value.go:596 (0x4fccc5)
                Value.call: call(frametype, fn, stackArgs, uint32(frametype.Size()), uint32(abid.retOffset), uint32(frameSize), &regArgs)
        /usr/local/go/src/reflect/value.go:380 (0x4fbdd8)
                Value.Call: return v.call("Call", in)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/gocron.go:122 (0x2563904)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:87 (0x2561b31)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:213 (0x2562817)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:269 (0x25632b7)
        /usr/local/go/src/runtime/asm_amd64.s:1695 (0x47b0a0)
                goexit: BYTE    $0x90   // NOP


2024/10/15 14:07:22 ...ns/schedule_tasks.go:87:startTasks() [E] CreateScheduleTask: SetJob: yaml: line 15: did not find expected key
        /source/services/actions/schedule_tasks.go:87 (0x1ec5678)
        /source/services/actions/schedule_tasks.go:24 (0x25858bc)
        /source/services/cron/tasks_actions.go:63 (0x25858bd)
        /source/services/cron/tasks.go:111 (0x25824c7)
        /source/modules/graceful/manager.go:92 (0xaa9d26)
        /source/services/cron/tasks.go:88 (0x258223a)
        /source/services/cron/tasks.go:67 (0x2586d93)
        /usr/local/go/src/reflect/value.go:596 (0x4fccc5)
                Value.call: call(frametype, fn, stackArgs, uint32(frametype.Size()), uint32(abid.retOffset), uint32(frameSize), &regArgs)
        /usr/local/go/src/reflect/value.go:380 (0x4fbdd8)
                Value.Call: return v.call("Call", in)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/gocron.go:122 (0x2563904)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:87 (0x2561b31)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:213 (0x2562817)
        /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:269 (0x25632b7)
        /usr/local/go/src/runtime/asm_amd64.s:1695 (0x47b0a0)
                goexit: BYTE    $0x90   // NOP
@somera commented on GitHub (Oct 15, 2024): And today I see first system messages ![image](https://github.com/user-attachments/assets/36924910-e5cb-4bc5-9200-f3b7c4d4a70b) I missing here info to the project. ``` 2024/10/15 19:50:18 ...eb/routing/logger.go:102:func1() [I] router: completed GET /repo/search?sort=updated&order=desc&uid=1&team_id=undefined&q=&page=1&limit=15&mode=&archived=false for 192.168.178.21:0, 200 OK in 95.1ms @ repo/repo.go:556(repo.SearchRepo) 2024/10/15 19:50:22 ...ns/schedule_tasks.go:87:startTasks() [E] CreateScheduleTask: SetJob: yaml: line 15: did not find expected key /source/services/actions/schedule_tasks.go:87 (0x1ec5678) /source/services/actions/schedule_tasks.go:24 (0x25858bc) /source/services/cron/tasks_actions.go:63 (0x25858bd) /source/services/cron/tasks.go:111 (0x25824c7) /source/modules/graceful/manager.go:92 (0xaa9d26) /source/services/cron/tasks.go:88 (0x258223a) /source/services/cron/tasks.go:67 (0x2586d93) /usr/local/go/src/reflect/value.go:596 (0x4fccc5) Value.call: call(frametype, fn, stackArgs, uint32(frametype.Size()), uint32(abid.retOffset), uint32(frameSize), &regArgs) /usr/local/go/src/reflect/value.go:380 (0x4fbdd8) Value.Call: return v.call("Call", in) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/gocron.go:122 (0x2563904) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:87 (0x2561b31) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:213 (0x2562817) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:269 (0x25632b7) /usr/local/go/src/runtime/asm_amd64.s:1695 (0x47b0a0) goexit: BYTE $0x90 // NOP ``` and a lot exceptions ``` 2024/10/15 14:04:22 ...irror/mirror_pull.go:178:parseRemoteUpdateOutput() [W] parseRemoteUpdateOutput: unexpected update line " * [new ref] refs/pull/798/head -> refs/pull/798/head" 2024/10/15 14:04:22 ...irror/mirror_pull.go:178:parseRemoteUpdateOutput() [W] parseRemoteUpdateOutput: unexpected update line " * [new ref] refs/pull/798/merge -> refs/pull/798/merge" 2024/10/15 14:05:22 ...ns/schedule_tasks.go:87:startTasks() [E] CreateScheduleTask: SetJob: yaml: line 15: did not find expected key /source/services/actions/schedule_tasks.go:87 (0x1ec5678) /source/services/actions/schedule_tasks.go:24 (0x25858bc) /source/services/cron/tasks_actions.go:63 (0x25858bd) /source/services/cron/tasks.go:111 (0x25824c7) /source/modules/graceful/manager.go:92 (0xaa9d26) /source/services/cron/tasks.go:88 (0x258223a) /source/services/cron/tasks.go:67 (0x2586d93) /usr/local/go/src/reflect/value.go:596 (0x4fccc5) Value.call: call(frametype, fn, stackArgs, uint32(frametype.Size()), uint32(abid.retOffset), uint32(frameSize), &regArgs) /usr/local/go/src/reflect/value.go:380 (0x4fbdd8) Value.Call: return v.call("Call", in) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/gocron.go:122 (0x2563904) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:87 (0x2561b31) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:213 (0x2562817) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:269 (0x25632b7) /usr/local/go/src/runtime/asm_amd64.s:1695 (0x47b0a0) goexit: BYTE $0x90 // NOP 2024/10/15 14:06:22 ...ns/schedule_tasks.go:87:startTasks() [E] CreateScheduleTask: SetJob: yaml: line 15: did not find expected key /source/services/actions/schedule_tasks.go:87 (0x1ec5678) /source/services/actions/schedule_tasks.go:24 (0x25858bc) /source/services/cron/tasks_actions.go:63 (0x25858bd) /source/services/cron/tasks.go:111 (0x25824c7) /source/modules/graceful/manager.go:92 (0xaa9d26) /source/services/cron/tasks.go:88 (0x258223a) /source/services/cron/tasks.go:67 (0x2586d93) /usr/local/go/src/reflect/value.go:596 (0x4fccc5) Value.call: call(frametype, fn, stackArgs, uint32(frametype.Size()), uint32(abid.retOffset), uint32(frameSize), &regArgs) /usr/local/go/src/reflect/value.go:380 (0x4fbdd8) Value.Call: return v.call("Call", in) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/gocron.go:122 (0x2563904) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:87 (0x2561b31) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:213 (0x2562817) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:269 (0x25632b7) /usr/local/go/src/runtime/asm_amd64.s:1695 (0x47b0a0) goexit: BYTE $0x90 // NOP 2024/10/15 14:07:22 ...ns/schedule_tasks.go:87:startTasks() [E] CreateScheduleTask: SetJob: yaml: line 15: did not find expected key /source/services/actions/schedule_tasks.go:87 (0x1ec5678) /source/services/actions/schedule_tasks.go:24 (0x25858bc) /source/services/cron/tasks_actions.go:63 (0x25858bd) /source/services/cron/tasks.go:111 (0x25824c7) /source/modules/graceful/manager.go:92 (0xaa9d26) /source/services/cron/tasks.go:88 (0x258223a) /source/services/cron/tasks.go:67 (0x2586d93) /usr/local/go/src/reflect/value.go:596 (0x4fccc5) Value.call: call(frametype, fn, stackArgs, uint32(frametype.Size()), uint32(abid.retOffset), uint32(frameSize), &regArgs) /usr/local/go/src/reflect/value.go:380 (0x4fbdd8) Value.Call: return v.call("Call", in) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/gocron.go:122 (0x2563904) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:87 (0x2561b31) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:213 (0x2562817) /go/pkg/mod/github.com/go-co-op/gocron@v1.37.0/executor.go:269 (0x25632b7) /usr/local/go/src/runtime/asm_amd64.s:1695 (0x47b0a0) goexit: BYTE $0x90 // NOP ```
Author
Owner

@somera commented on GitHub (Oct 15, 2024):

Same #30244

@somera commented on GitHub (Oct 15, 2024): Same #30244
Author
Owner

@somera commented on GitHub (Oct 15, 2024):

Can I use this

; [actions]
;; Enable/Disable actions capabilities
;ENABLED = false

to disable action temporary?

And this

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Cleanup expired actions assets
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;[cron.cleanup_actions]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;ENABLED = true
;RUN_AT_START = true
;SCHEDULE = @midnight

to cleanup all the action jobs?

@somera commented on GitHub (Oct 15, 2024): Can I use this ``` ; [actions] ;; Enable/Disable actions capabilities ;ENABLED = false ``` to disable action temporary? And this ``` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Cleanup expired actions assets ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;[cron.cleanup_actions] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;ENABLED = true ;RUN_AT_START = true ;SCHEDULE = @midnight ``` to cleanup all the action jobs?
Author
Owner

@yp05327 commented on GitHub (Oct 16, 2024):

It is a global setting for all repos, if you do not need to use actions in this instance, you can disable it globally.

Clean up only remove action job log, related data and artififacts, it will not delete those action jobs.

@yp05327 commented on GitHub (Oct 16, 2024): It is a global setting for all repos, if you do not need to use actions in this instance, you can disable it globally. Clean up only remove action job log, related data and artififacts, it will not delete those action jobs.
Author
Owner

@somera commented on GitHub (Oct 17, 2024):

It is a global setting for all repos, if you do not need to use actions in this instance, you can disable it globally.

Thx,

Clean up only remove action job log, related data and artififacts, it will not delete those action jobs.

hm.

Are you working on a solution to this problem?

The failed action jobs are flooding my system messages view.

@somera commented on GitHub (Oct 17, 2024): > It is a global setting for all repos, if you do not need to use actions in this instance, you can disable it globally. Thx, > Clean up only remove action job log, related data and artififacts, it will not delete those action jobs. hm. Are you working on a solution to this problem? The failed action jobs are flooding my system messages view.
Author
Owner

@yp05327 commented on GitHub (Oct 17, 2024):

For existing mirrors, no good solution from me.

As it is related to repo_unit table in DB.
If there's a record with unit type 10 (action), and it is not globally disabled, then it means action unit is enabled.
We can not simply remove these records in migration, as users may need it.
So we can only do it by ourselves (cli or sql) or add a new maintenance operations, but it is not a usually used feature I think, so maybe there's no worth to implement it.

↑ It is for the action jobs

And the commit status (x in dashboard repo list) is recorded in another table, and if you don't want to see them, maybe you also need to clean it.

So, as a summary, I have no good idea now for completely solving it for these existing mirrors.

@yp05327 commented on GitHub (Oct 17, 2024): For existing mirrors, no good solution from me. As it is related to `repo_unit` table in DB. If there's a record with unit type 10 (action), and it is not globally disabled, then it means action unit is enabled. We can not simply remove these records in migration, as users may need it. So we can only do it by ourselves (cli or sql) or add a new maintenance operations, but it is not a usually used feature I think, so maybe there's no worth to implement it. ↑ It is for the action jobs And the commit status (`x` in dashboard repo list) is recorded in another table, and if you don't want to see them, maybe you also need to clean it. So, as a summary, I have no good idea now for completely solving it for these **existing mirrors**.
Author
Owner

@somera commented on GitHub (Oct 17, 2024):

Understand. Means I have fix it for ~20.000 mirrors by myself. Or I do

To batch disable the "Actions" unit of existing mirrors, users can use the API PATCH /repos/{owner}/{repo} to update repos.

this with an script for all the mirrors?

I this case I should send only has_actions = false as an json? Right?

This will disable the action. And how can I than fix this

image

?

@somera commented on GitHub (Oct 17, 2024): Understand. Means I have fix it for ~20.000 mirrors by myself. Or I do > To batch disable the "Actions" unit of existing mirrors, users can use the API [PATCH /repos/{owner}/{repo}](https://gitea.com/api/swagger#/repository/repoEdit) to update repos. this with an script for all the mirrors? I this case I should send **only** has_actions = false as an json? Right? This will disable the action. And how can I than fix this ![image](https://github.com/user-attachments/assets/50e65338-5506-4b9d-b3f7-fd89c53b0aab) ?
Author
Owner

@Zettat123 commented on GitHub (Oct 18, 2024):

I this case I should send only has_actions = false as an json? Right?

Yes. You only need to set the fields that need to be changed.

9116665e9c/routers/api/v1/repo/repo.go (L1018-L1027)

@Zettat123 commented on GitHub (Oct 18, 2024): > I this case I should send only has_actions = false as an json? Right? Yes. You only need to set the fields that need to be changed. https://github.com/go-gitea/gitea/blob/9116665e9c1c01d882c919fb3058f7fdb695350e/routers/api/v1/repo/repo.go#L1018-L1027
Author
Owner

@somera commented on GitHub (Oct 18, 2024):

@Zettat123 I did this for ~3500 mirrors. Looks good.

And what should be removed in th database to remove this

image

?

This is visible after I set has_actions = false. And click on the x or o show 404.

@somera commented on GitHub (Oct 18, 2024): @Zettat123 I did this for ~3500 mirrors. Looks good. And what should be removed in th database to remove this ![image](https://github.com/user-attachments/assets/32c2b16e-1363-462e-b00f-a8816eecf74b) ? This is visible after I set has_actions = false. And click on the x or o show 404.
Author
Owner

@lunny commented on GitHub (Oct 20, 2024):

I think these commit status can be removed manually from the database with

delete from commit_status where repo_id = (select id from repository where is_mirror = true)
delete from commit_status_summary where repo_id = (select id from repository where is_mirror = true)
@lunny commented on GitHub (Oct 20, 2024): I think these commit status can be removed manually from the database with ``` delete from commit_status where repo_id = (select id from repository where is_mirror = true) delete from commit_status_summary where repo_id = (select id from repository where is_mirror = true) ```
Author
Owner

@somera commented on GitHub (Oct 21, 2024):

I this case I should send only has_actions = false as an json? Right?

Yes. You only need to set the fields that need to be changed.

I have now a script which I run after I added some new mirrors.

But for the next release there will be a fix in gitea? Means, when I import new mirror "Actions" will be deactivated by default?

I think these commit status can be removed manually from the database with

delete from commit_status where repo_id = (select id from repository where is_mirror = true)
delete from commit_status_summary where repo_id = (select id from repository where is_mirror = true)

Thx. I try this next weekend with an Gitea-DB backup.

@somera commented on GitHub (Oct 21, 2024): > > I this case I should send only has_actions = false as an json? Right? > > Yes. You only need to set the fields that need to be changed. I have now a script which I run after I added some new mirrors. But for the next release there will be a fix in gitea? Means, when I import new mirror "Actions" will be deactivated by default? > I think these commit status can be removed manually from the database with > > ``` > delete from commit_status where repo_id = (select id from repository where is_mirror = true) > delete from commit_status_summary where repo_id = (select id from repository where is_mirror = true) > ``` Thx. I try this next weekend with an Gitea-DB backup.
Author
Owner

@somera commented on GitHub (Oct 24, 2024):

@lunny is there a fix in the next release that for new mirrors "Actions" will be not activated?

@somera commented on GitHub (Oct 24, 2024): @lunny is there a fix in the next release that for new mirrors "Actions" will be not activated?
Author
Owner

@lunny commented on GitHub (Oct 25, 2024):

Yes, I think there should be a PR to fix that but there is no ETA

@lunny commented on GitHub (Oct 25, 2024): Yes, I think there should be a PR to fix that but there is no ETA
Author
Owner

@somera commented on GitHub (Jan 11, 2025):

@lunny looks good for me after update to 1.23.1. Thx.

@somera commented on GitHub (Jan 11, 2025): @lunny looks good for me after update to 1.23.1. Thx.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13585