Skip to content

fix(forgejo): return correct activity to enable scale-to-zero#7532

Merged
rickbrouwer merged 3 commits into
kedacore:mainfrom
rickbrouwer:issue-7527
Apr 10, 2026
Merged

fix(forgejo): return correct activity to enable scale-to-zero#7532
rickbrouwer merged 3 commits into
kedacore:mainfrom
rickbrouwer:issue-7527

Conversation

@rickbrouwer

Copy link
Copy Markdown
Member

GetMetricsAndActivity always returned activity=true regardless of the job queue length. This is making scale-to-zero impossible.

Checklist

  • I have verified that my change is according to the deprecations & breaking changes policy
  • Tests have been added (if applicable)
  • Ensure make generate-scalers-schema has been run to update any outdated generated files
  • Changelog has been updated and is aligned with our changelog requirements, only when the change impacts end users
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)

Fixes #7527

@rickbrouwer rickbrouwer requested a review from a team as a code owner March 9, 2026 13:35
@snyk-io

snyk-io Bot commented Mar 9, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@keda-automation keda-automation requested a review from a team March 9, 2026 13:36
@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown

Thank you for your contribution! 🙏

Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected.

While you are waiting, make sure to:

  • Add an entry in our changelog in alphabetical order and link related issue
  • Update the documentation, if needed
  • Add unit & e2e tests for your changes
  • GitHub checks are passing
  • Is the DCO check failing? Here is how you can fix DCO issues

Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient.

Learn more about our contribution guide.

@rickbrouwer rickbrouwer changed the title Issue 7527 fix(forgejo): return correct activity to enable scale-to-zero Mar 9, 2026
@rickbrouwer rickbrouwer force-pushed the issue-7527 branch 2 times, most recently from 282187d to 6ba8c13 Compare March 9, 2026 13:54
@rickbrouwer

rickbrouwer commented Mar 9, 2026

Copy link
Copy Markdown
Member Author

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

@rickbrouwer rickbrouwer added the Awaiting/2nd-approval This PR needs one more approval review label Mar 9, 2026
@keda-automation keda-automation requested a review from a team March 13, 2026 08:45
@rickbrouwer

rickbrouwer commented Mar 13, 2026

Copy link
Copy Markdown
Member Author

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

@rickbrouwer rickbrouwer enabled auto-merge (squash) March 16, 2026 12:41

@zroubalik zroubalik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't we make this configurable? The same way activity is handled in other scalers?

@rickbrouwer

rickbrouwer commented Apr 8, 2026

Copy link
Copy Markdown
Member Author

Shouldn't we make this configurable? The same way activity is handled in other scalers?

@zroubalik Do you mean an ActivationValue? If so, do you want me to add that directly to this PR, or do you want to keep the 'fix' and 'feature' separate in terms of scoping?

@zroubalik

Copy link
Copy Markdown
Member

Shouldn't we make this configurable? The same way activity is handled in other scalers?

@zroubalik Do you mean an ActivationValue? If so, do you want me to add that directly to this PR, or do you want to keep the 'fix' and 'feature' separate in terms of scoping?

I think it makes sense to do it in a single PR.

My other concern is actually a question why this hasn't been implemented in the scaler from the beginning? Does forgejo actually supports this? I don't know, just thinking out loud.

@keda-automation keda-automation requested a review from a team April 9, 2026 06:32
@rickbrouwer

Copy link
Copy Markdown
Member Author

I think it makes sense to do it in a single PR.

Yes, me too, I like to keep things separate.

My other concern is actually a question why this hasn't been implemented in the scaler from the beginning? Does forgejo actually supports this? I don't know, just thinking out loud.

Good question why we missed this.
As far as I'm concerned, we can do 3 things:

  1. I add the activation value in a separate PR.
  2. I create a first-good-issue (although that would likely be picked up by an agent, but oh well)
  3. We wait for a request from the community indicating that they are missing something.

@zroubalik

Copy link
Copy Markdown
Member

3. a request from the community indicating that they are missing something.

I'd go with this approach personally.

@rickbrouwer

rickbrouwer commented Apr 10, 2026

Copy link
Copy Markdown
Member Author

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

@rickbrouwer

Copy link
Copy Markdown
Member Author

I'd go with this approach personally.

Then we continue with this PR.

@rickbrouwer rickbrouwer merged commit 65bdb86 into kedacore:main Apr 10, 2026
25 checks passed
@rickbrouwer rickbrouwer removed the Awaiting/2nd-approval This PR needs one more approval review label Apr 13, 2026
@rickbrouwer rickbrouwer deleted the issue-7527 branch May 8, 2026 15:35
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.

ScaledObject always overridden by HPA, unable to scale to 0

3 participants