Skip to content

chore: Skipping totp code for org dev#10403

Merged
keithwillcode merged 1 commit into
mainfrom
chore/totp-code-lower-env
Jul 26, 2023
Merged

chore: Skipping totp code for org dev#10403
keithwillcode merged 1 commit into
mainfrom
chore/totp-code-lower-env

Conversation

@leog
Copy link
Copy Markdown
Contributor

@leog leog commented Jul 26, 2023

What does this PR do?

When working with Org creation, TOTP code will accept any code for lower environments

Type of change

  • Chore (refactoring code, technical debt, workflow improvements)

How should this be tested?

Create an org and when TOTP code is asked, enter any code. This only works for non-production environments, such as Local and Dev. QA and PROD will need an actual code.

Mandatory Tasks

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

@leog leog added the organizations area: organizations, orgs label Jul 26, 2023
@leog leog requested a review from a team July 26, 2023 15:57
@leog leog self-assigned this Jul 26, 2023
@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 26, 2023

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

Name Status Preview Comments Updated (UTC)
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 26, 2023 4:03pm
cal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 26, 2023 4:03pm
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 26, 2023 4:03pm
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 26, 2023 4:03pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Jul 26, 2023 4:03pm

@github-actions
Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

Comment thread packages/lib/constants.ts
WEBAPP_URL &&
(new URL(WEBAPP_URL).hostname.endsWith("cal.com") ||
new URL(WEBAPP_URL).hostname.endsWith("cal.dev") ||
new URL(WEBAPP_URL).hostname.endsWith("cal.qa") ||
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adding new QA env

Comment thread packages/lib/constants.ts

export const CONSOLE_URL =
new URL(WEBAPP_URL).hostname.endsWith(".cal.dev") ||
new URL(WEBAPP_URL).hostname.endsWith(".cal.qa") ||
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adding new QA env

@zomars zomars added the core area: core, team members only label Jul 26, 2023
import { subdomainSuffix } from "@calcom/features/ee/organizations/lib/orgDomains";
import { DEFAULT_SCHEDULE, getAvailabilityFromSchedule } from "@calcom/lib/availability";
import { IS_PRODUCTION, IS_TEAM_BILLING_ENABLED, RESERVED_SUBDOMAINS } from "@calcom/lib/constants";
import { IS_CALCOM, IS_TEAM_BILLING_ENABLED, RESERVED_SUBDOMAINS } from "@calcom/lib/constants";
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Relying on whether the environment is either Dev, QA, or PROD

const availability = getAvailabilityFromSchedule(DEFAULT_SCHEDULE);

if (check === false) {
if (IS_CALCOM) await vercelCreateDomain(slug);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved up to fail before creating the team if vercel domain creation fails. And relying on whether the environment is either Dev, QA, or PROD


if (!user || !email || !code) throw new TRPCError({ code: "BAD_REQUEST" });

if (!IS_PRODUCTION) return true;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If not a PROD environment such as Local or Dev, accept any code.

@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous Bot commented Jul 26, 2023

🤖 Meticulous spotted visual differences in 54 of 251 screens tested: view and approve differences detected.

Last updated for commit 8c045fd. This comment will update as new commits are pushed.

@deploysentinel
Copy link
Copy Markdown

deploysentinel Bot commented Jul 26, 2023

Current Playwright Test Results Summary

✅ 105 Passing - ⚠️ 3 Flaky

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

(Last updated on 07/26/2023 04:07:04pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 8c045fd

Started: 07/26/2023 04:05:32pm UTC

⚠️ Flakes

📄   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 user can add multiple organizer address
Retry 1Initial Attempt
1.32% (4) 4 / 304 runs
failed over last 7 days
14.47% (44) 44 / 304 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 Pending payment booking should not be confirmed by default
Retry 1Initial Attempt
1.64% (5) 5 / 304 runs
failed over last 7 days
7.89% (24) 24 / 304 runs
flaked over last 7 days

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

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 1Initial Attempt
1.40% (3) 3 / 214 runs
failed over last 7 days
98.13% (210) 210 / 214 runs
flaked over last 7 days

View Detailed Build Results


@github-actions
Copy link
Copy Markdown
Contributor

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

@keithwillcode keithwillcode added the High priority Created by Linear-GitHub Sync label Jul 26, 2023
@keithwillcode keithwillcode merged commit dae4627 into main Jul 26, 2023
@keithwillcode keithwillcode deleted the chore/totp-code-lower-env branch July 26, 2023 16:15
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 High priority Created by Linear-GitHub Sync organizations area: organizations, orgs

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants