-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add consistent iCalUID #12122
feat: Add consistent iCalUID #12122
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
5 Ignored Deployments
|
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
📦 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✅ 333 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 12/15/2023 03:23:58pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 9be58d4 Started: 12/15/2023 03:14:28pm UTC
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Event Types tests user -- legacy Different Locations Tests Can remove location from multiple locations that are saved
Retry 1 • Initial Attempt |
0% (0)0 / 245 runsfailed over last 7 days |
1.63% (4)4 / 245 runsflaked over last 7 days |
📄 apps/web/playwright/locale.e2e.ts • 13 Flakes
Top 1 Common Error Messages
|
13 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
unauthorized user sees correct translations (de) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-13.79% (-36)-36 / 261 runsfailed over last 7 days |
13.79% (36)36 / 261 runsflaked over last 7 days |
unauthorized user sees correct translations (ar) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-13.79% (-36)-36 / 261 runsfailed over last 7 days |
13.79% (36)36 / 261 runsflaked over last 7 days |
unauthorized user sees correct translations (zh) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-13.79% (-36)-36 / 261 runsfailed over last 7 days |
13.79% (36)36 / 261 runsflaked over last 7 days |
unauthorized user sees correct translations (zh-CN) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-13.79% (-36)-36 / 261 runsfailed over last 7 days |
13.79% (36)36 / 261 runsflaked over last 7 days |
unauthorized user sees correct translations (zh-TW) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-13.79% (-36)-36 / 261 runsfailed over last 7 days |
13.79% (36)36 / 261 runsflaked over last 7 days |
unauthorized user sees correct translations (pt) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-13.79% (-36)-36 / 261 runsfailed over last 7 days |
13.79% (36)36 / 261 runsflaked over last 7 days |
unauthorized user sees correct translations (pt-br) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-13.79% (-36)-36 / 261 runsfailed over last 7 days |
13.79% (36)36 / 261 runsflaked over last 7 days |
unauthorized user sees correct translations (es-419) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-13.79% (-36)-36 / 261 runsfailed over last 7 days |
13.79% (36)36 / 261 runsflaked over last 7 days |
authorized user sees correct translations (de) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-13.79% (-36)-36 / 261 runsfailed over last 7 days |
13.79% (36)36 / 261 runsflaked over last 7 days |
authorized user sees correct translations (pt-br) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-13.79% (-36)-36 / 261 runsfailed over last 7 days |
13.79% (36)36 / 261 runsflaked over last 7 days |
authorized user sees correct translations (ar) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-13.79% (-36)-36 / 261 runsfailed over last 7 days |
13.79% (36)36 / 261 runsflaked over last 7 days |
authorized user sees changed translations (de->ar) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-2.30% (-6)-6 / 261 runsfailed over last 7 days |
11.49% (30)30 / 261 runsflaked over last 7 days |
authorized user sees changed translations (de->pt-BR) [locale1] should return correct translations and html attributes
Retry 1 • Initial Attempt |
-8.86% (-21)-21 / 237 runsfailed over last 7 days |
11.81% (28)28 / 237 runsflaked over last 7 days |
📄 apps/web/playwright/reschedule.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Reschedule Tests Should do a reschedule from user owner
Retry 1 • Initial Attempt |
0% (0)0 / 261 runsfailed over last 7 days |
10.73% (28)28 / 261 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 3 Flakes
Top 1 Common Error Messages
|
3 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1 • Initial Attempt |
0.75% (2)2 / 266 runsfailed over last 7 days |
60.53% (161)161 / 266 runsflaked over last 7 days |
Popup Tests should open Routing Forms embed on click
Retry 1 • Initial Attempt |
0.38% (1)1 / 265 runfailed over last 7 days |
48.30% (128)128 / 265 runsflaked over last 7 days |
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when no theme is configured through Embed API
Retry 1 • Initial Attempt |
0% (0)0 / 265 runsfailed over last 7 days |
81.89% (217)217 / 265 runsflaked over last 7 days |
📄 apps/web/playwright/login.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
user can login & logout succesfully login flow user & logout using dashboard
Retry 1 • Initial Attempt |
0.77% (2)2 / 260 runsfailed over last 7 days |
25.38% (66)66 / 260 runsflaked over last 7 days |
📄 apps/web/playwright/team/team-invitation.e2e.ts • 2 Flakes
Top 1 Common Error Messages
|
2 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Team Invitation (non verified)
Retry 1 • Initial Attempt |
4.56% (12)12 / 263 runsfailed over last 7 days |
92.02% (242)242 / 263 runsflaked over last 7 days |
Team Invitation (verified)
Retry 1 • Initial Attempt |
0.38% (1)1 / 263 runfailed over last 7 days |
93.92% (247)247 / 263 runsflaked over last 7 days |
📄 apps/web/playwright/organization/organization-creation.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Organization should be able to create an organization and complete onboarding
Retry 1 • Initial Attempt |
22.22% (60)60 / 270 runsfailed over last 7 days |
45.56% (123)123 / 270 runsflaked over last 7 days |
📄 apps/web/playwright/webhook.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
FORM_SUBMITTED on submitting user form, triggers user webhook
Retry 1 • Initial Attempt |
0.38% (1)1 / 264 runfailed over last 7 days |
6.06% (16)16 / 264 runsflaked over last 7 days |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments. But we should also add unit tests to this to confirm the logic for calculating the UID and sequence.
|
||
*/ | ||
-- AlterTable | ||
ALTER TABLE "Booking" ADD COLUMN "iCalSequence" INTEGER NOT NULL DEFAULT 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These adds are out of order compared to the code. Intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify - The order specified throughout the code is iCalUID
and then iCalSequence
. See prisma schema.
This alter table statement has them in the reverse order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was generated using prisma migrate
. I can fix this and moving forward ensure that the adds line up with the schema.
*/ | ||
-- AlterTable | ||
ALTER TABLE "Booking" ADD COLUMN "iCalSequence" INTEGER NOT NULL DEFAULT 0, | ||
ADD COLUMN "iCalUID" TEXT NOT NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a TEXT column and not VARCHAR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was generated using prisma migrate
. I can change this and moving forward I'll change the column type to VARCHAR
when appropriate.
packages/prisma/schema.prisma
Outdated
@@ -417,6 +417,8 @@ model Booking { | |||
/// @zod.custom(imports.bookingMetadataSchema) | |||
metadata Json? | |||
isRecorded Boolean @default(false) | |||
iCalUID String @db.VarChar() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keithwillcode added @db.VarChar()
to the schema maps the column to VARCHAR
since Prisma will default map the column to TEXT
for Postgres.
https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#default-type-mappings
@@ -42,6 +43,8 @@ export default class AttendeeWasRequestedToRescheduleEmail extends OrganizerSche | |||
// @OVERRIDE | |||
protected getiCalEventAsString(): string | undefined { | |||
const icsEvent = createEvent({ | |||
uid: this.calEvent.iCalUID || this.calEvent.uid!, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick
: I'm tending to start telling people to use nullish coalescing, eg:
uid: this.calEvent.iCalUID || this.calEvent.uid!, | |
uid: this.calEvent.iCalUID ?? this.calEvent.uid!, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, do we have no guarantee of this.calEvent.uid
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's interesting. I've seen this in our codebase before. Looking at the schema, uid
is required when saving bookings. Although the CalendarEvent
type we often use in the code base sets uid
as possibly undefined.
@@ -42,6 +43,8 @@ export default class AttendeeWasRequestedToRescheduleEmail extends OrganizerSche | |||
// @OVERRIDE | |||
protected getiCalEventAsString(): string | undefined { | |||
const icsEvent = createEvent({ | |||
uid: this.calEvent.iCalUID || this.calEvent.uid!, | |||
sequence: 100, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question-non-blocking
: What's sequence 100?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So when calendars parse .ics files they look at the sequence number to determine the most up-to-date information. Sequences start at 0. When requesting to reschedule, we cancel the calendar event. As a fallback, I wanted the sequence to be so high that it would likely be the most up-to-date .ics file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked with @joeauyeung and this has been tested thoroughly.
Changes made
What does this PR do?
This is a part of stacked PRs that aim to refactor how we handle
.ics
files.This PR adds the
iCalUID
and theiCalSequence
to the booking record. This is a part of a stack PRs that aims to unify the.ics
file that we sent.Fixes # (issue)
Requirement/Documentation
Type of change
How should this be tested?
iCalUID
should be${uid}@cal.com
in the DB and the .ics file sentiCalSequence
should be set to 0iCalUID
should be the same as the original bookingiCalSequence
should be set to 1iCalUID
should come from Outlook as you can not set theicalUID
through the APIMandatory Tasks
Checklist