[CORRUPTED] Synthetic Benchmark PR #26774 - feat: CalendarCache - filter generic calendars from subscription batch #702
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.
Benchmark PR calcom#26774
Type: Corrupted (contains bugs)
Original PR Title: feat: CalendarCache - filter generic calendars from subscription batch
Original PR Description: ## What does this PR do?
Configures
SelectedCalendarRepository.findNextSubscriptionBatchto ignore generic calendars (holidays, contacts, shared, imported, resource calendars) by filtering based on their externalId suffixes.Generic calendars are special calendars that shouldn't be subscribed to for sync because they're not user's personal calendars. For Google Calendar, these include calendars with suffixes like
@group.v.calendar.google.com,@group.calendar.google.com,@import.calendar.google.com, and@resource.calendar.google.com.Changes:
GENERIC_CALENDAR_SUFFIXESconstant inAdaptersFactorymapping providers to their generic calendar suffixesgetGenericCalendarSuffixes()method toAdapterFactoryinterfacefindNextSubscriptionBatchto accept and usegenericCalendarSuffixesparameter to filter out calendars with matching externalId suffixes using Prisma'sNOT+endsWithCalendarSubscriptionService.checkForNewSubscriptionsto pass generic calendar suffixes from the adapter factoryMandatory Tasks (DO NOT REMOVE)
How should this be tested?
SelectedCalendarRepositoryandCalendarSubscriptionServiceTZ=UTC yarn test packages/features/selectedCalendar/repositories/SelectedCalendarRepository.test.ts packages/features/calendar-subscription/lib/__tests__/CalendarSubscriptionService.test.ts@group.v.calendar.google.com) are not being pulled for subscriptionHuman Review Checklist
AND: undefinedcorrectly (should be ignored when no suffixes provided)Link to Devin run: https://app.devin.ai/sessions/fbf759af4f2242afb079020f2ff63245
Requested by: Volnei Munhoz (@volnei)
Original PR URL: calcom#26774