-
Notifications
You must be signed in to change notification settings - Fork 495
feat: allow changing pool slots on cron schedules #649
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
feat: allow changing pool slots on cron schedules #649
Conversation
Signed-off-by: Daniel Morales <[email protected]>
Signed-off-by: Daniel Morales <[email protected]>
5978d4e to
0956ee6
Compare
Signed-off-by: Daniel Morales <[email protected]>
eadfee9 to
da1ca3f
Compare
|
Hi @thesuperzapper, I would like to introduce the scheduled pools to enable scheduled autoscaling policies to the sync pools. The code is very simple just like its interface as shown below: |
|
This issue has been automatically marked as stale because it has not had activity in 60 days. Thank you for your contributions. Issues never become stale if any of the following is true:
|
thesuperzapper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DanielMorales9 This is an interesting idea, but it needs more discussion.
I think we can remove the need for the global variables, while also making the behavior more stable by making a change to your logic.
The main goal I want to achieve is that even if we are not "at a scheduled update time" we should revert to the slot_count that would have been most recently applied (if someone makes a manual change in the UI we should revert it at the next sync, for example).
We can do this by using the croniter.get_prev() function on each of the defined schedules at each sync using the current time as the start_time, and applying the schedule with the most recent previous time.
For example:
croniter(expr_format="0 12 * * *", start_time=datetime.now()).get_prev(ret_type=datetime)This approach means we have no state to hold, and there is no ambiguity at the first sync about which schedule to use. Also note, in this approach the non-schedule slots defined in the user's values will never be applied.
9a2c726 to
c7722a7
Compare
Signed-off-by: Daniel Morales <[email protected]>
c7722a7 to
86b93cc
Compare
Signed-off-by: Daniel Morales <[email protected]>
a21b225 to
67d2553
Compare
Signed-off-by: Daniel Morales <[email protected]>
Signed-off-by: Daniel Morales <[email protected]>
Signed-off-by: Daniel Morales <[email protected]>
|
Hi @thesuperzapper could you take another look at the PR? |
40fb46c to
83c6222
Compare
Signed-off-by: Daniel Morales <[email protected]>
83c6222 to
c0bb8f3
Compare
Signed-off-by: Daniel Morales <[email protected]>
Signed-off-by: Mathew Wicks <[email protected]>
thesuperzapper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DanielMorales9 thanks for your patience, I will be including this in the 8.7.0 chart release today!
Also, I have pushed a commit to your branch with some changes and docs in preparation for this.
Signed-off-by: Mathew Wicks <[email protected]>
What does your PR do?
Introducing the scheduled pool implementation enables sync functionality to bump or reduce the number of pool slots on a specific recurrence.
Checklist
For all Pull Requests
For releasing ONLY