Add subscribable iCal feeds for on-call rosters#4
Merged
Conversation
Expose .ics calendar feeds via S3 + CloudFront so core-team members can subscribe to the on-call schedule in Google Calendar or any calendar app that supports URL subscriptions. New commands: - /nf-core on-call calendar all — global feed with all assignments - /nf-core on-call calendar me — personal feed for the caller Calendars are regenerated automatically whenever the roster changes (switch, skip, reboot, unavailable) and on the Monday scheduler tick. URLs use an unguessable token for basic obfuscation. Infrastructure: S3 bucket + CloudFront distribution added to CDK stack.
This file contains hidden or 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
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.
Summary
/nf-core on-call calendar alland/nf-core on-call calendar mecommands that return subscribable iCal URLs for the on-call schedule.icsfiles to S3, served via CloudFront with unguessable token URLs (no auth needed)Infrastructure
nf-core-bot-calendars) withBLOCK_ALLpublic accesss3:PutObjectpermissionCALENDAR_S3_BUCKET,CALENDAR_CLOUDFRONT_DOMAINNew files
src/nf_core_bot/calendar/__init__.pysrc/nf_core_bot/calendar/generator.pyregenerate_calendars()src/nf_core_bot/commands/oncall/calendar_cmd.pytests/test_oncall_calendar.pyDesign decisions
safe_regenerate_calendars()wraps all calendar work in try/except so it never breaks existing functionality if S3 isn't configuredasyncio.create_taskfor fire-and-forget regeneration (user gets URL immediately)get_or_create_calendar_token()uses DynamoDBConditionExpressionto prevent race conditionsusers.infoAPI calls