Skip to content

new forgejo scaler#6495

Merged
wozniakjan merged 47 commits intokedacore:mainfrom
cobak78:forgejo-runner-scaler
Sep 30, 2025
Merged

new forgejo scaler#6495
wozniakjan merged 47 commits intokedacore:mainfrom
cobak78:forgejo-runner-scaler

Conversation

@cobak78
Copy link
Contributor

@cobak78 cobak78 commented Jan 22, 2025

This PR adds a new forgejo autoscaler with the same characteristics of the github autoscaler.

Fixes: #6488

Docs PR: kedacore/keda-docs#1577

Another important discussions on this topic:

Checklist

@cobak78 cobak78 requested a review from a team as a code owner January 22, 2025 14:40
@cobak78 cobak78 force-pushed the forgejo-runner-scaler branch from 03fd3a1 to 39fd60d Compare January 22, 2025 14:43
@cobak78 cobak78 force-pushed the forgejo-runner-scaler branch 2 times, most recently from 5b9d520 to f13dbc7 Compare January 23, 2025 11:41
Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your contribution! I've left some comment inline. Additionally to them:

  • Please, add an e2e test covering the scaler. You get more info about how to do it here
  • Could you open a PR to docs adding the scaler in next version?
  • All commits must be signed and that's why DCO check is failing, please rebase your branch signing all the commits (how to do that it's explained in the check page)

@cobak78 cobak78 force-pushed the forgejo-runner-scaler branch 6 times, most recently from 6b7ca20 to a63882e Compare January 29, 2025 09:45
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cobak78 what is the status of this PR please?

Copy link

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondered why your tests still do not compile in CI, maybe you forget to fix them after removing JobsListResponse during Refactoring?

Or is the whole additional test file obsolete?

@cobak78 cobak78 force-pushed the forgejo-runner-scaler branch from d7de903 to 5db4208 Compare May 12, 2025 14:50
@cobak78 cobak78 force-pushed the forgejo-runner-scaler branch from 1fac30d to fcbeff9 Compare May 19, 2025 15:11
@JorTurFer
Copy link
Member

JorTurFer commented May 20, 2025

/run-e2e forgejo
Update: You can check the progress here

@cobak78 cobak78 force-pushed the forgejo-runner-scaler branch from 9c4b8af to 072caca Compare May 26, 2025 06:35
@JorTurFer
Copy link
Member

JorTurFer commented May 27, 2025

/run-e2e forgejo
Update: You can check the progress here

@cobak78 cobak78 force-pushed the forgejo-runner-scaler branch from 56441c6 to 1f88ea6 Compare June 5, 2025 10:28
@JorTurFer
Copy link
Member

JorTurFer commented Jun 5, 2025

/run-e2e forgejo
Update: You can check the progress here

@cobak78
Copy link
Contributor Author

cobak78 commented Jun 5, 2025

added the PR on the doc repository
kedacore/keda-docs#1577

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
@JorTurFer JorTurFer requested a review from Copilot September 22, 2025 07:31
@JorTurFer
Copy link
Member

JorTurFer commented Sep 22, 2025

/run-e2e forgejo
Update: You can check the progress here

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
@JorTurFer
Copy link
Member

JorTurFer commented Sep 22, 2025

/run-e2e forgejo
Update: You can check the progress here

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
@JorTurFer
Copy link
Member

JorTurFer commented Sep 22, 2025

/run-e2e forgejo
Update: You can check the progress here

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
@JorTurFer
Copy link
Member

JorTurFer commented Sep 22, 2025

/run-e2e forgejo
Update: You can check the progress here

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
@JorTurFer
Copy link
Member

JorTurFer commented Sep 22, 2025

/run-e2e forgejo
Update: You can check the progress here

Copy link
Member

@wozniakjan wozniakjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you!

@wozniakjan wozniakjan enabled auto-merge (squash) September 24, 2025 07:05
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs PR needs an update: kedacore/keda-docs#1577

@JorTurFer
Copy link
Member

Docs PR needs an update: kedacore/keda-docs#1577

true, mb. Let me update docs

Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
@keda-automation keda-automation requested a review from a team September 28, 2025 10:37
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
@semgrep-app
Copy link

semgrep-app bot commented Sep 28, 2025

Semgrep found 1 invalid-usage-of-modified-variable finding:

Variable scaler is likely modified and later used on error. In some cases this could result in panics due to a nil dereference

@JorTurFer
Copy link
Member

JorTurFer commented Sep 28, 2025

/run-e2e forgejo
Update: You can check the progress here

@JorTurFer
Copy link
Member

PTAL @zroubalik

@wozniakjan wozniakjan merged commit 72f94ad into kedacore:main Sep 30, 2025
24 checks passed
alt-dima pushed a commit to alt-dima/keda that referenced this pull request Dec 13, 2025
* new forgejo scaler with tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* delete not needed package

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* use pascal case for tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* change forgejo endpoints response

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* improve testing

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* minimal e2e testing, local with local images

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix unit test

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* linter fixes

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* linter fixes

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* linter fixes

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* minimal e2e testing, using test image tool

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix error checks on unit tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix error checks on unit tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix error checks on unit tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix error checks on unit tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* add new database update to modify timestamp of the pending job

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* add new database update to modify timestamp of the pending job

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* add new database update to modify timestamp of the pending job

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* add new database update to modify timestamp of the pending job

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* edit CHANGELOG.md

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* comment fixes and improvements

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* comment fixes and improvements

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* Update pkg/scalers/forgejo_runner_scaler.go

Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jaime <cobak78@gmail.com>

* Update pkg/scalers/forgejo_runner_scaler.go

Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jaime <cobak78@gmail.com>

* Update pkg/scalers/forgejo_runner_scaler.go

Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jaime <cobak78@gmail.com>

* Update pkg/scalers/forgejo_runner_scaler.go

Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jaime <cobak78@gmail.com>

* Move token to secret for e2e

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* Move token to secret for e2e

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* update schema

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* update schema

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* update test

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* fix test

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* fix test

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* fix test

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

---------

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>
Signed-off-by: Jaime <cobak78@gmail.com>
Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
Co-authored-by: jaime merino <jaime.merino_mora@mail.schwarz>
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Co-authored-by: Jorge Turrado <jorge.turrado@mail.schwarz>
Signed-off-by: Dmitriy Altuhov <altuhovd@gmail.com>
tangobango5 pushed a commit to tangobango5/keda that referenced this pull request Dec 22, 2025
* new forgejo scaler with tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* delete not needed package

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* use pascal case for tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* change forgejo endpoints response

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* improve testing

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* minimal e2e testing, local with local images

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix unit test

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* linter fixes

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* linter fixes

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* linter fixes

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* minimal e2e testing, using test image tool

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix error checks on unit tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix error checks on unit tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix error checks on unit tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix error checks on unit tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* add new database update to modify timestamp of the pending job

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* add new database update to modify timestamp of the pending job

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* add new database update to modify timestamp of the pending job

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* add new database update to modify timestamp of the pending job

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* edit CHANGELOG.md

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* comment fixes and improvements

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* comment fixes and improvements

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* Update pkg/scalers/forgejo_runner_scaler.go

Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jaime <cobak78@gmail.com>

* Update pkg/scalers/forgejo_runner_scaler.go

Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jaime <cobak78@gmail.com>

* Update pkg/scalers/forgejo_runner_scaler.go

Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jaime <cobak78@gmail.com>

* Update pkg/scalers/forgejo_runner_scaler.go

Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jaime <cobak78@gmail.com>

* Move token to secret for e2e

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* Move token to secret for e2e

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* update schema

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* update schema

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* update test

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* fix test

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* fix test

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* fix test

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

---------

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>
Signed-off-by: Jaime <cobak78@gmail.com>
Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
Co-authored-by: jaime merino <jaime.merino_mora@mail.schwarz>
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Co-authored-by: Jorge Turrado <jorge.turrado@mail.schwarz>
tangobango5 pushed a commit to tangobango5/keda that referenced this pull request Feb 13, 2026
* new forgejo scaler with tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* delete not needed package

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* use pascal case for tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* change forgejo endpoints response

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* improve testing

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* minimal e2e testing, local with local images

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix unit test

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* linter fixes

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* linter fixes

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* linter fixes

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* minimal e2e testing, using test image tool

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix error checks on unit tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix error checks on unit tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix error checks on unit tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* fix error checks on unit tests

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* add new database update to modify timestamp of the pending job

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* add new database update to modify timestamp of the pending job

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* add new database update to modify timestamp of the pending job

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* add new database update to modify timestamp of the pending job

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* edit CHANGELOG.md

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* comment fixes and improvements

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* comment fixes and improvements

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>

* Update pkg/scalers/forgejo_runner_scaler.go

Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jaime <cobak78@gmail.com>

* Update pkg/scalers/forgejo_runner_scaler.go

Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jaime <cobak78@gmail.com>

* Update pkg/scalers/forgejo_runner_scaler.go

Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jaime <cobak78@gmail.com>

* Update pkg/scalers/forgejo_runner_scaler.go

Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jaime <cobak78@gmail.com>

* Move token to secret for e2e

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* Move token to secret for e2e

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* update schema

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* update schema

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* update test

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* fix test

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* fix test

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

* fix test

Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>

---------

Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>
Signed-off-by: Jaime <cobak78@gmail.com>
Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
Co-authored-by: jaime merino <jaime.merino_mora@mail.schwarz>
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Co-authored-by: Jorge Turrado <jorge.turrado@mail.schwarz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Forgejo / Gitea runner jobs scaler

8 participants