Remove disabled taps from smart scheduling - #166
Conversation
…mask on when a schedule is redistributed
|
Comment
You can also request review from a specific team by commenting 💡 If you see something that doesn't look right, check the configuration guide. |
This is currently a non-blocking check, and it will not prevent your Pull Request from being merged.The CODEOWNER of this repository has some untagged assets.As this is a public repository, asset details will not be shown. |
There was a problem hiding this comment.
Pull request overview
Changes: Bugfix (2), Maintenance (1)
This PR aims to prevent disabled schedules (“taps”) from being considered in smart scheduling calculations and to avoid retaining a stale smart_interval_mask when schedules are moved between nodes via spread_schedules.
Changes:
- Skip disabled schedules when building schedule objects for smart scheduling.
- Reset
smart_interval_maskwhen spreading schedules to a different server. - Bump package version to
0.10.2and document the changes in the changelog.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
setup.py |
Bumps the package version to 0.10.2. |
cicada/commands/spread_schedules.py |
Attempts to reset smart_interval_mask during schedule spreading (currently needs a DB-level NULL update to actually take effect). |
cicada/commands/smart_schedule.py |
Skips disabled schedules when constructing Schedule objects for optimisation. |
CHANGELOG.md |
Adds a 0.10.2 entry describing the intended behavior changes. |
Comments suppressed due to low confidence (1)
cicada/commands/spread_schedules.py:103
new_schedule_details["smart_interval_mask"] = Nonedoes not actually reset the value in the database:scheduler.update_schedule_details()never updatessmart_interval_mask, and its update logic generally skipsNonevalues. As a result, spread_schedules will retain the previous node’ssmart_interval_maskeven after reassignment.
A simple fix is to explicitly set the DB column to NULL in the commit path (or extend the scheduler helper to support this field).
new_schedule_details["smart_interval_mask"] = None # Reset smart_interval_mask to None when spreading schedules
next_enabled_server += 1
if next_enabled_server == valid_server_count:
next_enabled_server = 0
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🟡 Approvals from users who have not completed the mandatory secure code training will be rejected in 4 day(s). The following approver(s) still need to complete it:
|
de855ec to
cbeb00e
Compare
Context
Disabled taps are currently being included in the smart scheduling and when a schedule gets moved onto another node via spread_schedules it retains it's smart_interval_mask which was calculated on the previous nodes activity.
Also modifies the evaluation slightly to model the average schedule profile of a schedule better which typically has increased CPU usage in the first minute.

Checklist