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

rfac: Improve cron scaler #6166

Merged
merged 2 commits into from
Oct 21, 2024
Merged

rfac: Improve cron scaler #6166

merged 2 commits into from
Oct 21, 2024

Conversation

rickbrouwer
Copy link
Contributor

@rickbrouwer rickbrouwer commented Sep 16, 2024

  • Added a cron parser
  • Simplified the code
  • Check if cron isWithinInterval

Checklist

Relates to #6056

@rickbrouwer rickbrouwer requested a review from a team as a code owner September 16, 2024 15:22
@rickbrouwer rickbrouwer marked this pull request as draft September 16, 2024 16:23
@rickbrouwer rickbrouwer marked this pull request as ready for review September 17, 2024 06:11
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.

LGTM! Nice improve!

@JorTurFer
Copy link
Member

JorTurFer commented Oct 6, 2024

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

@JorTurFer
Copy link
Member

JorTurFer commented Oct 6, 2024

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

@JorTurFer
Copy link
Member

e2e test if failing and I don't see any weird error related with panics or errors, could you take a look?

@rickbrouwer
Copy link
Contributor Author

rickbrouwer commented Oct 8, 2024

e2e test if failing and I don't see any weird error related with panics or errors, could you take a look?

Very strange. I made a change so that the deployment is installed first and is ready. Then the scaledObject will be installed so that it can be checked if it scales correctly.
Hopefully this helps. Can you rerun the test?

@wozniakjan
Copy link
Member

wozniakjan commented Oct 15, 2024

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

@wozniakjan
Copy link
Member

wozniakjan commented Oct 15, 2024

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

@JorTurFer
Copy link
Member

JorTurFer commented Oct 16, 2024

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

@JorTurFer
Copy link
Member

JorTurFer commented Oct 16, 2024

It's weird because based on logs, the scaler is working but it scales only from 0 to 1:
image

Could we have any error returning the value?

EDIT: yeah, check my next comment, we have a mistake in the logic because we return 0 during not active periods, which isn't right (and explains why the logs say 1 replica)

Signed-off-by: rickbrouwer <[email protected]>
@wozniakjan
Copy link
Member

wozniakjan commented Oct 21, 2024

/run-e2e cron
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 merged commit cf4026f into kedacore:main Oct 21, 2024
19 checks passed
rickbrouwer added a commit to rickbrouwer/keda that referenced this pull request Oct 21, 2024
@rickbrouwer rickbrouwer deleted the cron branch October 21, 2024 12:54
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.

3 participants