Skip to content

Commit

Permalink
Merge branch 'main' into otel
Browse files Browse the repository at this point in the history
  • Loading branch information
hangy authored Feb 28, 2025
2 parents 0c15ec8 + e368745 commit 175afcf
Show file tree
Hide file tree
Showing 1,372 changed files with 52,634 additions and 79,690 deletions.
9 changes: 9 additions & 0 deletions .gemini/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
have_fun: false
code_review:
disable: false
comment_severity_threshold: MEDIUM
max_review_comments: -1
pull_request_opened:
help: false
summary: false
code_review: false
10 changes: 5 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
interval: "monthly"
open-pull-requests-limit: 300
groups:
babel:
Expand Down Expand Up @@ -41,20 +41,20 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
open-pull-requests-limit: 300
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
open-pull-requests-limit: 300
- package-ecosystem: "docker"
directory: "/docker/frontend"
schedule:
interval: "weekly"
interval: "monthly"
open-pull-requests-limit: 300
- package-ecosystem: "pip"
directory: "/scripts/packager-codes/non-eu/"
schedule:
interval: "daily"
interval: "monthly"
open-pull-requests-limit: 300
16 changes: 12 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ Numbers:
- any-glob-to-any-file: 'tests/unit/ingredients_nutriscore.t'
- any-glob-to-any-file: 'tests/unit/ingredients_nutriscore.t'
- any-glob-to-any-file: 'scripts/add_nutriscore_to_scanbot_csv.pl'
- any-glob-to-any-file: 'docs/introduction/get-the-nutriscore.md'
- any-glob-to-any-file: 'docs/api/api-tutorials/get-the-nutriscore.md'
- any-glob-to-any-file: 'docs/​api/​ref/​schemas/​product_nutriscore.yaml'

Nutrients:
Expand Down Expand Up @@ -1087,6 +1087,12 @@ Tags:
- any-glob-to-any-file: 'lib/ProductOpener/APITagRead.pm'
- any-glob-to-any-file: 'lib/ProductOpener/TagsEntries.pm'
- any-glob-to-any-file: 'lib/ProductOpener/KnowledgePanelsTags.pm'
- any-glob-to-any-file: 'docs/api/ref/schemas/product_tags.yaml'
- any-glob-to-any-file: 'docs/api/ref/schemas/tags/input_taxonomy_tag_entry.yaml'
- any-glob-to-any-file: 'docs/api/ref/schemas/tags/tags-write.yaml'
- any-glob-to-any-file: 'docs/api/ref/schemas/tags/tagtype.yaml'
- any-glob-to-any-file: 'docs/api/ref/schemas/tags/taxonomy_tag_entry.yaml'
- any-glob-to-any-file: 'po/tags/**/*'

Site layout:
- changed-files:
Expand Down Expand Up @@ -1161,8 +1167,9 @@ OCR:
Scanbot:
- changed-files:
- any-glob-to-any-file: 'scripts/scanbot.pl'


- any-glob-to-any-file: 'scripts/export_scans_to_query.pl'
- any-glob-to-any-file: 'scripts/add_nutriscore_to_scanbot_csv.pl'

# We used to have a nice missions system with badges you'd earn by doing certain contribution tasks. It was disabled when we made Open Food Facts multilingual, and we never got to refactor it.
# Tracking issue: https://github.com/openfoodfacts/openfoodfacts-server/issues/5516
# https://openfoodfacts.github.io/openfoodfacts-server/dev/ref-perl-pod/ProductOpener/Missions.html
Expand Down Expand Up @@ -1240,6 +1247,7 @@ Checkbot:
- any-glob-to-any-file: 'scripts/checkbot.pl'

# https://openfoodfacts.github.io/openfoodfacts-server/dev/ref-perl-pod/ProductOpener/APIProductRevert.html
# Also points to https://nutripatrol.openfoodfacts.org/
# Tracking issue:
👮 Moderation:
- changed-files:
Expand All @@ -1253,7 +1261,7 @@ Checkbot:
- any-glob-to-any-file: 'lib/ProductOpener/APIProductRevert.pm'
- any-glob-to-any-file: 'scripts/make_user_moderator.pl'
- any-glob-to-any-file: 'tests/integration/delete_user.t'

- any-glob-to-any-file: 'templates/api/knowledge-panels/report_problem/incomplete_or_incorrect_data.tt.json'

# Enabling users to delete account while preserving accountability for edits
# By default we don't delete products belonging to the user. It only happens for potential spam accounts.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/container-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ jobs:
cd ${{ matrix.env }} && \
make init_backend
# NOTE: the mongodb and redis containers are deployed by openfoodfacts-shared-services
- name: Start services
uses: appleboy/ssh-action@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-per-language.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Matrix
uses: crowdin/github-action@v2.5.1
uses: crowdin/github-action@v2.6.0
with:
upload_translations: false # default is false
download_translations: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: crowdin action
uses: crowdin/github-action@v2.5.1
uses: crowdin/github-action@v2.6.0
with:
upload_translations: false # default is false
# Use this option to upload translations for a single specified language
Expand Down
16 changes: 1 addition & 15 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,6 @@ concurrency:

jobs:

# those are just until we de-activate their mandatory
gulp:
name: Gulp
runs-on: ubuntu-latest
steps:
- name: just finish
run: exit 0
dev:
name: Dev
runs-on: ubuntu-latest
steps:
- name: just finish
run: exit 0

lint:
name: 🕵️‍♀️ NPM lint
runs-on: ubuntu-latest
Expand Down Expand Up @@ -254,4 +240,4 @@ jobs:
run: |
env/setenv.sh off;
sh -c ". conf/apache-2.4/off-envvars"
sh -c "APACHE_CONFDIR=/etc/apache2-priority; . conf/apache-2.4/off-envvars"
sh -c "APACHE_CONFDIR=/etc/apache2-priority; . conf/apache-2.4/off-envvars"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ tests/integration/outputs/


# Local files
.DS_Store?
.DS_Store
._*
.Spotlight-V100
Expand Down
80 changes: 80 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,85 @@
# Changelog

## [2.60.0](https://github.com/openfoodfacts/openfoodfacts-server/compare/v2.59.0...v2.60.0) (2025-02-26)


### Features

* adding a prefix to facets ([#11387](https://github.com/openfoodfacts/openfoodfacts-server/issues/11387)) ([c539f06](https://github.com/openfoodfacts/openfoodfacts-server/commit/c539f065fe659312914952aafdcd54b737366b7f))
* category translations for Open Beauty Facts ([#11477](https://github.com/openfoodfacts/openfoodfacts-server/issues/11477)) ([b6d7c37](https://github.com/openfoodfacts/openfoodfacts-server/commit/b6d7c37931352dd01554a560bda4526689247ecb))


### Bug Fixes

* add missing product_type field to products, ([#11495](https://github.com/openfoodfacts/openfoodfacts-server/issues/11495)) ([2a81308](https://github.com/openfoodfacts/openfoodfacts-server/commit/2a81308e0715d242d73f95db43f188ed3cfa0cc1)), closes [#11492](https://github.com/openfoodfacts/openfoodfacts-server/issues/11492)
* fix gen_feeds for pro platform ([#11469](https://github.com/openfoodfacts/openfoodfacts-server/issues/11469)) ([0556332](https://github.com/openfoodfacts/openfoodfacts-server/commit/0556332e30291cd0e1c680b61d0492de3890902b))
* Fix resume from checkpoint code in export scans ([#11460](https://github.com/openfoodfacts/openfoodfacts-server/issues/11460)) ([1d72e42](https://github.com/openfoodfacts/openfoodfacts-server/commit/1d72e427dfdd60c0287a0a3c640ff8dc411223e2))
* gen_feeds_daily.sh: failure email for export_database.pl ([#11454](https://github.com/openfoodfacts/openfoodfacts-server/issues/11454)) ([3938ce8](https://github.com/openfoodfacts/openfoodfacts-server/commit/3938ce807c1ebc871cc9d37382c1edf79430cf42))
* parents ingredients recipes stats for set of products ([#11485](https://github.com/openfoodfacts/openfoodfacts-server/issues/11485)) ([b0b191b](https://github.com/openfoodfacts/openfoodfacts-server/commit/b0b191bbcfa7cca95be1becec5c6bb147c3f5e21))
* put back nutrients in CSV export ([#11490](https://github.com/openfoodfacts/openfoodfacts-server/issues/11490)) ([a498b32](https://github.com/openfoodfacts/openfoodfacts-server/commit/a498b32092b146ad1650e3e2cf55050fd5adf984))
* typo ([#11436](https://github.com/openfoodfacts/openfoodfacts-server/issues/11436)) ([f06c438](https://github.com/openfoodfacts/openfoodfacts-server/commit/f06c438c5afb747c6455fe9aa37cfbecb4bf4158))

## [2.59.0](https://github.com/openfoodfacts/openfoodfacts-server/compare/v2.58.0...v2.59.0) (2025-02-18)


### Features

* Cleanup flavor GetText files (needs testing) ([0c05077](https://github.com/openfoodfacts/openfoodfacts-server/commit/0c05077e3a7c007661b31b61f208c7bde55014e5))
* Cleanup flavor GetText files (needs testing) ([#11418](https://github.com/openfoodfacts/openfoodfacts-server/issues/11418)) ([0c05077](https://github.com/openfoodfacts/openfoodfacts-server/commit/0c05077e3a7c007661b31b61f208c7bde55014e5))
* more data quality warnings for ingredients language mismatch ([#11392](https://github.com/openfoodfacts/openfoodfacts-server/issues/11392)) ([f336907](https://github.com/openfoodfacts/openfoodfacts-server/commit/f336907a721518223379c701183b237f16a29023))
* Script to upload scans to off-query ([#11378](https://github.com/openfoodfacts/openfoodfacts-server/issues/11378)) ([7ae3423](https://github.com/openfoodfacts/openfoodfacts-server/commit/7ae3423cad14ce3b95e7ce984e5d0c1037d2f5f7))
* Secondary taxonomy translations for Open Beauty Facts ([#11423](https://github.com/openfoodfacts/openfoodfacts-server/issues/11423)) ([6b0ecc2](https://github.com/openfoodfacts/openfoodfacts-server/commit/6b0ecc2baa463154715ca045871235e745353ddc))
* taxonomy enhancer ([#11267](https://github.com/openfoodfacts/openfoodfacts-server/issues/11267)) ([c2e4cbe](https://github.com/openfoodfacts/openfoodfacts-server/commit/c2e4cbe226fb684b5a8361d2245ab37e5c58d5a2))
* update product_type ([#11173](https://github.com/openfoodfacts/openfoodfacts-server/issues/11173)) ([d1648b3](https://github.com/openfoodfacts/openfoodfacts-server/commit/d1648b331686e3483ee9209c0feecaf8ade81707))
* use ingredients processing for NOVA classification ([#11344](https://github.com/openfoodfacts/openfoodfacts-server/issues/11344)) ([25cdb95](https://github.com/openfoodfacts/openfoodfacts-server/commit/25cdb95dd9aaf697f4c9c344a7cf8d8e4fcb6725))


### Bug Fixes

* Add Missing site description for OPF and OPFF ([#11433](https://github.com/openfoodfacts/openfoodfacts-server/issues/11433)) ([5c3404f](https://github.com/openfoodfacts/openfoodfacts-server/commit/5c3404f8fca60d3b2b920a2492f9ca2566e8ac86)), closes [#11313](https://github.com/openfoodfacts/openfoodfacts-server/issues/11313)
* add taxonomy for EU lists of allergens (Open Beauty Facts) ([#11394](https://github.com/openfoodfacts/openfoodfacts-server/issues/11394)) ([5e1c673](https://github.com/openfoodfacts/openfoodfacts-server/commit/5e1c6730bbf6bcc22dc8c81e107720cdd56bf12e))
* always show as sold nutrition in petfood edit form ([#11409](https://github.com/openfoodfacts/openfoodfacts-server/issues/11409)) ([516cb79](https://github.com/openfoodfacts/openfoodfacts-server/commit/516cb7931532e8ea73b6a8d656d89568d11af344))
* redirect pro.off to world.pro.off ([#11391](https://github.com/openfoodfacts/openfoodfacts-server/issues/11391)) ([ca4deb0](https://github.com/openfoodfacts/openfoodfacts-server/commit/ca4deb020dec0fc22d696bedd0f205b50c36765e))
* rename images for Health Canada nutrition logos ([#11411](https://github.com/openfoodfacts/openfoodfacts-server/issues/11411)) ([2cac87f](https://github.com/openfoodfacts/openfoodfacts-server/commit/2cac87fd1222736bf02b2b85d7a424e77d2e1ae6))
* update actions for some data quality facets ([#11426](https://github.com/openfoodfacts/openfoodfacts-server/issues/11426)) ([150b30c](https://github.com/openfoodfacts/openfoodfacts-server/commit/150b30c2466b3689643c3be275acc75188f5b8b6))

## [2.58.0](https://github.com/openfoodfacts/openfoodfacts-server/compare/v2.57.0...v2.58.0) (2025-02-12)


### Features

* petfood-nutrition-facts ([#11188](https://github.com/openfoodfacts/openfoodfacts-server/issues/11188)) ([f101551](https://github.com/openfoodfacts/openfoodfacts-server/commit/f1015516f3a9b518c1370cf90d914c2a57f7f05e))


### Bug Fixes

* disable rate limiting for internal trafic ([#11327](https://github.com/openfoodfacts/openfoodfacts-server/issues/11327)) ([17b9a54](https://github.com/openfoodfacts/openfoodfacts-server/commit/17b9a5479115384fdc2ef22294017ffca15e5270))
* food contact packagings for chocolate bars ([#11343](https://github.com/openfoodfacts/openfoodfacts-server/issues/11343)) ([c485494](https://github.com/openfoodfacts/openfoodfacts-server/commit/c485494e2c854a1391c1452ac95c1e514badfa5e))
* remove %options ([#11345](https://github.com/openfoodfacts/openfoodfacts-server/issues/11345)) ([3491318](https://github.com/openfoodfacts/openfoodfacts-server/commit/34913185a340dbd221a4ae7948208bd1452fab2e))

## [2.57.0](https://github.com/openfoodfacts/openfoodfacts-server/compare/v2.56.0...v2.57.0) (2025-02-04)


### Features

* Add security.txt ([#11290](https://github.com/openfoodfacts/openfoodfacts-server/issues/11290)) ([2ce94d8](https://github.com/openfoodfacts/openfoodfacts-server/commit/2ce94d83eb17753bd2913fbc78a30199861cf85b))
* enable nutripatrol panel on mobile ([#11323](https://github.com/openfoodfacts/openfoodfacts-server/issues/11323)) ([741d414](https://github.com/openfoodfacts/openfoodfacts-server/commit/741d4147d2840f22e2f7fd9a692827b5dd9dbd7f))
* ingredients knowledge panels ([#10904](https://github.com/openfoodfacts/openfoodfacts-server/issues/10904)) ([2443694](https://github.com/openfoodfacts/openfoodfacts-server/commit/2443694327699ffce0a81fd0609e2cd2db1bce34))


### Bug Fixes

* better analysis of "oil (rapeseed, something unrecognized)" + separation of additive class + additive ([#11251](https://github.com/openfoodfacts/openfoodfacts-server/issues/11251)) ([fde3287](https://github.com/openfoodfacts/openfoodfacts-server/commit/fde3287deb1b778440240e29a82a46055023b64e))
* FLAVOR_NAME is openproductsfacts ([#11312](https://github.com/openfoodfacts/openfoodfacts-server/issues/11312)) ([c4fa828](https://github.com/openfoodfacts/openfoodfacts-server/commit/c4fa8289c722af5cad5811e93d67cd4a01826803))
* Import format_subdomain ([#11288](https://github.com/openfoodfacts/openfoodfacts-server/issues/11288)) ([930dc47](https://github.com/openfoodfacts/openfoodfacts-server/commit/930dc476ffe553bcd480fd39903cf8def85fa408))
* Open Beauty Facts string fixes ([92de3be](https://github.com/openfoodfacts/openfoodfacts-server/commit/92de3be090f3618017d14dbdd4bdda2b0aab8399))
* Open Beauty Facts string fixes ([#11286](https://github.com/openfoodfacts/openfoodfacts-server/issues/11286)) ([92de3be](https://github.com/openfoodfacts/openfoodfacts-server/commit/92de3be090f3618017d14dbdd4bdda2b0aab8399))
* Open Products Facts lang fixes ([b8651b8](https://github.com/openfoodfacts/openfoodfacts-server/commit/b8651b8626ead252b4957e4d674208449eb72ade))
* Open Products Facts lang fixes ([#11285](https://github.com/openfoodfacts/openfoodfacts-server/issues/11285)) ([b8651b8](https://github.com/openfoodfacts/openfoodfacts-server/commit/b8651b8626ead252b4957e4d674208449eb72ade))
* separate granulated sugars from white sugars ([#11325](https://github.com/openfoodfacts/openfoodfacts-server/issues/11325)) ([cfb5fd5](https://github.com/openfoodfacts/openfoodfacts-server/commit/cfb5fd5b3d300d80a2b681f4fd932199146cb052))
* set APACHE_ENVVARS=/etc/apache2/off-envvars + doc precision ([#11279](https://github.com/openfoodfacts/openfoodfacts-server/issues/11279)) ([da7185a](https://github.com/openfoodfacts/openfoodfacts-server/commit/da7185a8974c89b012be65a74e32a43c4ef2a2e7))
* Update `green-score-f.svg` (white background) ([#11314](https://github.com/openfoodfacts/openfoodfacts-server/issues/11314)) ([d57e2de](https://github.com/openfoodfacts/openfoodfacts-server/commit/d57e2de9b63bb7a69499653ce946062e01addaf4))

## [2.56.0](https://github.com/openfoodfacts/openfoodfacts-server/compare/v2.55.0...v2.56.0) (2025-01-22)


Expand Down
16 changes: 15 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ RUN --mount=type=cache,id=apt-cache,target=/var/cache/apt \
libemail-valid-perl
RUN --mount=type=cache,id=apt-cache,target=/var/cache/apt \
--mount=type=cache,id=lib-apt-cache,target=/var/lib/apt set -x && \
# rerun apt update, because last RUN might be in cache
( ( [ ! -e /var/cache/apt/pkgcache.bin ] || [ $(($(date +%s) - $(stat --format=%Y /var/cache/apt/pkgcache.bin))) -gt 3600 ] ) && \
apt update || true \
) && \
apt install -y \
#
# cpan dependencies that can be satisfied by apt even if the package itself can't:
Expand Down Expand Up @@ -160,6 +164,8 @@ RUN --mount=type=cache,id=apt-cache,target=/var/cache/apt \
libperl-dev \
# needed to build Apache2::Connection::XForwardedFor
libapache2-mod-perl2-dev \
# needed for Imager::File::WEBP
libwebpmux3 \
# Imager::zxing - build deps
cmake \
pkg-config \
Expand Down Expand Up @@ -203,7 +209,15 @@ WORKDIR /tmp
# Install Product Opener from the workdir.
COPY ./cpanfile* /tmp/
# Add ProductOpener runtime dependencies from cpan
RUN --mount=type=cache,id=cpanm-cache,target=/root/.cpanm \
# we also add apt cache as some libraries might be installed from apt
RUN --mount=type=cache,id=apt-cache,target=/var/cache/apt \
--mount=type=cache,id=lib-apt-cache,target=/var/lib/apt \
--mount=type=cache,id=cpanm-cache,target=/root/.cpanm \
set -x && \
# also run apt update if needed because some package might need to apt install
( ( [ ! -e /var/cache/apt/pkgcache.bin ] || [ $(($(date +%s) - $(stat --format=%Y /var/cache/apt/pkgcache.bin))) -gt 3600 ] ) && \
apt update || true \
) && \
# first install some dependencies that are not well handled
cpanm --notest --quiet --skip-satisfied --local-lib /tmp/local/ "Apache::Bootstrap" && \
cpanm $CPANMOPTS --notest --quiet --skip-satisfied --local-lib /tmp/local/ --installdeps . \
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,19 @@ _up:run_deps
up: build create_folders _up

# Used by staging so that shared services are not created
# Shared services are started by the github workflow of openfoodfacts-shared-services
prod_up: build create_folders
@echo "🥫 Starting containers …"
${DOCKER_COMPOSE_BUILD} up -d 2>&1
${DOCKER_COMPOSE} up -d 2>&1

down:
@echo "🥫 Bringing down containers …"
${DOCKER_COMPOSE_BUILD} down
${DOCKER_COMPOSE} down

# Note: we use it in deploy, so we must not use --remove-orphans as it would remove shared-net services
hdown:
@echo "🥫 Bringing down containers and associated volumes …"
${DOCKER_COMPOSE_BUILD} down -v
${DOCKER_COMPOSE} down -v ${args}

reset: hdown up

Expand Down
Loading

0 comments on commit 175afcf

Please sign in to comment.