Skip to content

fix: platform seed script#15617

Merged
PeerRich merged 3 commits intomainfrom
update-platform-seed-script
Jul 3, 2024
Merged

fix: platform seed script#15617
PeerRich merged 3 commits intomainfrom
update-platform-seed-script

Conversation

@Ryukemeister
Copy link
Copy Markdown
Contributor

@Ryukemeister Ryukemeister commented Jun 28, 2024

What does this PR do?

  • Fixes platform seed script not working

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have added a Docs issue here if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

Run yarn dx command and then login using the following credentials - email: "platform@example.com" and password: "PLATFORMadmin2024!". Once you navigate to /settings/platform you should have a platform user set up along with a ready to be used OAuth client.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jun 28, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ Ryukemeister
❌ Rajiv Sahal


Rajiv Sahal seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@keithwillcode keithwillcode added core area: core, team members only platform Anything related to our platform plan labels Jun 28, 2024
@graphite-app graphite-app Bot requested a review from a team June 28, 2024 17:44
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Jun 28, 2024

Graphite Automations

"Add platform team as reviewer" took an action on this PR • (06/28/24)

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

Comment thread packages/prisma/seed.ts
name: "Platform Team",
slug: "platform-admin-team",
isPlatform: true,
isOrganization: true,
Copy link
Copy Markdown
Contributor Author

@Ryukemeister Ryukemeister Jun 28, 2024

Choose a reason for hiding this comment

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

Previously platform billing check was failing because there's a OrganizationRolesGuard in v2 billing controller which checks for isOrganization, and since that was not set to true the billing check would always fail.

Comment thread packages/prisma/seed.ts
},
});

await prisma.platformOAuthClient.create({
Copy link
Copy Markdown
Contributor Author

@Ryukemeister Ryukemeister Jun 28, 2024

Choose a reason for hiding this comment

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

Setting up a ready to be used OAuth client

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 30, 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 Jul 2, 2024 10:32am
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Jul 2, 2024 10:32am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Jul 2, 2024 10:32am

Comment thread packages/prisma/seed.ts
organizationId: team.id,
id: "clxyyy21o0003sbk7yw5z6tzg",
secret:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiQWNtZSAiLCJwZXJtaXNzaW9ucyI6MTAyMywicmVkaXJlY3RVcmlzIjpbImh0dHA6Ly9sb2NhbGhvc3Q6NDMyMSJdLCJib29raW5nUmVkaXJlY3RVcmkiOiIiLCJib29raW5nQ2FuY2VsUmVkaXJlY3RVcmkiOiIiLCJib29raW5nUmVzY2hlZHVsZVJlZGlyZWN0VXJpIjoiIiwiYXJlRW1haWxzRW5hYmxlZCI6dHJ1ZSwiaWF0IjoxNzE5NTk1ODA4fQ.L5_jSS14fcKLCD_9_DAOgtGd6lUSZlU5CEpCPaPt41I",
Copy link
Copy Markdown
Member

@hariombalhara hariombalhara Jul 1, 2024

Choose a reason for hiding this comment

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

Can we confirm if this secret isn't a real one @Ryukemeister

Copy link
Copy Markdown
Contributor Author

@Ryukemeister Ryukemeister Jul 8, 2024

Choose a reason for hiding this comment

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

@hariombalhara yeah I had this generated for my local environment so it's not from prod and safe to push.

@PeerRich PeerRich enabled auto-merge (squash) July 1, 2024 22:08
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 2, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Seventy-seven Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/apps 286.63 KB 514.32 KB 146.95% (🟡 +0.70%)
/apps/[slug] 304.22 KB 531.9 KB 151.97% (🟡 +0.70%)
/apps/[slug]/[...pages] 595.02 KB 822.7 KB 235.06% (🟡 +0.67%)
/apps/categories 262.99 KB 490.67 KB 140.19% (🟡 +0.70%)
/apps/categories/[category] 268.74 KB 496.42 KB 141.83% (🟡 +0.70%)
/auth/saml-idp 12.22 KB 239.91 KB 68.54% (🟢 -20.80%)
/availability/[schedule] 417.04 KB 644.72 KB 184.21% (🟡 +0.20%)
/bookings/[status] 332.67 KB 560.35 KB 160.10% (🟡 +0.71%)
/enterprise 263.04 KB 490.72 KB 140.21% (🟡 +0.70%)
/event-types 568.05 KB 795.73 KB 227.35% (🟡 +0.77%)
/event-types/[type] 443.71 KB 671.39 KB 191.83% (🟡 +0.62%)
/insights 481.4 KB 709.08 KB 202.59% (🟡 +0.25%)
/more 262.55 KB 490.23 KB 140.07% (🟡 +0.69%)
/settings/admin 268.94 KB 496.62 KB 141.89% (🟡 +0.70%)
/settings/admin/apps 282.18 KB 509.86 KB 145.67% (🟡 +0.67%)
/settings/admin/apps/[category] 282.16 KB 509.84 KB 145.67% (🟡 +0.67%)
/settings/admin/flags 272.66 KB 500.34 KB 142.95% (🟡 +0.67%)
/settings/admin/impersonation 269.33 KB 497.01 KB 142.00% (🟡 +0.70%)
/settings/admin/lockedSMS 290.37 KB 518.05 KB 148.01% (🟡 +0.71%)
/settings/admin/lockedSMS/UsersTable 79.98 KB 307.66 KB 87.90% (🟢 -0.14%)
/settings/admin/lockedSMS/lockedSMSView 119.46 KB 347.14 KB 99.18% (🟢 -0.17%)
/settings/admin/oAuth 280.91 KB 508.59 KB 145.31% (🟡 +0.67%)
/settings/admin/oAuth/oAuthView 95.49 KB 323.17 KB 92.34% (🟢 -0.18%)
/settings/admin/orgMigrations/_OrgMigrationLayout 257.72 KB 485.4 KB 138.69% (🟡 +0.65%)
/settings/admin/orgMigrations/moveTeamToOrg 307.6 KB 535.29 KB 152.94% (🟡 +0.71%)
/settings/admin/orgMigrations/moveUserToOrg 327.38 KB 555.06 KB 158.59% (🟡 +0.72%)
/settings/admin/orgMigrations/removeTeamFromOrg 307.37 KB 535.05 KB 152.87% (🟡 +0.71%)
/settings/admin/orgMigrations/removeUserFromOrg 307.38 KB 535.06 KB 152.87% (🟡 +0.72%)
/settings/admin/organizations 270.82 KB 498.51 KB 142.43% (🟡 +0.70%)
/settings/admin/organizations/[id]/edit 269.49 KB 497.17 KB 142.05% (🟡 +0.70%)
/settings/admin/users 271.59 KB 499.28 KB 142.65% (🟡 +0.70%)
/settings/admin/users/[id]/edit 400.63 KB 628.31 KB 179.52% (🟡 +0.68%)
/settings/admin/users/add 400.29 KB 627.97 KB 179.42% (🟡 +0.69%)
/settings/billing 269.14 KB 496.82 KB 141.95% (🟡 +0.70%)
/settings/developer/api-keys 273.43 KB 501.11 KB 143.17% (🟡 +0.67%)
/settings/developer/webhooks 273.6 KB 501.28 KB 143.22% (🟡 +0.67%)
/settings/developer/webhooks/[id] 274.55 KB 502.23 KB 143.49% (🟡 +0.68%)
/settings/developer/webhooks/new 274.58 KB 502.26 KB 143.50% (🟡 +0.68%)
/settings/my-account/appearance 321.05 KB 548.73 KB 156.78% (🟡 +0.39%)
/settings/my-account/calendars 281.06 KB 508.74 KB 145.35% (🟡 +0.81%)
/settings/my-account/general 384.55 KB 612.23 KB 174.92% (🟡 +0.68%)
/settings/my-account/out-of-office 274.07 KB 501.75 KB 143.36% (🟡 +0.66%)
/settings/my-account/profile 416.52 KB 644.2 KB 184.06% (🟡 +0.54%)
/settings/organizations/[id]/about 159.66 KB 387.34 KB 110.67% (🟡 +0.47%)
/settings/organizations/[id]/add-teams 159.65 KB 387.34 KB 110.67% (🟡 +0.47%)
/settings/organizations/admin-api 269.1 KB 496.78 KB 141.94% (🟡 +0.69%)
/settings/organizations/appearance 292.76 KB 520.44 KB 148.70% (🟡 +0.67%)
/settings/organizations/billing 269.18 KB 496.86 KB 141.96% (🟡 +0.70%)
/settings/organizations/dsync 301.8 KB 529.48 KB 151.28% (🟡 +0.70%)
/settings/organizations/general 357.39 KB 585.07 KB 167.16% (🟡 +0.68%)
/settings/organizations/members 406.89 KB 634.57 KB 181.31% (🟡 +0.20%)
/settings/organizations/new 159.67 KB 387.35 KB 110.67% (🟡 +0.47%)
/settings/organizations/privacy 274.59 KB 502.27 KB 143.51% (🟡 +0.66%)
/settings/organizations/profile 409.25 KB 636.93 KB 181.98% (🟡 +0.61%)
/settings/organizations/sso 279.77 KB 507.45 KB 144.99% (🟡 +0.69%)
/settings/organizations/teams/other 270.01 KB 497.69 KB 142.20% (🟡 +0.70%)
/settings/organizations/teams/other/[id]/appearance 281.63 KB 509.32 KB 145.52% (🟡 +0.67%)
/settings/organizations/teams/other/[id]/members 276.5 KB 504.18 KB 144.05% (🟡 +0.67%)
/settings/organizations/teams/other/[id]/profile 480.16 KB 707.84 KB 202.24% (🟡 +0.66%)
/settings/platform 267.65 KB 495.33 KB 141.52% (🟡 +0.70%)
/settings/platform/new 120.71 KB 348.39 KB 99.54% (🟡 +0.52%)
/settings/platform/oauth-clients/[clientId]/edit 265.96 KB 493.64 KB 141.04% (🟡 +0.70%)
/settings/platform/oauth-clients/create 265.1 KB 492.78 KB 140.79% (🟡 +0.70%)
/settings/security/impersonation 274.24 KB 501.93 KB 143.41% (🟡 +0.67%)
/settings/security/password 312.4 KB 540.08 KB 154.31% (🟡 +0.68%)
/settings/security/sso 279.22 KB 506.9 KB 144.83% (🟡 +0.70%)
/settings/security/two-factor-auth 277.73 KB 505.41 KB 144.40% (🟡 +0.67%)
/settings/teams 268.68 KB 496.36 KB 141.82% (🟡 +0.70%)
/settings/teams/[id]/appearance 281.62 KB 509.3 KB 145.52% (🟡 +0.66%)
/settings/teams/[id]/billing 269.18 KB 496.86 KB 141.96% (🟡 +0.70%)
/settings/teams/[id]/members 386.62 KB 614.3 KB 175.52% (🟡 +0.67%)
/settings/teams/[id]/profile 480.99 KB 708.67 KB 202.48% (🟡 +0.67%)
/teams 262.78 KB 490.46 KB 140.13% (🟡 +0.70%)
/upgrade 262.9 KB 490.58 KB 140.17% (🟡 +0.69%)
/video/[uid] 291.22 KB 518.9 KB 148.26% (🟢 -0.17%)
/workflows 294.65 KB 522.33 KB 149.24% (🟡 +0.71%)
/workflows/[workflow] 420.57 KB 648.25 KB 185.21% (🟡 +0.26%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@PeerRich PeerRich merged commit c3a532c into main Jul 3, 2024
@PeerRich PeerRich deleted the update-platform-seed-script branch July 3, 2024 15:31
p6l-richard pushed a commit to p6l-richard/cal.com-fork that referenced this pull request Jul 22, 2024
Co-authored-by: Rajiv Sahal <rajivsahal@Rajivs-MacBook-Pro.local>
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 platform Anything related to our platform plan ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants