Skip to content

chore: [app dir bootstrapping 10] adds ab tests middleware#12045

Merged
zomars merged 1 commit intocalcom:mainfrom
codemod:dmytro/int-2029-manage-pagesapp-router-with-feature-flags-inside-of-the
Nov 15, 2023
Merged

chore: [app dir bootstrapping 10] adds ab tests middleware#12045
zomars merged 1 commit intocalcom:mainfrom
codemod:dmytro/int-2029-manage-pagesapp-router-with-feature-flags-inside-of-the

Conversation

@dmytro068
Copy link
Copy Markdown
Contributor

What does this PR do?

  • Adds AB tests middleware that redirects users to the app-dir pages with probability that is defined by env var

Fixes # (issue)

Requirement/Documentation

This PR requires new env variables:
APP_ROUTER_EVENT_TYPES_ENABLED - boolean that defines if app dir event-types page redirect is enabled
AB_TEST_BUCKET_PROBABILITY - number [0, 100] that defines the percentage of users getting redirected to the app dir pages

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)
  • This change requires a documentation update

How should this be tested?

Does not requires testing, implements middleware as a dead code

Mandatory Tasks

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

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 23, 2023

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

Name Status Preview Comments Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2023 5:04pm

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 23, 2023

@DmytroHryshyn is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 23, 2023

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

@dmytro068 dmytro068 changed the title chore: implement a/b test middleware chore: [app dir bootstrapping 10] adds ab tests middleware Oct 23, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 23, 2023

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

@PeerRich PeerRich added the Medium priority Created by Linear-GitHub Sync label Oct 24, 2023
Comment thread turbo.json Outdated
Comment on lines +327 to +329
"ZOOM_CLIENT_SECRET",
"AB_TEST_BUCKET_PROBABILITY",
"APP_ROUTER_EVENT_TYPES_ENABLED"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

NIT: Let's put these in alphabetical order

@zomars zomars self-requested a review November 14, 2023 17:15
Copy link
Copy Markdown
Contributor

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

LGTM

@zomars zomars merged commit 48e7b61 into calcom:main Nov 15, 2023
jakazzy pushed a commit to jakazzy/cal.com that referenced this pull request Dec 5, 2023
)

## What does this PR do?
 - Adds AB tests middleware that redirects users to the app-dir pages with probability that is defined by env var
 
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->

Fixes # (issue)

<!-- Please provide a loom video for visual changes to speed up reviews
 Loom Video: https://www.loom.com/
-->

## Requirement/Documentation

<!-- Please provide all documents that are important to understand the reason of that PR. -->

This PR requires new env variables:
`APP_ROUTER_EVENT_TYPES_ENABLED`  - boolean that defines if app dir event-types page redirect is enabled
`AB_TEST_BUCKET_PROBABILITY` - number [0, 100] that defines the percentage of users getting redirected to the app dir pages

## Type of change

<!-- Please delete bullets that are not relevant. -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] 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)
- [ ] This change requires a documentation update

## How should this be tested?

<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Write details that help to start the tests -->
Does not requires testing, implements middleware as a dead code

## Mandatory Tasks

- [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.
zomars pushed a commit that referenced this pull request Jan 29, 2024
## What does this PR do?
 - Adds AB tests middleware that redirects users to the app-dir pages with probability that is defined by env var
 
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->

Fixes # (issue)

<!-- Please provide a loom video for visual changes to speed up reviews
 Loom Video: https://www.loom.com/
-->

## Requirement/Documentation

<!-- Please provide all documents that are important to understand the reason of that PR. -->

This PR requires new env variables:
`APP_ROUTER_EVENT_TYPES_ENABLED`  - boolean that defines if app dir event-types page redirect is enabled
`AB_TEST_BUCKET_PROBABILITY` - number [0, 100] that defines the percentage of users getting redirected to the app dir pages

## Type of change

<!-- Please delete bullets that are not relevant. -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] 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)
- [ ] This change requires a documentation update

## How should this be tested?

<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Write details that help to start the tests -->
Does not requires testing, implements middleware as a dead code

## Mandatory Tasks

- [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Medium priority Created by Linear-GitHub Sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants