Skip to content
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

perf: Don't process date overrides outside of requested boundaries #13495

Merged
merged 36 commits into from
Feb 7, 2024

Conversation

keithwillcode
Copy link
Contributor

What does this PR do?

Fixes #13358.

Date overrides on user's availability settings were being added to the list of slots and their calculations even when the overrides fell outside of the start/end window of the requested schedule.

Type of change

  • Chore (refactoring code, technical debt, workflow improvements)

How should this be tested?

  • Ensure test suite passes and date overrides outside of getSchedule boundaries are not included in the list of available slots

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

@keithwillcode keithwillcode requested a review from a team February 1, 2024 16:03
Copy link

vercel bot commented Feb 1, 2024

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

Name Status Preview Comments Updated (UTC)
ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 7, 2024 3:08am
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 7, 2024 3:08am
cal-demo 🔄 Building (Inspect) Visit Preview 💬 Add feedback Feb 7, 2024 3:08am
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Feb 7, 2024 3:08am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Feb 7, 2024 3:08am
qa ⬜️ Ignored (Inspect) Visit Preview Feb 7, 2024 3:08am
ui ⬜️ Ignored (Inspect) Visit Preview Feb 7, 2024 3:08am

Copy link
Contributor

github-actions bot commented Feb 1, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@github-actions github-actions bot added bookings area: bookings, availability, timezones, double booking foundation performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive Urgent Created by Linear-GitHub Sync labels Feb 1, 2024
@keithwillcode keithwillcode added the core area: core, team members only label Feb 1, 2024
Copy link
Contributor

github-actions bot commented Feb 1, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link

deploysentinel bot commented Feb 1, 2024

Current Playwright Test Results Summary

✅ 440 Passing - ⚠️ 21 Flaky

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

(Last updated on 02/07/2024 03:20:06am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: e291492

Started: 02/07/2024 03:12:20am UTC

⚠️ Flakes

📄   apps/web/playwright/booking-pages.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
pro user -- legacy Time slots should be reserved when selected
Retry 1Initial Attempt
0% (0) 0 / 236 runs
failed over last 7 days
4.66% (11) 11 / 236 runs
flaked over last 7 days

📄   apps/web/playwright/booking/longTextQuestion.e2e.ts • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Long Text Question and Each Other Question Booking With Long Text Question and checkbox Question Long Text and checkbox required
Retry 1Initial Attempt
0% (0) 0 / 275 runs
failed over last 7 days
5.82% (16) 16 / 275 runs
flaked over last 7 days
Booking With Long Text Question and Each Other Question Booking With Long Text Question and select Question Long Text required and select not required
Retry 2Retry 1Initial Attempt
1.11% (3) 3 / 270 runs
failed over last 7 days
5.19% (14) 14 / 270 runs
flaked over last 7 days

📄   apps/web/playwright/booking/selectQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Phone Question and Each Other Question Booking With Select Question and Number Question Select and Number not required
Retry 1Initial Attempt
0% (0) 0 / 256 runs
failed over last 7 days
4.69% (12) 12 / 256 runs
flaked 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
Login and logout tests -- future Login flow validations -- legacy Should warn when user does not exist
Retry 1Initial Attempt
0.36% (1) 1 / 276 run
failed over last 7 days
2.90% (8) 8 / 276 runs
flaked over last 7 days

📄   apps/web/playwright/booking/responsiveBooking.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking page with no questions Booking page with 1280x720 resolution
Retry 1Initial Attempt
0.76% (2) 2 / 262 runs
failed over last 7 days
3.44% (9) 9 / 262 runs
flaked over last 7 days

📄   apps/web/playwright/booking/checkboxGroupQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Checkbox Group Question and Each Other Question Booking With Checkbox Group Question and Address Question Booking With Checkbox Group Question and multiselect Question Checkbox Group and multiselect text not required
Retry 1Initial Attempt
0.35% (1) 1 / 283 run
failed over last 7 days
4.59% (13) 13 / 283 runs
flaked over last 7 days

📄   apps/web/playwright/booking/radioGroupQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Radio Question and Each Other Question Booking With Radio Question and Address Question Booking With Radio Question and Number Question Radio and Number not required
Retry 1Initial Attempt
0.73% (2) 2 / 273 runs
failed over last 7 days
6.23% (17) 17 / 273 runs
flaked over last 7 days

📄   apps/web/playwright/booking/allQuestions.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With All Questions Selecting and filling all questions as required
Retry 1Initial Attempt
0.69% (2) 2 / 288 runs
failed over last 7 days
3.82% (11) 11 / 288 runs
flaked over last 7 days

📄   apps/web/playwright/booking/addressQuestione2e/addressQuestion.e2e.ts • 3 Flakes

Top 1 Common Error Messages

null

3 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Address Question and Each Other Question Booking With Address Question and Checkbox Question Address required and checkbox required
Retry 1Initial Attempt
2.32% (7) 7 / 302 runs
failed over last 7 days
5.30% (16) 16 / 302 runs
flaked over last 7 days
Booking With Address Question and Each Other Question Booking With Address Question and Multi email Question Address and Multi email not required
Retry 1Initial Attempt
0% (0) 0 / 292 runs
failed over last 7 days
7.19% (21) 21 / 292 runs
flaked over last 7 days
Booking With Address Question and Each Other Question Booking With Address Question and Radio group Question Address and Radio group not required
Retry 1Initial Attempt
0% (0) 0 / 289 runs
failed over last 7 days
4.15% (12) 12 / 289 runs
flaked over last 7 days

📄   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 -- future user Different Locations Tests can add Attendee Phone Number location and book with it
Retry 1Initial Attempt
1.97% (6) 6 / 305 runs
failed over last 7 days
7.87% (24) 24 / 305 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 8 Flakes

Top 1 Common Error Messages

null

8 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 1Initial Attempt
-3.46% (-10) -10 / 289 runs
failed over last 7 days
53.29% (154) 154 / 289 runs
flaked over last 7 days
Popup Tests should be able to reschedule
Retry 1Initial Attempt
-106.94% (-154) -154 / 144 runs
failed over last 7 days
106.94% (154) 154 / 144 runs
flaked 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 1Initial Attempt
-99.29% (-140) -140 / 141 runs
failed over last 7 days
99.29% (140) 140 / 141 runs
flaked over last 7 days
Popup Tests should open Routing Forms embed on click
Retry 1Initial Attempt
-93.79% (-136) -136 / 145 runs
failed over last 7 days
96.55% (140) 140 / 145 runs
flaked 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 configured with 'auto' theme using Embed API
Retry 1Initial Attempt
-99.29% (-140) -140 / 141 runs
failed over last 7 days
99.29% (140) 140 / 141 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Booker Profile Page) with dark theme when configured with dark theme using Embed API
Retry 1Initial Attempt
-99.29% (-140) -140 / 141 runs
failed over last 7 days
99.29% (140) 140 / 141 runs
flaked over last 7 days
Popup Tests prendered embed should be loaded and apply the config given to it
Retry 1Initial Attempt
-99.29% (-140) -140 / 141 runs
failed over last 7 days
99.29% (140) 140 / 141 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Event Booking Page) with dark theme when configured with dark theme using Embed API
Retry 1Initial Attempt
-99.29% (-140) -140 / 141 runs
failed over last 7 days
99.29% (140) 140 / 141 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Member

@sean-brydon sean-brydon left a comment

Choose a reason for hiding this comment

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

Tested locally - can confirm we now don't fetch these date overrides outside of the range

After:
CleanShot 2024-02-07 at 11 12 01@2x

@keithwillcode keithwillcode merged commit 0990549 into main Feb 7, 2024
38 of 39 checks passed
@keithwillcode keithwillcode deleted the perf/get-schedule-end-time-ignored branch February 7, 2024 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bookings area: bookings, availability, timezones, double booking core area: core, team members only foundation High priority Created by Linear-GitHub Sync performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive Urgent Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-2994] Fix round robin perf issues
3 participants