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: meeting ended and started webhooks trigger #14864

Merged
merged 28 commits into from
May 10, 2024
Merged

Conversation

CarinaWolli
Copy link
Member

@CarinaWolli CarinaWolli commented May 2, 2024

What does this PR do?

This fixes several issues with the Meeting ended and Meeting started trigger. The original issue was that if one booking was canceled, all scheduled triggers for that webhook, also the ones that were not related to the canceled booking, were deleted. This is why the meeting ended/started trigger didn't always trigger.

Cleans up some old code. Since we use WebhookScheduledTriggers with a corn job, scheduledJobs are not needed anymore.

Fixes #14685

How should this be tested?

  • Make sure you have existing bookings
  • Create webhook with meeting ended and meeting started trigger
  • See that WebhookScheduledTriggers are created for all bookings for each trigger
  • Cancel one of the bookings
  • See that only the WebhookScheduledTriggers related to the booking were related

You can also test:

  • delete webhook
  • activate/deactivate webhook
  • edit webhook triggers

Copy link
Contributor

github-actions bot commented May 2, 2024

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

@keithwillcode keithwillcode added consumer core area: core, team members only labels May 2, 2024
Copy link

vercel bot commented May 2, 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 May 10, 2024 1:36pm
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview May 10, 2024 1:36pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview May 10, 2024 1:36pm

Copy link
Contributor

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

Current Playwright Test Results Summary

✅ 321 Passing - ⚠️ 8 Flaky

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

(Last updated on 05/10/2024 01:50:19pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: b6edd27

Started: 05/10/2024 01:46:15pm UTC

⚠️ Flakes

📄   apps/web/playwright/teams.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
Teams - NonOrg -- future Team Onboarding Invite Members
Retry 2Retry 1Initial Attempt
3.93% (12) 12 / 305 runs
failed over last 7 days
19.67% (60) 60 / 305 runs
flaked over last 7 days
Teams - NonOrg -- future Can create a booking for Round Robin EventType
Retry 2Retry 1Initial Attempt
6.89% (21) 21 / 305 runs
failed over last 7 days
30.82% (94) 94 / 305 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 / 296 runs
failed over last 7 days
37.84% (112) 112 / 296 runs
flaked 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
MEETING_ENDED, MEETING_STARTED should create/remove scheduledWebhookTriggers for existing bookings
Retry 1Initial Attempt
8.33% (1) 1 / 12 run
failed over last 7 days
50% (6) 6 / 12 runs
flaked over last 7 days

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

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Update Profile Can verify the newly added secondary email
Retry 2Retry 1Initial Attempt
1.46% (5) 5 / 342 runs
failed over last 7 days
20.76% (71) 71 / 342 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/namespacing.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Namespacing Inline Embed Double install Embed Snippet with inline embed without a namespace(i.e. default namespace)
Retry 1Initial Attempt
0% (0) 0 / 299 runs
failed over last 7 days
55.85% (167) 167 / 299 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
18.15% (57) 57 / 314 runs
failed over last 7 days
39.49% (124) 124 / 314 runs
flaked over last 7 days

📄   packages/app-store/routing-forms/playwright/tests/basic.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Routing Forms Seeded Routing Form Router URL should work
Retry 1Initial Attempt
0% (0) 0 / 297 runs
failed over last 7 days
12.12% (36) 36 / 297 runs
flaked over last 7 days

View Detailed Build Results


@dosubot dosubot bot added bookings area: bookings, availability, timezones, double booking webhooks area: webhooks, callback, webhook payload labels May 7, 2024
Copy link

graphite-app bot commented May 7, 2024

Graphite Automations

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

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

Copy link
Member

@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.

Nice job @CarinaWolli. Seems like the failed e2e is an old one. LGTM.

},
});

expect(scheduledTriggersAfterDisabling.length).toBe(0);
Copy link
Member

Choose a reason for hiding this comment

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

We're receiving a 2 in here:

image

@zomars zomars merged commit fd64b0f into main May 10, 2024
38 checks passed
@zomars zomars deleted the fix/meeting-ended-trigger branch May 10, 2024 19:49
fetchPromises.push(
fetch(job.subscriberUrl, {
method: "POST",
body: job.payload,
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't the body supposed to be of the below form ?

    "triggerEvent": "",
    "createdAt": "",
    "payload":  {} 
}

Check #15033

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api area: API, enterprise API, access token, OAuth bookings area: bookings, availability, timezones, double booking 🐛 bug Something isn't working consumer core area: core, team members only crm-apps area: crm apps, salesforce, hubspot, close.com, sendgrid High priority Created by Linear-GitHub Sync ❗️ migrations contains migration files webhooks area: webhooks, callback, webhook payload
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3505] Issue with Webhooks (Meeting started/ended triggers)
5 participants