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

Fix cronjob running on disabled snaps #1743

Merged
merged 5 commits into from
Sep 20, 2023

Conversation

FrederikBolding
Copy link
Member

Fixes an issue where cronjobs would still fire on disabled snaps. The cronjob wouldn't succeed as the snap was not allowed to run, but the CronjobController would try to run the cronjob regardless.

Fixes #1720

@FrederikBolding FrederikBolding requested a review from a team as a code owner September 13, 2023 15:31
@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (1d7a1ff) 95.79% compared to head (bfa8d2a) 95.79%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1743   +/-   ##
=======================================
  Coverage   95.79%   95.79%           
=======================================
  Files         240      240           
  Lines        5469     5474    +5     
  Branches      852      852           
=======================================
+ Hits         5239     5244    +5     
  Misses        230      230           
Files Changed Coverage Δ
...snaps-controllers/src/cronjob/CronjobController.ts 97.08% <100.00%> (+0.11%) ⬆️
...ages/snaps-controllers/src/snaps/SnapController.ts 96.50% <100.00%> (+<0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@GuillaumeRx GuillaumeRx left a comment

Choose a reason for hiding this comment

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

Small nit: You added the SnapUpdated event but I can't see where you are using it

Forget this comment, it was already in before this change.

@FrederikBolding FrederikBolding merged commit b8e821a into main Sep 20, 2023
131 checks passed
@FrederikBolding FrederikBolding deleted the fb/fix-cronjob-running-on-disabled-snaps branch September 20, 2023 10:46
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.

Cronjob is still triggered after Snap is disabled in settings
2 participants