Caldav/refactor: Mutiple Fixes and General code improvement#8031
Caldav/refactor: Mutiple Fixes and General code improvement#8031
Conversation
…e to one bad ICAL body
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Current Playwright Test Results Summary✅ 52 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 04/12/2023 01:24:11pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 16f0b3c Started: 04/12/2023 01:17:18pm UTC
|
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Wipe my Cal App Test Browse upcoming bookings and validate button shows and triggering wipe my cal button
Retry 1 • Initial Attempt |
0% (0)0 / 207 runsfailed over last 7 days |
0.97% (2)2 / 207 runsflaked over last 7 days |
📄 apps/web/playwright/embed-code-generator.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Embed Code Generator Tests Event Type Edit Page open Embed Dialog for the Event Type
Retry 2 • Retry 1 • Initial Attempt |
4.05% (9)9 / 222 runsfailed over last 7 days |
22.52% (50)50 / 222 runsflaked over last 7 days |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 One Page Changed SizeThe following page changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Forty-three Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
alishaz-polymath
left a comment
There was a problem hiding this comment.
Self Review added
| function getFileExtension(url: string): string { | ||
| // Return null if the URL does not have a file extension | ||
| if (!hasFileExtension(url)) return null; | ||
| if (!hasFileExtension(url)) return "ics"; |
There was a problem hiding this comment.
We assume that an extensionless object is of the .ics extension as is the case for most if not all Calendar Objects
| try { | ||
| const jcalData = ICAL.parse(sanitizeCalendarObject(object)); | ||
| vcalendar = new ICAL.Component(jcalData); |
There was a problem hiding this comment.
We place ICAL.parse in a try-catch as .parse function throws error when the object is not of iCalendar 2.0 standard, and it ends up breaking the working calendars as well. The try-catch fails it without breaking the flow.
| return; | ||
| // const vevent = vcalendar.getFirstSubcomponent("vevent"); | ||
| const vevents = vcalendar.getAllSubcomponents("vevent"); | ||
| vevents.forEach((vevent) => { |
There was a problem hiding this comment.
A single Calendar Object might contain multiple events when we're talking about expanded recurring events in particular. Placing them in a forEach ensures we don't miss the next events. This fixes the earlier issue where only the first occurrence of a recurring event was being considered for the freebusy check.
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Two Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
leog
left a comment
There was a problem hiding this comment.
Code looks good, approving.
What does this PR do?
Refactoring the CalDAV and Apple Calendar code to improve overall stability and support for various caldav services
EXPANDproperty in the fetching of the Calendar Objects (eg. Zoho) and they do this in the back-end. Since there is no way to know for sure ifEXPANDproperty is supported or not, we first send the request with theEXPANDproperty and then if that returns empty (silent failure) we make a call without theEXPANDproperty..icsfile and treats it as such. This adds support to the Service Providers which send valid ICAL objects without an extension.Fixes #7796 #7570 #5604 #5238 #8098 #8166
To follow up:
Follow ups issues to fix: #5570
Environment: Staging(main branch)
Type of change
How should this be tested?
Checklist