-
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
split date ranges for calling /freebusy endpoint #11962
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details:
|
const diff = originalEndDate.diff(originalStartDate, "days"); | ||
|
||
// /freebusy from google api only allows a date range of 90 days | ||
if (diff <= 90) { |
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.
similar logic as we have it for zohocalendar
📦 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! 🙌 |
}); | ||
return c; | ||
}, [] as Prisma.PromiseReturnType<CalendarService["getAvailability"]>); | ||
return result; | ||
} | ||
|
||
async getAvailability( |
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.
Unsure how to write a test for this. @joeauyeung Do we already have tests for google calendar
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.
We don't have any merged yet but it's in the works.
@@ -369,57 +370,75 @@ export default class GoogleCalendarService implements Calendar { | |||
timeMin: string; | |||
timeMax: string; | |||
items: { id: string }[]; | |||
}): Promise<calendar_v3.Schema$FreeBusyResponse> { | |||
}): Promise<EventBusyDate[] | 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.
The only thing that changed in the getCacheOrFetchAvailability
function is that we return nowEventBusyDate[]
instead of calendar_v3.Schema$FreeBusyResponse
Current Playwright Test Results Summary✅ 182 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 10/19/2023 03:07:18pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: a44cb33 Started: 10/19/2023 03:04:26pm UTC
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Stripe integration When event is paid and confirmed Cancelled paid booking should be refunded
Retry 1 • Initial Attempt |
0.65% (2)2 / 309 runsfailed over last 7 days |
2.59% (8)8 / 309 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.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 |
---|---|---|
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1 • Initial Attempt |
3.14% (10)10 / 318 runsfailed over last 7 days |
36.79% (117)117 / 318 runsflaked over last 7 days |
Popup Tests should be able to reschedule
Retry 1 • Initial Attempt |
8.20% (26)26 / 317 runsfailed over last 7 days |
89.91% (285)285 / 317 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% (0)0 / 307 runsfailed over last 7 days |
2.93% (9)9 / 307 runsflaked over last 7 days |
📄 apps/web/playwright/change-username.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Change username on settings User can change username
Retry 1 • Initial Attempt |
0.32% (1)1 / 312 runfailed over last 7 days |
20.83% (65)65 / 312 runsflaked over last 7 days |
📄 apps/web/playwright/availability.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Availablity tests Date Overrides
Retry 1 • Initial Attempt |
4.13% (13)13 / 315 runsfailed over last 7 days |
1.90% (6)6 / 315 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.
LGTM
Timeslots are being blocked in both Oct and Feb
BTW This is conflicting with my calendar cache PR #11928 😢 |
Should I help merge it into your branch? Or how would you wanna handle it? |
I tagged you in a comment explaining my solution. Let me know if t achieves se same effect. Also I do need the raw gCal response in order to use in the inbound webhook. Hence all other changes for this PR were reverted. |
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
What does this PR do?
Follow up from #11696 (comment)
The Google /freeBusy endpoint has a maximum time span of 90 days. However, in the column view longer timespans can happen. With this PR the duration is segmented into shorter timespans.
Fixes #11704
Type of change
How should this be tested?