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

Simplify default country code lookup #13103

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

mkllnk
Copy link
Member

@mkllnk mkllnk commented Jan 28, 2025

What? Why?

Triggering asset precompilation on CI revealed that it was depending on a country entry in the database. But it was just accessing a country code which is available as environment variable. I removed that indirection which makes assets now independent of the database.

What should we test?

  • Specs only.

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

The title of the pull request will be included in the release notes.

Dependencies

Documentation updates

Sorry, something went wrong.

The code was using the code from the environment variables to load a
reocrd from the database to then return the initial code again.

The only use of `DefaultCountry.code` is currently in the geocoder JS
compilation. Now it doesn't need the database anymore.
@mkllnk mkllnk added the technical changes only These pull requests do not contain user facing changes and are grouped in release notes label Jan 28, 2025
@mkllnk mkllnk self-assigned this Jan 28, 2025
@mkllnk mkllnk marked this pull request as ready for review January 28, 2025 02:52
Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

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

🤩

Copy link
Collaborator

@rioug rioug left a comment

Choose a reason for hiding this comment

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

Nice one 👍

@rioug rioug merged commit 1ee2f4d into openfoodfoundation:master Jan 28, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical changes only These pull requests do not contain user facing changes and are grouped in release notes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants