-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Non destructive sync option (keep-old) #91
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keithbrink
force-pushed
the
non-destructive-sync
branch
from
July 28, 2023 17:55
5fa2f4f
to
bb50764
Compare
I see #90 was merged while I was writing this :) |
freekmurze
requested changes
Jul 30, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this!
@freekmurze Updates made as requested |
keithbrink
changed the title
Non destructive sync option (push)
Non destructive sync option (keep-old)
Jul 31, 2023
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had an issue recently where I created a cron job I wanted to monitor on the Oh Dear dashboard, and it was deleted the next time I synced my schedule. I created a separate PR to document to call out this behaviour (#90), but it would not be needed if this PR is merged.
This PR adds a
--keep-old
option to the sync command that will only create new monitors on Oh Dear, rather than a destructive sync. This has the downside of not removing monitors for jobs that no longer exist in the schedule or updating changes to existing monitors, but allows you to get 90% of the benefits of syncing while still being able to monitor cron jobs not managed by Laravel.There is the possibility of adding support for updating existing monitors by matching the ping url, but interested to get feedback on this first.
I had some issues with the tests not creating snapshots properly, not too sure what the issue was there but I added the pest snapshot plugin as I believe that was the issue; let me know if I'm missing something.