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: 5526 - new Prices prod/test url flag #5528

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Now we can make Prices point to the TEST env, while OFF still points to PROD env.

Screenshot

Screenshot_1723233887

Fixes bug(s)

Impacted files

  • background_task_add_prices.dart: Prices API called using new Prices prod/test url
  • get_prices_model.dart: Prices API called using new Prices prod/test url
  • price_user_button.dart: Prices API called using new Prices prod/test url
  • prices_proofs_page.dart: Prices API called using new Prices prod/test url
  • prices_users_page.dart: Prices API called using new Prices prod/test url
  • product_prices_list.dart: Prices API called using new Prices prod/test url
  • product_query.dart: new Prices prod/test url
  • user_preferences_account.dart: Prices API called using new Prices prod/test url
  • user_preferences_dev_mode.dart: new prod/test flag for Prices url

Impacted files:
* `background_task_add_prices.dart`: Prices API called using new Prices prod/test url
* `get_prices_model.dart`: Prices API called using new Prices prod/test url
* `price_user_button.dart`: Prices API called using new Prices prod/test url
* `prices_proofs_page.dart`: Prices API called using new Prices prod/test url
* `prices_users_page.dart`: Prices API called using new Prices prod/test url
* `product_prices_list.dart`: Prices API called using new Prices prod/test url
* `product_query.dart`: new Prices prod/test url
* `user_preferences_account.dart`: Prices API called using new Prices prod/test url
* `user_preferences_dev_mode.dart`: new prod/test flag for Prices url
@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 6.96%. Comparing base (4d9c7fc) to head (45eaabf).
Report is 273 commits behind head on develop.

Files Patch % Lines
...b/pages/preferences/user_preferences_dev_mode.dart 0.00% 6 Missing ⚠️
packages/smooth_app/lib/query/product_query.dart 0.00% 6 Missing ⚠️
..._app/lib/background/background_task_add_price.dart 0.00% 4 Missing ⚠️
...mooth_app/lib/pages/prices/prices_proofs_page.dart 0.00% 4 Missing ⚠️
...ib/pages/preferences/user_preferences_account.dart 0.00% 3 Missing ⚠️
...smooth_app/lib/pages/prices/prices_users_page.dart 0.00% 2 Missing ⚠️
.../smooth_app/lib/pages/prices/get_prices_model.dart 0.00% 1 Missing ⚠️
...smooth_app/lib/pages/prices/price_user_button.dart 0.00% 1 Missing ⚠️
...ooth_app/lib/pages/prices/product_prices_list.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5528      +/-   ##
==========================================
- Coverage     9.54%   6.96%   -2.58%     
==========================================
  Files          325     399      +74     
  Lines        16411   21149    +4738     
==========================================
- Hits          1567    1474      -93     
- Misses       14844   19675    +4831     

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

@teolemon
Copy link
Member

@monsieurtanuki Can you add an arbitrary URL (so that it can also be used for local development) ?

@monsieurtanuki
Copy link
Contributor Author

Can you add an arbitrary URL (so that it can also be used for local development) ?

@teolemon Not before Monday.

@monsieurtanuki
Copy link
Contributor Author

Can you add an arbitrary URL (so that it can also be used for local development) ?

@teolemon For the record I don't think we can be 100% flexible about the prices url.
Basically we only replace the subdomain with prices..
Therefore something like teolemon.example.com would be interpreted as prices.example.com.
Tell me if it's problematic - e.g. if you need to use teolemon-prices.example.com.

@teolemon
Copy link
Member

.net .org is nice.
I'm not completely sure how @raphael0202 and @raphodn envision the migration. I believe they will do a test install on something else than .net, but I'll let them confirm

@monsieurtanuki
Copy link
Contributor Author

.net .org is nice.

For the record that's already implemented in this PR: .org for prod and .net for test.

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.

@monsieurtanuki thank you for the PR. I'll reopen an issue depending on the answer from @raphodn and @raphael0202
Something we should also untangle are calls to Robotoff

@monsieurtanuki monsieurtanuki merged commit a8bce8a into openfoodfacts:develop Aug 12, 2024
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Allow to switch the Open Prices endpoint in Dev Mode
3 participants