You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When user moves a maintenance window calendar event to the past or deletes it, create a new event within ~30 seconds. See example of what Reclaim does here.
Documentation
Fleet server watches for potential changes for up to 1 week after original event time. If event is moved forward more than 1 week, then after 1 week Fleet server will check for event changes once every 30 minutes.
These near real-time updates may add additional load to the Google Calendar API, so it is recommended to use API usage alerts or other monitoring methods. Otherwise, if the Google API is overloaded, calendar updates and/or webhooks may be delayed.
Engineering
Database schema migrations: TODO
Load testing: TODO
ℹ️ Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".
QA
Risk assessment
Requires load testing: Yes
Risk level: High
Risk description: Performance risk when many calendar events are updated simultaneously.
Manual testing steps
Set up load test environment for calendar testing (with FLEET_GOOGLE_CALENDAR_PLUS_ADDRESSING).
Since we are using the same calendar for multiple events, the calendars are going to generate a lot of callbacks for each event change. So, for 100 events that are being all changed at the same time, the Fleet server will see 100*? <= 10,000 callbacks. This is larger than real life. For the purposes of load testing this feature, it should be sufficient to have 100 events on each calendar, but we can try and push it up to 1000 if things are behaving OK.
Make some unrelated simultaneous change to the calendars (like create/delete a random event). Monitor DB and Redis for any spikes. All events should remain the same.
Move all calendar events to the past (use move-events.go) -- make sure they are recreated.
Delete events (use delete-events.go) -- make sure they are recreated.
Redo the move/delete steps. And while it is happening, also trigger the calendar cron job.
To make cron also refetch all calendar events, set the event update times to >30 minutes but <1 day earlier, like this MySQL command: update calendar_events set updated_at = '2024-07-22 12:21:31';
Move all calendar events to current time -- make sure webhooks fire in the next ~5 minutes. Use Dave's Tines instance to receive webhooks since it has more bandwidth.
Testing notes
We now have a new tools/calendar/move-events/move-events.go script that can be used to check calendar events for users, including catching duplicates.
When creating a bunch of events on the same calendar, you may see these warnings on the server:
msg="Received calendar callback, but did not find corresponding event in database" event_uuid=6782ffb0-4d4b-4110-b458-3f8962c53d85 channel_id=0ac2ef07-272d-47e4-a8df-ae3ec63cb166
This occurs because callbacks are happening before we actually saved the event in our DB. This is fine and should not happen when there is only 1 event being created on 1 calendar.
Confirmation
Engineer (@____): Added comment to user story confirming successful completion of QA.
QA (@____): Added comment to user story confirming successful completion of QA.
Goal
Context
Changes
Product
Engineering
QA
Risk assessment
Manual testing steps
FLEET_GOOGLE_CALENDAR_PLUS_ADDRESSING).move-events.go) -- make sure they are recreated.delete-events.go) -- make sure they are recreated.update calendar_events set updated_at = '2024-07-22 12:21:31';Testing notes
We now have a new
tools/calendar/move-events/move-events.goscript that can be used to check calendar events for users, including catching duplicates.When creating a bunch of events on the same calendar, you may see these warnings on the server:
This occurs because callbacks are happening before we actually saved the event in our DB. This is fine and should not happen when there is only 1 event being created on 1 calendar.
Confirmation