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

chore: Refactor feature flags #13734

Merged
merged 17 commits into from
Feb 21, 2024
Merged

chore: Refactor feature flags #13734

merged 17 commits into from
Feb 21, 2024

Conversation

exception
Copy link
Contributor

What does this PR do?

Refactors getFeatureFlagMap into a more concise and single-use getFeatureFlag, caching the whole feature flag map seems unnecessary as most of these will not be used all at once.

@exception exception requested a review from a team February 16, 2024 17:32
Copy link
Contributor

github-actions bot commented Feb 16, 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 Feb 16, 2024
@graphite-app graphite-app bot requested a review from a team February 16, 2024 17:34
Copy link

vercel bot commented Feb 16, 2024

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

4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview Feb 20, 2024 1:28pm
cal ⬜️ Ignored (Inspect) Visit Preview Feb 20, 2024 1:28pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Feb 20, 2024 1:28pm
qa ⬜️ Ignored (Inspect) Visit Preview Feb 20, 2024 1:28pm

Copy link

graphite-app bot commented Feb 16, 2024

Graphite Automations

A Graphite automation took an action on this PR • (02/16/24)

1 reviewer was added based on Keith Williams's automation, 'Add platform team as reviewer'

Copy link
Contributor

github-actions bot commented Feb 16, 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 16, 2024

Current Playwright Test Results Summary

✅ 447 Passing - ⚠️ 13 Flaky

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

(Last updated on 02/20/2024 02:28:01pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: d29f2dd

Started: 02/20/2024 02:17:10pm UTC

⚠️ Flakes

📄   apps/web/playwright/booking/longTextQuestion.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 Long Text Question and Each Other Question Booking With Long Text Question and Multiple email Question Long Text and Multiple email required
Retry 1Initial Attempt
0% (0) 0 / 228 runs
failed over last 7 days
6.14% (14) 14 / 228 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 and select required
Retry 1Initial Attempt
0% (0) 0 / 224 runs
failed over last 7 days
7.59% (17) 17 / 224 runs
flaked over last 7 days
Booking With Long Text Question and Each Other Question Booking With Long Text Question and Short text question Long Text required and Short text not required
Retry 1Initial Attempt
0% (0) 0 / 224 runs
failed over last 7 days
4.91% (11) 11 / 224 runs
flaked over last 7 days

📄   apps/web/playwright/booking/selectQuestion.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 Phone Question and Each Other Question Booking With Select Question and Long text Question Select and Long text not required
Retry 1Initial Attempt
0% (0) 0 / 241 runs
failed over last 7 days
8.30% (20) 20 / 241 runs
flaked over last 7 days
Booking With Phone Question and Each Other Question Booking With Select Question and Phone Question Select required and select required
Retry 1Initial Attempt
0% (0) 0 / 241 runs
failed over last 7 days
5.39% (13) 13 / 241 runs
flaked over last 7 days
Booking With Phone Question and Each Other Question Booking With Select Question and Phone Question Select and Phone not required
Retry 1Initial Attempt
0% (0) 0 / 241 runs
failed over last 7 days
4.98% (12) 12 / 241 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 -- future login flow user & logout using dashboard
Retry 1Initial Attempt
0.42% (1) 1 / 238 run
failed over last 7 days
43.28% (103) 103 / 238 runs
flaked over last 7 days

📄   apps/web/playwright/integrations-stripe.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Stripe integration Paid booking should be able to be rescheduled
Retry 2Retry 1Initial Attempt
1.23% (3) 3 / 243 runs
failed over last 7 days
2.88% (7) 7 / 243 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 optional
Retry 1Initial Attempt
0% (0) 0 / 234 runs
failed over last 7 days
4.27% (10) 10 / 234 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 select Question Phone required and select not required
Retry 1Initial Attempt
0% (0) 0 / 246 runs
failed over last 7 days
4.07% (10) 10 / 246 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 -- legacy user Different Locations Tests Can remove location from multiple locations that are saved
Retry 1Initial Attempt
0.41% (1) 1 / 243 run
failed over last 7 days
4.94% (12) 12 / 243 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
3.64% (9) 9 / 247 runs
failed over last 7 days
18.62% (46) 46 / 247 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 Cannot update a users email when existing user has same email (verification enabled)
Retry 1Initial Attempt
1.57% (4) 4 / 255 runs
failed over last 7 days
49.02% (125) 125 / 255 runs
flaked over last 7 days

View Detailed Build Results


@zomars
Copy link
Member

zomars commented Feb 16, 2024

Since feature flags are reused everywhere I'd rather cache them all than every single one. There are not that many records and IMO it's better to have this data from a single reusable query than multiple ones

@keithwillcode
Copy link
Contributor

Since feature flags are reused everywhere I'd rather cache them all than every single one. There are not that many records and IMO it's better to have this data from a single reusable query than multiple ones

Fair point

@exception exception closed this Feb 17, 2024
@zomars zomars removed the platform Anything related to our platform plan label Feb 19, 2024
@zomars zomars requested a review from a team February 19, 2024 17:45
@zomars zomars removed the request for review from a team February 19, 2024 17:45
@keithwillcode keithwillcode added the platform Anything related to our platform plan label Feb 19, 2024
zomars
zomars previously approved these changes Feb 19, 2024
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.

Discarded unrelated changes. And LGTM!

zomars
zomars previously requested changes Feb 19, 2024
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.

We're getting a unit test failure

image

@zomars zomars merged commit 83ceb46 into main Feb 21, 2024
38 of 39 checks passed
@zomars zomars deleted the chore/feature-flag-refactor branch February 21, 2024 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only foundation platform Anything related to our platform plan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants