Update project cleanup schedule to run every 4 hours#5381
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances resource management by significantly increasing the frequency of the project cleanup process. By adjusting the execution schedule from once a day to every four hours, the system will more proactively identify and remove orphaned resources, thereby minimizing their accumulation and improving overall system hygiene. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
LAVEEN
left a comment
There was a problem hiding this comment.
LGTM. After merge , please cross check if the running tests which runs at midnight doesn't get impacted as TTL is in place.
There was a problem hiding this comment.
Code Review
This pull request updates the project cleanup schedule to run every 4 hours, which is a sensible change to prevent the accumulation of orphaned resources. The new cron expression 30 3-23/4 * * * correctly schedules the job as intended. My review includes a suggestion to improve the readability and maintainability of the cron expression by explicitly listing the hours, in line with the project's style guide.
f65ba73
into
GoogleCloudPlatform:develop
Summary
Updates the daily_project_cleanup_schedule module to execute every 4 hours instead of once per day. The new cron expression 30 3-23/4 * * * increases the frequency of resource cleanup to prevent accumulation of orphaned resources while specifically ensuring that the original 11:30 PM (23:30) slot is maintained.
The job will now run at the following times:
03:30, 07:30, 11:30, 15:30, 19:30, and 23:30.
Note
The use of the 3-23/4 range provides a 3-hour offset from midnight (23(mod4)=3), which is mathematically required to ensure the job hits the 11:00 PM hour while maintaining a consistent 4-hour interval.