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: Remove default org feature flag and adjust useUserAccessGate #2388

Merged
merged 8 commits into from
Nov 15, 2023

Conversation

RulaKhaled
Copy link
Contributor

Description

While removing default org feature flag i noticed that we are handling missing user weirdly, in a way that if the request fails, we still update the fields e.g showDefaultOrg which was causing some weird behaviors in use user access gate hook.

Notable Changes

-> Fix missing user and handle update values if user data exists
-> Decouple internal user and user
-> Remove default org flag
-> Update tests

Screenshots

nothing visual changed

closes: codecov/engineering-team#483

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Copy link

netlify bot commented Nov 7, 2023

Deploy Preview for gazebo-staging ready!

Name Link
🔨 Latest commit e187031
🔍 Latest deploy log https://app.netlify.com/sites/gazebo-staging/deploys/654a4bed407ec9000816453f
😎 Deploy Preview https://deploy-preview-2388--gazebo-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov-staging
Copy link

codecov-staging bot commented Nov 7, 2023

Codecov Report

Merging #2388 (f432c9e) into main (3a833bf) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2388      +/-   ##
==========================================
- Coverage   96.22%   96.22%   -0.01%     
==========================================
  Files         750      750              
  Lines        9407     9400       -7     
  Branches     2360     2359       -1     
==========================================
- Hits         9052     9045       -7     
  Misses        338      338              
  Partials       17       17              
Files Coverage Δ
src/layouts/BaseLayout/hooks/useUserAccessGate.js 100.00% <100.00%> (ø)
...ners/RequestInstallBanner/RequestInstallBanner.jsx 100.00% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a833bf...f432c9e. Read the comment docs.

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Merging #2388 (f432c9e) into main (3a833bf) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2388     +/-   ##
=======================================
- Coverage   96.23   96.22   -0.01     
=======================================
  Files        750     750             
  Lines       9407    9400      -7     
  Branches    2347    2359     +12     
=======================================
- Hits        9052    9045      -7     
  Misses       338     338             
  Partials      17      17             
Files Coverage Δ
src/layouts/BaseLayout/hooks/useUserAccessGate.js 100.00% <100.00%> (ø)
...ners/RequestInstallBanner/RequestInstallBanner.jsx 100.00% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a833bf...f432c9e. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Nov 7, 2023

Codecov Report

Merging #2388 (f432c9e) into main (3a833bf) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2388      +/-   ##
==========================================
- Coverage   96.22%   96.22%   -0.01%     
==========================================
  Files         750      750              
  Lines        9407     9400       -7     
  Branches     2314     2354      +40     
==========================================
- Hits         9052     9045       -7     
+ Misses        340      338       -2     
- Partials       15       17       +2     
Files Coverage Δ
src/layouts/BaseLayout/hooks/useUserAccessGate.js 100.00% <100.00%> (ø)
...ners/RequestInstallBanner/RequestInstallBanner.jsx 100.00% <ø> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a833bf...f432c9e. Read the comment docs.

Copy link

netlify bot commented Nov 7, 2023

Deploy Preview for gazebo-staging ready!

Name Link
🔨 Latest commit f432c9e
🔍 Latest deploy log https://app.netlify.com/sites/gazebo-staging/deploys/6554aaeb318fae0008906278
😎 Deploy Preview https://deploy-preview-2388--gazebo-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@RulaKhaled RulaKhaled marked this pull request as ready for review November 7, 2023 14:50
@RulaKhaled RulaKhaled changed the title fix: Remove default org feature flag and fix useUserAccessGate fix: Remove default org feature flag and adjust useUserAccessGate Nov 7, 2023
@nicholas-codecov nicholas-codecov self-requested a review November 14, 2023 17:13
Copy link
Contributor

@nicholas-codecov nicholas-codecov left a comment

Choose a reason for hiding this comment

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

Looks awesome, thank you thank you 🎉

@RulaKhaled RulaKhaled merged commit ade5d29 into main Nov 15, 2023
29 of 30 checks passed
@RulaKhaled RulaKhaled deleted the default-org-flag branch November 15, 2023 11:43
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.

Remove default-org-selector-page Flag
2 participants