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

feat: 5586 - explicit call to "food" server for user login actions #5662

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • For user login actions (sign up, register, forgot password), now we explicitly go to the "food" server.
  • The point is to reduce the number of implicit calls to the food server.

Part of

Impacted files:
* `forgot_password_page.dart`
* `login_result.dart`
* `sign_up_page.dart`
@github-actions github-actions bot added the 👥 User management Account login, signup, signout label Oct 2, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 6.85%. Comparing base (4d9c7fc) to head (d180f38).
Report is 341 commits behind head on develop.

Files with missing lines Patch % Lines
...kages/smooth_app/lib/data_models/login_result.dart 0.00% 1 Missing ⚠️
...ib/pages/user_management/forgot_password_page.dart 0.00% 1 Missing ⚠️
...th_app/lib/pages/user_management/sign_up_page.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5662      +/-   ##
==========================================
- Coverage     9.54%   6.85%   -2.70%     
==========================================
  Files          325     402      +77     
  Lines        16411   21379    +4968     
==========================================
- Hits          1567    1466     -101     
- Misses       14844   19913    +5069     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

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

Were we making 4 queries ? If so, do we need to audit all use cases where we make queries and make them project explicit ? eg tagline, user stats, static pages… @g123k

@teolemon teolemon added the OxF label Oct 3, 2024
@monsieurtanuki monsieurtanuki merged commit 778b3fb into openfoodfacts:develop Oct 3, 2024
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your review!

Were we making 4 queries ? If so, do we need to audit all use cases where we make queries and make them project explicit ? eg tagline, user stats, static pages… @g123k

No we weren't making 4 queries, we were always using the default server, i.e. food.
The point is to make the product type mandatory for all queries:

  • product related queries must use the corresponding OxF server
  • login queries should rather use a fixed server (this PR)
  • other queries should use a specific server if relevant, or explicitly "food"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OxF 👥 User management Account login, signup, signout
Development

Successfully merging this pull request may close these issues.

3 participants