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

fix: disable emails for platform #15089

Merged
merged 5 commits into from
May 17, 2024
Merged

Conversation

Ryukemeister
Copy link
Contributor

What does this PR do?

This PR adds a check to disable sending org creation and verification emails for a platform user.

NOTE: This is a temporary fix for the time being and won't be needed after #14911 is merged

Copy link
Contributor

github-actions bot commented May 17, 2024

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

@keithwillcode keithwillcode added core area: core, team members only platform Anything related to our platform plan labels May 17, 2024
@graphite-app graphite-app bot requested a review from a team May 17, 2024 08:00
@dosubot dosubot bot added emails area: emails, cancellation email, reschedule email, inbox, spam folder, not getting email 🐛 bug Something isn't working labels May 17, 2024
ThyMinimalDev
ThyMinimalDev previously approved these changes May 17, 2024
@ThyMinimalDev ThyMinimalDev enabled auto-merge (squash) May 17, 2024 08:02
Copy link

graphite-app bot commented May 17, 2024

Graphite Automations

"Add platform team as reviewer" took an action on this PR • (05/17/24)

1 reviewer was added to this PR based on Keith Williams's automation.

Copy link
Contributor

github-actions bot commented May 17, 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 May 17, 2024

Current Playwright Test Results Summary

✅ 321 Passing - ⚠️ 34 Flaky

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

(Last updated on 05/17/2024 12:31:56pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 6cbd1c9

Started: 05/17/2024 12:27:29pm UTC

⚠️ Flakes

📄   apps/web/playwright/webhook.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
MEETING_ENDED, MEETING_STARTED should create/remove scheduledWebhookTriggers for existing bookings
Retry 2Retry 1Initial Attempt
5.06% (9) 9 / 178 runs
failed over last 7 days
34.27% (61) 61 / 178 runs
flaked over last 7 days

📄   apps/web/playwright/integrations-stripe.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
Stripe integration Paid booking should be able to be rescheduled
Retry 1Initial Attempt
3.35% (7) 7 / 209 runs
failed over last 7 days
14.83% (31) 31 / 209 runs
flaked over last 7 days
Stripe integration Paid booking should be able to be cancelled
Retry 1Initial Attempt
1.92% (4) 4 / 208 runs
failed over last 7 days
11.54% (24) 24 / 208 runs
flaked over last 7 days

📄   apps/web/playwright/payment-apps.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
Payment app Should be able to edit paypal price, currency
Retry 1Initial Attempt
1.14% (3) 3 / 264 runs
failed over last 7 days
1.14% (3) 3 / 264 runs
flaked over last 7 days
Payment app when more than one payment app is installed the price should be updated when changing settings
Retry 1Initial Attempt
1.14% (3) 3 / 264 runs
failed over last 7 days
0.76% (2) 2 / 264 runs
flaked over last 7 days
Payment app Should display App is not setup already for alby
Retry 1Initial Attempt
1.14% (3) 3 / 264 runs
failed over last 7 days
1.52% (4) 4 / 264 runs
flaked over last 7 days
Payment app Should be able to edit stripe price, currency
Retry 1Initial Attempt
1.14% (3) 3 / 264 runs
failed over last 7 days
0.76% (2) 2 / 264 runs
flaked over last 7 days
Payment app Should be able to edit alby price, currency
Retry 1Initial Attempt
1.14% (3) 3 / 264 runs
failed over last 7 days
1.52% (4) 4 / 264 runs
flaked over last 7 days
Payment app Should not display App is not setup already for non payment app
Retry 1Initial Attempt
1.14% (3) 3 / 264 runs
failed over last 7 days
0.76% (2) 2 / 264 runs
flaked over last 7 days
Payment app Should only be allowed to enable one payment app
Retry 1Initial Attempt
1.14% (3) 3 / 264 runs
failed over last 7 days
1.14% (3) 3 / 264 runs
flaked over last 7 days
Payment app Should display App is not setup already for paypal
Retry 1Initial Attempt
1.14% (3) 3 / 264 runs
failed over last 7 days
0.76% (2) 2 / 264 runs
flaked over last 7 days

📄   apps/web/playwright/signup.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Signup Flow Test Email verification sent if enabled
Retry 1Initial Attempt
1.26% (3) 3 / 239 runs
failed over last 7 days
23.85% (57) 57 / 239 runs
flaked over last 7 days

📄   apps/web/playwright/team/team-invitation.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
Team Invitation (non verified)
Retry 2Retry 1Initial Attempt
6.64% (16) 16 / 241 runs
failed over last 7 days
4.98% (12) 12 / 241 runs
flaked over last 7 days
Team Invitation (verified)
Retry 1Initial Attempt
3.32% (8) 8 / 241 runs
failed over last 7 days
7.05% (17) 17 / 241 runs
flaked over last 7 days

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

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Managed Event Types Can create managed event type
Retry 1Initial Attempt
6.67% (15) 15 / 225 runs
failed over last 7 days
5.33% (12) 12 / 225 runs
flaked over last 7 days

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

Top 1 Common Error Messages

null

9 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
1.32% (3) 3 / 228 runs
failed over last 7 days
59.65% (136) 136 / 228 runs
flaked over last 7 days
Popup Tests should be able to reschedule
Retry 1Initial Attempt
-152.81% (-136) -136 / 89 runs
failed over last 7 days
152.81% (136) 136 / 89 runs
flaked over last 7 days
Popup Tests should open Routing Forms embed on click
Retry 1Initial Attempt
-150.56% (-134) -134 / 89 runs
failed over last 7 days
150.56% (134) 134 / 89 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
-144.94% (-129) -129 / 89 runs
failed over last 7 days
147.19% (131) 131 / 89 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
-150.57% (-131) -131 / 87 runs
failed over last 7 days
150.57% (131) 131 / 87 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
-150.57% (-131) -131 / 87 runs
failed over last 7 days
150.57% (131) 131 / 87 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
-150.57% (-131) -131 / 87 runs
failed over last 7 days
150.57% (131) 131 / 87 runs
flaked over last 7 days
Popup Tests prendered embed should be loaded and apply the config given to it
Retry 1Initial Attempt
-150.57% (-131) -131 / 87 runs
failed over last 7 days
150.57% (131) 131 / 87 runs
flaked over last 7 days
Popup Tests should open on clicking child element
Retry 1Initial Attempt
-148.84% (-128) -128 / 86 runs
failed over last 7 days
148.84% (128) 128 / 86 runs
flaked over last 7 days

📄   apps/web/playwright/managedBooking/advancedOptions.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Check advanced options in a managed team event type Check advanced options in a managed team event type without offer seats
Retry 1Initial Attempt
0% (0) 0 / 227 runs
failed over last 7 days
47.14% (107) 107 / 227 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
user can login & logout succesfully -- legacy login flow user & logout using dashboard
Retry 1Initial Attempt
0% (0) 0 / 226 runs
failed over last 7 days
17.26% (39) 39 / 226 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/namespacing.e2e.ts • 4 Flakes

Top 1 Common Error Messages

null

4 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Namespacing Inline Embed Double install Embed Snippet with inline embed using a namespace
Retry 1Initial Attempt
0.44% (1) 1 / 225 run
failed over last 7 days
60% (135) 135 / 225 runs
flaked over last 7 days
Namespacing Inline Embed Add inline embed using a namespace without reload
Retry 1Initial Attempt
0.44% (1) 1 / 225 run
failed over last 7 days
60.44% (136) 136 / 225 runs
flaked over last 7 days
Namespacing Inline Embed Double install Embed Snippet with inline embed without a namespace(i.e. default namespace)
Retry 1Initial Attempt
0% (0) 0 / 225 runs
failed over last 7 days
63.56% (143) 143 / 225 runs
flaked over last 7 days
Namespacing Different namespaces can have different init configs
Retry 1Initial Attempt
0% (0) 0 / 223 runs
failed over last 7 days
60.09% (134) 134 / 223 runs
flaked over last 7 days

📄   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 / 219 runs
failed over last 7 days
8.22% (18) 18 / 219 runs
flaked over last 7 days

📄   packages/embeds/embed-react/playwright/tests/basic.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
React Embed Element Click Popup should verify that the iframe got created with correct URL - namespaced
Retry 1Initial Attempt
14.85% (34) 34 / 229 runs
failed over last 7 days
35.37% (81) 81 / 229 runs
flaked over last 7 days

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

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Bookings Team Event Can create a booking for Round Robin EventType
Retry 2Retry 1Initial Attempt
8.12% (19) 19 / 234 runs
failed over last 7 days
27.78% (65) 65 / 234 runs
flaked over last 7 days

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

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Duration limits day
Retry 1Initial Attempt
5.17% (12) 12 / 232 runs
failed over last 7 days
0.86% (2) 2 / 232 runs
flaked over last 7 days

View Detailed Build Results


Comment on lines 160 to 166
!isPlatform &&
(await sendEmailVerification({
email: orgOwnerEmail,
language: ctx.user.locale,
username: ownerProfile.username || "",
}));

Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: we should probably move this check inside sendEmailVerification.

if (isPlatform) {
log.warn("Skipping Email verification");
return { ok: true, skipped: true };
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Might have to go with because e2e fails for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Udit-takkar do we have tests for if email verification is skipped condition?

@ThyMinimalDev ThyMinimalDev self-requested a review May 17, 2024 11:05
Copy link

vercel bot commented May 17, 2024

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

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview May 17, 2024 0:19am
cal ⬜️ Ignored (Inspect) Visit Preview May 17, 2024 0:19am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview May 17, 2024 0:19am

supalarry
supalarry previously approved these changes May 17, 2024
prevLink: null,
newLink: `${getOrgFullOrigin(slug, { protocol: true })}/${ownerProfile.username}`,
});
!isPlatform &&
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that it's better to write:

if (!isPlatform) {
    await sendOrganizationCreationEmail(...)
}

The && can be used in if statements themselves but this is a case for using if statement and same below.

@supalarry supalarry self-requested a review May 17, 2024 12:25
@Ryukemeister Ryukemeister merged commit a559daa into main May 17, 2024
40 checks passed
@Ryukemeister Ryukemeister deleted the disable-emails-for-platform branch May 17, 2024 12:37
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 emails area: emails, cancellation email, reschedule email, inbox, spam folder, not getting email platform Anything related to our platform plan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants