cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

chore: adds future opt-in banner for ADMINS only

Open zomars opened this issue 1 year ago • 7 comments

What does this PR do?

  • Allows ADMINs of the Cal.com Instance to override the middleware so we can opt-in for future app dir routes so we can start testing on prod.

image

Requirement/Documentation

  • If there is a requirement document, please, share it here.
  • If there is ab UI/UX design document, please, share it here.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Tests (Unit/Integration/E2E or any other test)
  • This change requires a documentation update

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Mandatory Tasks

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

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my PR needs changes to the documentation
  • I haven't checked if my changes generate no new warnings
  • I haven't added tests that prove my fix is effective or that my feature works
  • I haven't checked if new and existing unit tests pass locally with my changes

zomars avatar Jan 18 '24 21:01 zomars

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 Jan 29, 2024 7:11pm
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 29, 2024 7:11pm
cal-demo 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jan 29, 2024 7:11pm
dev ❌ Failed (Inspect) Jan 29, 2024 7:11pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2024 7:11pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2024 7:11pm
qa ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2024 7:11pm
ui ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2024 7:11pm

vercel[bot] avatar Jan 18 '24 21:01 vercel[bot]

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

github-actions[bot] avatar Jan 18 '24 21:01 github-actions[bot]

Current dependencies on/for this PR:

  • main
    • PR #13315 Graphite 👈

This stack of pull requests is managed by Graphite.

zomars avatar Jan 18 '24 21:01 zomars

📦 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! 🙌

github-actions[bot] avatar Jan 18 '24 21:01 github-actions[bot]

Current Playwright Test Results Summary

✅ 444 Passing - ⚠️ 10 Flaky

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

(Last updated on 01/29/2024 07:15:57pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 693888164dd542858f62245b42747b3cfdae548e

Started: 01/29/2024 07:06:19pm UTC

⚠️ Flakes

📄   apps/web/playwright/login.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
user can login & logout succesfully -- future login flow user & logout using dashboard
Retry 1Initial Attempt
25% (64) 64 / 256 runs
failed over last 7 days
34.77% (89) 89 / 256 runs
flaked over last 7 days
Login and logout tests -- future Login flow validations -- future Should warn when user does not exist
Retry 1Initial Attempt
0% (0) 0 / 249 runs
failed over last 7 days
5.62% (14) 14 / 249 runs
flaked over last 7 days

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

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 Radio group Question Long Text and Radio group required
Retry 1Initial Attempt
0% (0) 0 / 265 runs
failed over last 7 days
3.02% (8) 8 / 265 runs
flaked over last 7 days

📄   apps/web/playwright/login.2fa.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
2FA Tests should allow a user to enable 2FA and login using 2FA
Retry 1Initial Attempt
3.73% (10) 10 / 268 runs
failed over last 7 days
38.06% (102) 102 / 268 runs
flaked over last 7 days

📄   apps/web/playwright/booking/phoneQuestion.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 Phone Question and Address Question Booking With Phone Question and Short text question Phone required and Short text not required
Retry 1Initial Attempt
0% (0) 0 / 265 runs
failed over last 7 days
3.02% (8) 8 / 265 runs
flaked over last 7 days

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

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Check availability tab in a event-type Check availability in event type
Retry 1Initial Attempt
17.75% (49) 49 / 276 runs
failed over last 7 days
45.29% (125) 125 / 276 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
Webhook tests FORM_SUBMITTED on submitting team form, triggers team webhook
Retry 1Initial Attempt
0% (0) 0 / 104 runs
failed over last 7 days
18.27% (19) 19 / 104 runs
flaked over last 7 days

📄   apps/web/playwright/eventType/limit-tab.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Limits Tab - Event Type Check the functionalities of the Limits Tab
Retry 1Initial Attempt
0% (0) 0 / 270 runs
failed over last 7 days
2.22% (6) 6 / 270 runs
flaked over last 7 days

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

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Multiple Email Question and Each Other Question Booking With Multiple Email Question and Number Question Multiple Email required and Number required
Retry 1Initial Attempt
0% (0) 0 / 272 runs
failed over last 7 days
3.31% (9) 9 / 272 runs
flaked over last 7 days

📄   apps/web/playwright/settings/upload-avatar.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
UploadAvatar can upload an image
Retry 2Retry 1Initial Attempt
0.35% (1) 1 / 285 run
failed over last 7 days
4.21% (12) 12 / 285 runs
flaked over last 7 days

View Detailed Build Results


deploysentinel[bot] avatar Jan 18 '24 21:01 deploysentinel[bot]

curious why cal.com admins only not more people?

PeerRich avatar Jan 18 '24 23:01 PeerRich

curious why cal.com admins only not more people?

For now. It is prone to break so we should test carefully before releasing to more users.

zomars avatar Jan 18 '24 23:01 zomars

curious why cal.com admins only not more people?

For now. It is prone to break so we should test carefully before releasing to more users.

Should we also add "X" close button to the UserV2OptInBanner that sets a cookie with an expiration of let's say a month and if the cookie is set don't show UserV2OptInBanner. If a user does not want to try out the new version, then the banner will be there, but we want that at some point users switch to the new version though.

supalarry avatar Jan 22 '24 09:01 supalarry

❓ I want to test this locally, but given a user with ADMIN role I do not see the banner appearing. What else do I need to enable to see the banner?

supalarry avatar Jan 22 '24 09:01 supalarry

❓ I want to test this locally, but given a user with ADMIN role I do not see the banner appearing. What else do I need to enable to see the banner?

Are you running on dev mode?

zomars avatar Jan 24 '24 22:01 zomars

❓ I want to test this locally, but given a user with ADMIN role I do not see the banner appearing. What else do I need to enable to see the banner?

Could test after logging out and in and session data was updated so check if (session.data?.user.role !== "ADMIN") return null; could be passed.

supalarry avatar Jan 26 '24 09:01 supalarry