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

ci: 🧪 Update cron schedule for weekly poetry bot to run every hour #1516

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

Anselmoo
Copy link
Owner

@Anselmoo Anselmoo commented Aug 26, 2024

All PR-Submissions:


  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open
    Pull Requests for the same
    update/change?

New ✨✨ Feature-Submissions:


  • Does your submission pass tests?
  • Have you lint your code locally prior to submission? Fixed:
  • This PR is for a new feature, not a bug fix.

Changes to ⚙️ Core-Features:


  • Have you added an explanation of what your changes do and why you'd like
    us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

Summary by Sourcery

Modify the CI workflow to change the cron schedule for the weekly poetry bot, enabling it to run every hour instead of once a week.

CI:

  • Update the cron schedule for the weekly poetry bot to run every hour instead of every Sunday at midnight.

@Anselmoo Anselmoo enabled auto-merge August 26, 2024 03:41
Copy link

Review changes with SemanticDiff.

Copy link
Contributor

sourcery-ai bot commented Aug 26, 2024

Reviewer's Guide by Sourcery

This pull request updates the cron schedule for the weekly poetry bot in the GitHub Actions workflow. The change modifies the execution frequency from weekly to hourly.

File-Level Changes

Change Details Files
Modified the cron schedule for the weekly poetry update workflow
  • Commented out the previous weekly schedule (every Sunday at midnight)
  • Added a new hourly schedule (runs every hour)
  • Updated the cron expression from '0 0 * * 0' to '0 * * * *'
.github/workflows/weekly-poetry-bot.yml

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

@github-actions github-actions bot added the github-actions Pull requests that update Github_actions code label Aug 26, 2024
Copy link

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Anselmoo - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The change from weekly to hourly updates seems quite drastic. Have you considered a more moderate increase, such as daily updates? This could balance the benefits of more frequent updates with the potential risks of system load and instability.
  • With more frequent updates, what testing strategy do you have in place to ensure that these updates don't introduce instability or breaking changes? It would be helpful to outline this in the PR description.
Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@@ -2,7 +2,8 @@ name: Weekly Poetry Update

on:
schedule:
- cron: '0 0 * * 0' # Runs every Sunday at midnight
# - cron: '0 0 * * 0' # Runs every Sunday at midnight
- cron: '0 * * * *' # Runs every hour
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (performance): Reconsider the frequency of the cron job

The cron schedule has been changed from weekly to hourly, which seems excessive for a 'Weekly Poetry Update'. This could lead to unnecessary resource consumption and potential rate limiting issues with external services. Consider a less frequent schedule that balances the need for updates with resource efficiency, such as daily or a few times a week. If more frequent updates are indeed necessary, please provide justification and consider the impact on system stability and any external services this job might interact with.

Suggested change
- cron: '0 * * * *' # Runs every hour
- cron: '0 0 * * 1' # Runs every Monday at midnight

@@ -2,7 +2,8 @@

on:
schedule:
- cron: '0 0 * * 0' # Runs every Sunday at midnight
# - cron: '0 0 * * 0' # Runs every Sunday at midnight
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Remove commented-out code for clarity

The original cron schedule is left in the file as a commented-out line. To improve code clarity and maintainability, consider removing this line entirely if it's no longer needed. If it's kept for reference, add a clear comment explaining why.

Suggested change
# - cron: '0 0 * * 0' # Runs every Sunday at midnight
- cron: '0 * * * *'

Copy link

codecov bot commented Aug 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e22a943) to head (1e6758a).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1516   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           44        44           
  Lines         4466      4466           
=========================================
  Hits          4466      4466           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@Anselmoo Anselmoo merged commit e7e861a into main Aug 26, 2024
33 checks passed
@Anselmoo Anselmoo deleted the fix/test-weekly branch August 26, 2024 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github-actions Pull requests that update Github_actions code size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant