Skip to content

Backend/events: Add GetEventCalendarFile API#9326

Open
tristanlabelle wants to merge 9 commits into
developfrom
backend/feature/GetEventCalendarFile
Open

Backend/events: Add GetEventCalendarFile API#9326
tristanlabelle wants to merge 9 commits into
developfrom
backend/feature/GetEventCalendarFile

Conversation

@tristanlabelle

@tristanlabelle tristanlabelle commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

This API will support a button on the frontend to download a calendar file for the event.

Includes some refactoring of the ics generation code and tests, the biggest visible result being that we now create a sequence number based on a timestamp to support an arbitrary number of updates.

Fixes #9328

Testing

Added & updated tests.

Backend checklist

  • Added tests for any new code or added a regression test if fixing a bug
  • Run the backend locally and it works
  • Added migrations if there are any database changes, rebased onto develop if necessary for linear migration history

For maintainers

  • Maintainers can push commits to my branch
  • Maintainers can merge this PR for me

@CouchersBot

CouchersBot commented Jul 24, 2026

Copy link
Copy Markdown
Member

Web (Vercel)

View the Vercel web preview for this branch.

Backend

Schema Schema diff Sample emails

Other

Protos Backend coverage Web coverage

@tristanlabelle
tristanlabelle marked this pull request as ready for review July 25, 2026 18:54
@tristanlabelle
tristanlabelle requested a review from aapeliv as a code owner July 25, 2026 18:54
@tristanlabelle
tristanlabelle requested a review from a team July 25, 2026 18:54

@aapeliv aapeliv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm but let's keep the to_aware_datetime function simple

Comment on lines +118 to +120
if isinstance(timezone, str):
timezone = ZoneInfo(timezone)
return ts.ToDatetime(tzinfo=timezone)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's keep this function as a clean "protobuf object -> instant of time" function. we can do the conversion elsewhere or have another helper, but it is non-intuitive to many (including myself) what it means to pass in a timzone into this function; as this function is converting "naive" timestamps into "aware" ones. so let's keep it dumb and do the presentation semantics elsewhere.

Comment thread app/proto/events.proto

// TODO: DownloadCalendarInvite
rpc GetEventCalendarFile(GetEventCalendarFileReq) returns (GetEventCalendarFileRes) {
// Downloads a calendar file for an event

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

if you want to eventually use this as a pure HTTP JSON endpoint, you can add transcoding and use the http_body stuff (see GIS servicer)

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.

Backend/events: Implement API for getting the event calendar file

3 participants