Skip to content

Fix for Apple Calendar failing entire availability check because of Shared Calendars#7934

Merged
PeerRich merged 2 commits intomainfrom
hotfix/apple-shared-calendar-breaking
Mar 24, 2023
Merged

Fix for Apple Calendar failing entire availability check because of Shared Calendars#7934
PeerRich merged 2 commits intomainfrom
hotfix/apple-shared-calendar-breaking

Conversation

@alishaz-polymath
Copy link
Copy Markdown
Member

@alishaz-polymath alishaz-polymath commented Mar 24, 2023

What does this PR do?

Removes bad Broad Spectrum ReplaceAll call from the ICal body sanitizer function that resulted in poor EOL replacement in very specific situations on a shared Apple Calendar (and I imagine a few other calendars).

The Sanitizer function requires a nice proper testing and potentially revamp, but this should do as a hotfix for now without any major issues.

Fixes: #7201

Environment: Staging(main branch)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@alishaz-polymath alishaz-polymath added the 🐛 bug Something isn't working label Mar 24, 2023
@alishaz-polymath alishaz-polymath requested a review from a team March 24, 2023 16:42
@alishaz-polymath alishaz-polymath self-assigned this Mar 24, 2023
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
inkblot ❌ Failed (Inspect) Mar 24, 2023 at 5:00PM (UTC)
2 Ignored Deployments
Name Status Preview Comments Updated
cal ⬜️ Ignored (Inspect) Visit Preview Mar 24, 2023 at 5:00PM (UTC)
ui ⬜️ Ignored (Inspect) Visit Preview Mar 24, 2023 at 5:00PM (UTC)

Copy link
Copy Markdown
Member Author

@alishaz-polymath alishaz-polymath left a comment

Choose a reason for hiding this comment

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

Self Review

return obj.data
.replaceAll("\r\n", "\r")
.replaceAll("\r", "\r\n")
.replaceAll(/(: \r\n|:\r\n|\r\n:|\r\n :)/gm, ":")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This caused
URL;VALUE=URI:\r\nEND:VEVENT
to turn into
URL;VALUE=URI:END:VEVENT

This doesn't seem like much but it basically destroys the END of VEVENT by pulling it up instead of in a new line which is essential for the ICAL parser to know that that's the end of the VEVENT. 🤯

So,

URL;VALUE=URI:END:VEVENT

is what it becomes whereas it should have been

URL;VALUE=URI:
END:VEVENT

@PeerRich PeerRich requested a review from keithwillcode March 24, 2023 16:51
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 24, 2023

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

Two Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/booking/[uid] 123.31 KB 356.37 KB 101.82% (+/- <0.01%)
/event-types/[type] 382.09 KB 615.16 KB 175.76% (+/- <0.01%)
Details

Only 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 next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

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.

@deploysentinel
Copy link
Copy Markdown

Current Playwright Test Results Summary

✅ 52 Passing - ⚠️ 1 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 03/24/2023 05:06:07pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 263089a

Started: 03/24/2023 05:01:13pm UTC

⚠️ Flakes

📄   apps/web/playwright/event-types.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Event Types tests user can add multiple organizer address
Retry 1Initial Attempt
5.63% (12) 12 / 213 runs
failed over last 7 days
33.80% (72) 72 / 213 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Copy Markdown
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

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

You found a needle in the haystack @alishaz-polymath great work! 🙏🏽

Agreed that we should follow up with unit testing.

@PeerRich PeerRich merged commit 492858b into main Mar 24, 2023
@PeerRich PeerRich deleted the hotfix/apple-shared-calendar-breaking branch March 24, 2023 22:55
@PeerRich PeerRich added the core area: core, team members only label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working core area: core, team members only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conflict checks break with Apple Calendar

3 participants