Skip to content

Conversation

gburgessiv
Copy link
Member

This allows for easy cronjob writing. You can e.g., automatically --ensure-weeks=16 every month, and extend_rotation.py will handle making sure that you always have rotations covering up to a quarter out.

Tested by running locally on a few different values of --ensure-weeks.

This allows for easy cronjob writing. You can e.g., automatically
`--ensure-weeks=16` every month, and `extend_rotation.py` will handle
making sure that you always have rotations covering up to a quarter out.

Tested by running locally on a few different values of `--ensure-weeks`.
@gburgessiv gburgessiv requested a review from Copilot September 10, 2025 01:43
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new --ensure-weeks flag to the extend_rotation.py script, allowing users to specify how many weeks into the future the rotation schedule should cover. This enables automated cronjob usage where you can ensure a consistent coverage period (e.g., 16 weeks for quarterly planning) rather than adding a fixed number of rotations.

  • Replaces fixed --num-rotations parameter with mutually exclusive --num-rotations and --ensure-weeks options
  • Adds calculate_rotations_to_cover() function to determine how many rotations are needed for a given time period
  • Updates the main logic to calculate required rotations based on the chosen flag

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
extend_rotation.py Implements the new --ensure-weeks flag with supporting logic and argument parsing changes
extend_rotation_test.py Adds comprehensive test coverage for the new calculate_rotations_to_cover() function

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@gburgessiv gburgessiv marked this pull request as ready for review September 10, 2025 01:51
@gburgessiv gburgessiv requested a review from kbeyls September 10, 2025 01:51
@gburgessiv
Copy link
Member Author

Hey @kbeyls, would you be willing to TAL at this really fast, since you looked over the initial code drop? :)

Will squash the copilot fixup commit away when I go to merge.

Copy link
Contributor

@kbeyls kbeyls 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!

@gburgessiv
Copy link
Member Author

Thanks for your reviews!

@gburgessiv gburgessiv merged commit 0cd3266 into llvm:main Sep 10, 2025
1 check passed
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.

2 participants