Skip to content
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: issue when GitHub organization contains more than 30 repos #5746

Merged
merged 7 commits into from
May 20, 2024

Conversation

KoblerS
Copy link
Contributor

@KoblerS KoblerS commented Apr 25, 2024

Fixed issue when GitHub organization contains more than 30 repositories. Scaler will now iterate over the pages according to GitHubs documentation.

Checklist

Fixes #5738

@KoblerS KoblerS requested a review from a team as a code owner April 25, 2024 11:08
@KoblerS KoblerS force-pushed the feature/fixgithubscaler branch from cb09c29 to e4bebde Compare April 25, 2024 11:10
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.

Nice improvement! Could you include a unit test for this case too?

pkg/scalers/github_runner_scaler.go Outdated Show resolved Hide resolved
@KoblerS
Copy link
Contributor Author

KoblerS commented Apr 28, 2024

@JorTurFer sure will work on it!

@KoblerS KoblerS force-pushed the feature/fixgithubscaler branch 2 times, most recently from 877071d to bb1d675 Compare May 13, 2024 12:48
@KoblerS KoblerS requested a review from JorTurFer May 13, 2024 12:50
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.

@KoblerS could you please fix the DCO problem?

@KoblerS KoblerS force-pushed the feature/fixgithubscaler branch from bb1d675 to ac9dcd2 Compare May 17, 2024 09:01
@KoblerS
Copy link
Contributor Author

KoblerS commented May 17, 2024

@KoblerS could you please fix the DCO problem?

could you please check again. Thanks!

@KoblerS KoblerS requested a review from zroubalik May 17, 2024 09:02
Copy link

semgrep-app bot commented May 17, 2024

Semgrep found 1 context-todo finding:

  • pkg/scalers/github_runner_scaler_test.go

Consider to use well-defined context

Ignore this finding from context-todo.

@KoblerS KoblerS force-pushed the feature/fixgithubscaler branch 6 times, most recently from 41618ff to 72b0d88 Compare May 17, 2024 09:32
Simon Kobler and others added 4 commits May 17, 2024 11:33
Co-authored-by: Jorge Turrado Ferrero <[email protected]>
Signed-off-by: Simon Kobler <[email protected]>
Signed-off-by: Simon Kobler <[email protected]>
Signed-off-by: Simon Kobler <[email protected]>
Signed-off-by: Simon Kobler <[email protected]>
@KoblerS KoblerS force-pushed the feature/fixgithubscaler branch from 72b0d88 to 9adbf62 Compare May 17, 2024 09:33
CHANGELOG.md Outdated Show resolved Hide resolved
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.

There are also some problems in the imports:

@@ -2,13 +2,13 @@ package scalers
 
 import (
 	"context"
+	"crypto/rand"
 	"encoding/json"
 	"fmt"
-	"crypto/rand"
+	"html/template"
 	"math/big"
 	"net/http"
 	"net/http/httptest"
-	"html/template"
 	"strings"
 	"testing"
 	"time"

Signed-off-by: Simon Kobler <[email protected]>
@KoblerS KoblerS requested a review from zroubalik May 17, 2024 10:56
@zroubalik
Copy link
Member

@KoblerS you can see the failed static check output: https://github.com/kedacore/keda/actions/runs/9127598269/job/25098204457?pr=5746

Signed-off-by: Simon Kobler <[email protected]>
@KoblerS KoblerS force-pushed the feature/fixgithubscaler branch from 0833290 to ee9a242 Compare May 17, 2024 11:47
@KoblerS
Copy link
Contributor Author

KoblerS commented May 17, 2024

@KoblerS you can see the failed static check output: https://github.com/kedacore/keda/actions/runs/9127598269/job/25098204457?pr=5746

sorry didn't saw it, should be fixed now.

@zroubalik
Copy link
Member

zroubalik commented May 17, 2024

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

@KoblerS
Copy link
Contributor Author

KoblerS commented May 20, 2024

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

Any updates when this will be merged?

@zroubalik zroubalik merged commit 6aade8f into kedacore:main May 20, 2024
20 checks passed
@KoblerS KoblerS deleted the feature/fixgithubscaler branch May 20, 2024 10:29
@JorTurFer JorTurFer mentioned this pull request Jul 30, 2024
23 tasks
JorTurFer added a commit to JorTurFer/keda that referenced this pull request Jul 30, 2024
…core#5746)

Signed-off-by: Simon Kobler <[email protected]>
Signed-off-by: Simon Kobler <[email protected]>
Co-authored-by: Jorge Turrado Ferrero <[email protected]>
Co-authored-by: Simon Kobler <[email protected]>
JorTurFer added a commit to JorTurFer/keda that referenced this pull request Jul 30, 2024
…core#5746)

Signed-off-by: Simon Kobler <[email protected]>
Signed-off-by: Simon Kobler <[email protected]>
Co-authored-by: Jorge Turrado Ferrero <[email protected]>
Co-authored-by: Simon Kobler <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
JorTurFer added a commit that referenced this pull request Jul 31, 2024
* bump golang

Signed-off-by: Jorge Turrado <[email protected]>

* chore: build with keda-tools:1.22.5 (#5971)

* chore: build with keda-tools:1.22.5
to resolve CVE-2024-24790, CVE-2024-24789, and CVE-2024-24791
bump github.com/Azure/azure-sdk-for-go/sdk/azidentity to resolve CVE-2024-35255

Signed-off-by: Paul Yu <[email protected]>

* chore: use go install instead of go get and replacing deprecated tools

Signed-off-by: Paul Yu <[email protected]>

* chore: vendor dependency cleanup

Signed-off-by: Paul Yu <[email protected]>

* Update missing references to 1.21

Signed-off-by: Jorge Turrado <[email protected]>

---------

Signed-off-by: Paul Yu <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Co-authored-by: Jorge Turrado Ferrero <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* [BUG-5922] Report failing ScaledJob triggers in status (#5916)

Signed-off-by: Josef Karasek <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* [BUG-5656] Annotate Jobs with parent ScaledJob generation (#5876)

* Annotate Jobs with parent ScaledJob generation

Signed-off-by: Josef Karasek <[email protected]>

* fix tests

Signed-off-by: Josef Karasek <[email protected]>

* fix lint

Signed-off-by: Josef Karasek <[email protected]>

* fix log message

Signed-off-by: Josef Karasek <[email protected]>

* update changelog

Signed-off-by: Josef Karasek <[email protected]>

* update changelog

Signed-off-by: Josef Karasek <[email protected]>

* update changelog

Signed-off-by: Josef Karasek <[email protected]>

---------

Signed-off-by: Josef Karasek <[email protected]>
Signed-off-by: Zbynek Roubalik <[email protected]>
Co-authored-by: Zbynek Roubalik <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* fix: `+srv` mongodb url scheme parsing bug (#5773)

This commit fixs issue #5760. where OP was facing problem with +srv schema

Signed-off-by: Rishikesh Betigeri <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* fix: issue when GitHub organization contains more than 30 repos (#5746)

Signed-off-by: Simon Kobler <[email protected]>
Signed-off-by: Simon Kobler <[email protected]>
Co-authored-by: Jorge Turrado Ferrero <[email protected]>
Co-authored-by: Simon Kobler <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* Fix scaler leak during cache refresh (#5807)

Signed-off-by: Guillaume Jacquet <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* Prepare release v2.14.1

Signed-off-by: Jorge Turrado <[email protected]>

* add missing change

Signed-off-by: Jorge Turrado <[email protected]>

* update changelog

Signed-off-by: Jorge Turrado <[email protected]>

* fix: e2e test regex check tag (#5831)

Signed-off-by: Jan Wozniak <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* Validate regex before building image for e2e test (#5783)

* added regex pre check before building image

Signed-off-by: Yaxhveer <[email protected]>

* updated changelog

Signed-off-by: Yaxhveer <[email protected]>

* refactored

Signed-off-by: Yaxhveer <[email protected]>

* corrected

Signed-off-by: Yaxhveer <[email protected]>

* corrected changelog

Signed-off-by: Yaxhveer <[email protected]>

* updated the workflow

Signed-off-by: Yaxhveer <[email protected]>

* updated the workflow

Signed-off-by: Yaxhveer <[email protected]>

---------

Signed-off-by: Yaxhveer <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* fix some pending tasks

Signed-off-by: Jorge Turrado <[email protected]>

* use AAD-Pod-Identity always

Signed-off-by: Jorge Turrado <[email protected]>

* use AAD-Pod-Identity always

Signed-off-by: Jorge Turrado <[email protected]>

---------

Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Paul Yu <[email protected]>
Signed-off-by: Josef Karasek <[email protected]>
Signed-off-by: Zbynek Roubalik <[email protected]>
Signed-off-by: Rishikesh Betigeri <[email protected]>
Signed-off-by: Simon Kobler <[email protected]>
Signed-off-by: Simon Kobler <[email protected]>
Signed-off-by: Guillaume Jacquet <[email protected]>
Signed-off-by: Jan Wozniak <[email protected]>
Signed-off-by: Yaxhveer <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Co-authored-by: Paul Yu <[email protected]>
Co-authored-by: Josef Karasek <[email protected]>
Co-authored-by: Zbynek Roubalik <[email protected]>
Co-authored-by: Rishikesh <[email protected]>
Co-authored-by: Simon Kobler <[email protected]>
Co-authored-by: Simon Kobler <[email protected]>
Co-authored-by: Guillaume Jacquet <[email protected]>
Co-authored-by: Jan Wozniak <[email protected]>
Co-authored-by: Yashveer <[email protected]>
jkyros pushed a commit to jkyros/keda that referenced this pull request Aug 2, 2024
* bump golang

Signed-off-by: Jorge Turrado <[email protected]>

* chore: build with keda-tools:1.22.5 (kedacore#5971)

* chore: build with keda-tools:1.22.5
to resolve CVE-2024-24790, CVE-2024-24789, and CVE-2024-24791
bump github.com/Azure/azure-sdk-for-go/sdk/azidentity to resolve CVE-2024-35255

Signed-off-by: Paul Yu <[email protected]>

* chore: use go install instead of go get and replacing deprecated tools

Signed-off-by: Paul Yu <[email protected]>

* chore: vendor dependency cleanup

Signed-off-by: Paul Yu <[email protected]>

* Update missing references to 1.21

Signed-off-by: Jorge Turrado <[email protected]>

---------

Signed-off-by: Paul Yu <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Co-authored-by: Jorge Turrado Ferrero <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* [BUG-5922] Report failing ScaledJob triggers in status (kedacore#5916)

Signed-off-by: Josef Karasek <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* [BUG-5656] Annotate Jobs with parent ScaledJob generation (kedacore#5876)

* Annotate Jobs with parent ScaledJob generation

Signed-off-by: Josef Karasek <[email protected]>

* fix tests

Signed-off-by: Josef Karasek <[email protected]>

* fix lint

Signed-off-by: Josef Karasek <[email protected]>

* fix log message

Signed-off-by: Josef Karasek <[email protected]>

* update changelog

Signed-off-by: Josef Karasek <[email protected]>

* update changelog

Signed-off-by: Josef Karasek <[email protected]>

* update changelog

Signed-off-by: Josef Karasek <[email protected]>

---------

Signed-off-by: Josef Karasek <[email protected]>
Signed-off-by: Zbynek Roubalik <[email protected]>
Co-authored-by: Zbynek Roubalik <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* fix: `+srv` mongodb url scheme parsing bug (kedacore#5773)

This commit fixs issue kedacore#5760. where OP was facing problem with +srv schema

Signed-off-by: Rishikesh Betigeri <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* fix: issue when GitHub organization contains more than 30 repos (kedacore#5746)

Signed-off-by: Simon Kobler <[email protected]>
Signed-off-by: Simon Kobler <[email protected]>
Co-authored-by: Jorge Turrado Ferrero <[email protected]>
Co-authored-by: Simon Kobler <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* Fix scaler leak during cache refresh (kedacore#5807)

Signed-off-by: Guillaume Jacquet <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* Prepare release v2.14.1

Signed-off-by: Jorge Turrado <[email protected]>

* add missing change

Signed-off-by: Jorge Turrado <[email protected]>

* update changelog

Signed-off-by: Jorge Turrado <[email protected]>

* fix: e2e test regex check tag (kedacore#5831)

Signed-off-by: Jan Wozniak <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* Validate regex before building image for e2e test (kedacore#5783)

* added regex pre check before building image

Signed-off-by: Yaxhveer <[email protected]>

* updated changelog

Signed-off-by: Yaxhveer <[email protected]>

* refactored

Signed-off-by: Yaxhveer <[email protected]>

* corrected

Signed-off-by: Yaxhveer <[email protected]>

* corrected changelog

Signed-off-by: Yaxhveer <[email protected]>

* updated the workflow

Signed-off-by: Yaxhveer <[email protected]>

* updated the workflow

Signed-off-by: Yaxhveer <[email protected]>

---------

Signed-off-by: Yaxhveer <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>

* fix some pending tasks

Signed-off-by: Jorge Turrado <[email protected]>

* use AAD-Pod-Identity always

Signed-off-by: Jorge Turrado <[email protected]>

* use AAD-Pod-Identity always

Signed-off-by: Jorge Turrado <[email protected]>

---------

Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Paul Yu <[email protected]>
Signed-off-by: Josef Karasek <[email protected]>
Signed-off-by: Zbynek Roubalik <[email protected]>
Signed-off-by: Rishikesh Betigeri <[email protected]>
Signed-off-by: Simon Kobler <[email protected]>
Signed-off-by: Simon Kobler <[email protected]>
Signed-off-by: Guillaume Jacquet <[email protected]>
Signed-off-by: Jan Wozniak <[email protected]>
Signed-off-by: Yaxhveer <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Co-authored-by: Paul Yu <[email protected]>
Co-authored-by: Josef Karasek <[email protected]>
Co-authored-by: Zbynek Roubalik <[email protected]>
Co-authored-by: Rishikesh <[email protected]>
Co-authored-by: Simon Kobler <[email protected]>
Co-authored-by: Simon Kobler <[email protected]>
Co-authored-by: Guillaume Jacquet <[email protected]>
Co-authored-by: Jan Wozniak <[email protected]>
Co-authored-by: Yashveer <[email protected]>
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.

GitHub-Runner scaler discovering only first repo list page
3 participants