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

fix: add belongsToActiveTeam #7890

Merged
merged 5 commits into from
Mar 23, 2023
Merged

fix: add belongsToActiveTeam #7890

merged 5 commits into from
Mar 23, 2023

Conversation

Udit-takkar
Copy link
Contributor

@Udit-takkar Udit-takkar commented Mar 22, 2023

What does this PR do?

Fixes #7884

Screenshot 2023-03-23 at 2 26 50 AM

for google sign-in the belongsToActiveTeams property was not set

Environment: Staging(main branch) / Production

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

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
@Udit-takkar Udit-takkar requested a review from a team March 22, 2023 21:00
@vercel
Copy link

vercel bot commented Mar 22, 2023

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

2 Ignored Deployments
Name Status Preview Comments Updated
cal ⬜️ Ignored (Inspect) Visit Preview Mar 23, 2023 at 3:16PM (UTC)
ui ⬜️ Ignored (Inspect) Visit Preview Mar 23, 2023 at 3:16PM (UTC)

@github-actions
Copy link
Contributor

github-actions bot commented Mar 22, 2023

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 210.9 KB (🟡 +2 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

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

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Sixty-six 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)
/404 8.37 KB 219.27 KB 62.65% (+/- <0.01%)
/[user] 111.34 KB 322.24 KB 92.07% (🟡 +9.50%)
/[user]/[type] 99.83 KB 310.73 KB 88.78% (+/- <0.01%)
/[user]/[type]/embed 99.85 KB 310.75 KB 88.79% (+/- <0.01%)
/[user]/book 191.24 KB 402.14 KB 114.90% (+/- <0.01%)
/[user]/embed 111.41 KB 322.31 KB 92.09% (🟡 +9.50%)
/apps 171.31 KB 382.21 KB 109.20% (+/- <0.01%)
/apps/[slug] 195.03 KB 405.93 KB 115.98% (+/- <0.01%)
/apps/categories 156.21 KB 367.11 KB 104.89% (+/- <0.01%)
/apps/categories/[category] 160.07 KB 370.97 KB 105.99% (+/- <0.01%)
/apps/installed/[category] 201.23 KB 412.13 KB 117.75% (+/- <0.01%)
/auth/error 19.24 KB 230.14 KB 65.76% (+/- <0.01%)
/auth/forgot-password 25.58 KB 236.48 KB 67.57% (+/- <0.01%)
/auth/forgot-password/[id] 40.9 KB 251.8 KB 71.94% (+/- <0.01%)
/auth/login 40.05 KB 250.96 KB 71.70% (+/- <0.01%)
/auth/logout 7.56 KB 218.46 KB 62.42% (+/- <0.01%)
/auth/setup 103.48 KB 314.38 KB 89.82% (+/- <0.01%)
/availability 159.42 KB 370.32 KB 105.81% (🟢 -0.01%)
/availability/[schedule] 276.22 KB 487.12 KB 139.18% (+/- <0.01%)
/availability/troubleshoot 156.9 KB 367.8 KB 105.08% (+/- <0.01%)
/booking/[uid] 131.43 KB 342.33 KB 97.81% (+/- <0.01%)
/bookings/[status] 269.09 KB 479.99 KB 137.14% (+/- <0.01%)
/d/[link]/[slug] 99.48 KB 310.38 KB 88.68% (+/- <0.01%)
/d/[link]/[slug]/embed 99.5 KB 310.41 KB 88.69% (+/- <0.01%)
/d/[link]/book 190.89 KB 401.79 KB 114.80% (+/- <0.01%)
/event-types 354.02 KB 564.92 KB 161.41% (🟢 -0.04%)
/event-types/[type] 386.74 KB 597.64 KB 170.75% (🟡 +0.02%)
/getting-started/[[...step]] 334.19 KB 545.09 KB 155.74% (🟡 +0.01%)
/more 155.83 KB 366.73 KB 104.78% (+/- <0.01%)
/settings/admin 161.27 KB 372.17 KB 106.34% (+/- <0.01%)
/settings/admin/apps 194.17 KB 405.08 KB 115.74% (+/- <0.01%)
/settings/admin/apps/[category] 194.16 KB 405.06 KB 115.73% (+/- <0.01%)
/settings/admin/impersonation 161.56 KB 372.46 KB 106.42% (+/- <0.01%)
/settings/billing 161.39 KB 372.29 KB 106.37% (+/- <0.01%)
/settings/developer/api-keys 190.54 KB 401.44 KB 114.70% (+/- <0.01%)
/settings/developer/webhooks 163.88 KB 374.78 KB 107.08% (+/- <0.01%)
/settings/developer/webhooks/[id] 194.73 KB 405.63 KB 115.89% (+/- <0.01%)
/settings/developer/webhooks/new 194.59 KB 405.49 KB 115.85% (+/- <0.01%)
/settings/my-account/appearance 175.35 KB 386.25 KB 110.36% (+/- <0.01%)
/settings/my-account/conferencing 167.15 KB 378.05 KB 108.01% (+/- <0.01%)
/settings/my-account/general 270.45 KB 481.35 KB 137.53% (+/- <0.01%)
/settings/my-account/profile 429.11 KB 640.01 KB 182.86% (🟡 +0.01%)
/settings/security/impersonation 163.43 KB 374.33 KB 106.95% (+/- <0.01%)
/settings/security/password 196.72 KB 407.62 KB 116.46% (+/- <0.01%)
/settings/security/sso 171.12 KB 382.02 KB 109.15% (+/- <0.01%)
/settings/security/two-factor-auth 165.88 KB 376.78 KB 107.65% (+/- <0.01%)
/settings/teams 161.02 KB 371.92 KB 106.26% (+/- <0.01%)
/settings/teams/[id]/appearance 175.37 KB 386.27 KB 110.36% (+/- <0.01%)
/settings/teams/[id]/billing 161.25 KB 372.16 KB 106.33% (+/- <0.01%)
/settings/teams/[id]/members 301.91 KB 512.81 KB 146.52% (+/- <0.01%)
/settings/teams/[id]/onboard-members 74.11 KB 285.01 KB 81.43% (+/- <0.01%)
/settings/teams/[id]/profile 273.66 KB 484.56 KB 138.45% (🟢 -0.03%)
/settings/teams/[id]/sso 171.21 KB 382.11 KB 109.17% (+/- <0.01%)
/settings/teams/new 113.4 KB 324.3 KB 92.66% (+/- <0.01%)
/signup 25.45 KB 236.35 KB 67.53% (+/- <0.01%)
/team/[slug] 113.88 KB 324.79 KB 92.80% (🟡 +9.50%)
/team/[slug]/[type] 99.48 KB 310.38 KB 88.68% (+/- <0.01%)
/team/[slug]/[type]/embed 99.51 KB 310.41 KB 88.69% (+/- <0.01%)
/team/[slug]/book 190.89 KB 401.79 KB 114.80% (+/- <0.01%)
/team/[slug]/embed 113.95 KB 324.85 KB 92.81% (🟡 +9.51%)
/teams 156.06 KB 366.96 KB 104.84% (+/- <0.01%)
/video/meeting-ended/[uid] 22.77 KB 233.67 KB 66.76% (+/- <0.01%)
/video/meeting-not-started/[uid] 22.41 KB 233.31 KB 66.66% (+/- <0.01%)
/video/no-meeting-found 6.6 KB 217.5 KB 62.14% (+/- <0.01%)
/workflows 168.95 KB 379.85 KB 108.53% (+/- <0.01%)
/workflows/[workflow] 298.77 KB 509.67 KB 145.62% (🟢 -0.01%)
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.

@deploysentinel
Copy link

deploysentinel bot commented Mar 22, 2023

Current Playwright Test Results Summary

✅ 52 Passing - ⚠️ 1 Flaky

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

(Last updated on 03/23/2023 03:31:57pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: f8bdd01

Started: 03/23/2023 03:27:06pm 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
6.82% (15) 15 / 220 runs
failed over last 7 days
35% (77) 77 / 220 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Member

@hariombalhara hariombalhara left a comment

Choose a reason for hiding this comment

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

Left a comment

return {
...existingUser,
id: existingUser.id,
Copy link
Member

Choose a reason for hiding this comment

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

cc @emrysal @zomars This is a critical place to change, looks good to me, but you should check too.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure why we shouldn't continue to just ...existingUser, belongsToActiveTeam will append. 💭

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
Copy link
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

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

It works, but please keep this logic as consistent to before as possible.

packages/features/auth/lib/next-auth-options.ts Outdated Show resolved Hide resolved
return {
...existingUser,
id: existingUser.id,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure why we shouldn't continue to just ...existingUser, belongsToActiveTeam will append. 💭

@Udit-takkar
Copy link
Contributor Author

Udit-takkar commented Mar 23, 2023

@emrysal don't want to pass the teams field with existingUser

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
@emrysal
Copy link
Contributor

emrysal commented Mar 23, 2023

@emrysal don't want to pass the teams field with existingUser

Ah makes sense, use deconstructing 👍

const { teams, ...existingUser } = ...

optionally then cleanup using
delete teams;

Udit Takkar added 2 commits March 23, 2023 20:44
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
Copy link
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

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

LGTM, looking good 👍

@emrysal emrysal merged commit fa17139 into main Mar 23, 2023
@emrysal emrysal deleted the fix/active-team-bug-in-google branch March 23, 2023 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-1315] belongs to Active team is not set for google sign in
3 participants