Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into otel
Browse files Browse the repository at this point in the history
  • Loading branch information
hangy committed Sep 21, 2024
2 parents 955076a + a5f1662 commit 47a8130
Show file tree
Hide file tree
Showing 321 changed files with 12,338 additions and 2,431 deletions.
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/[email protected].1
uses: crowdin/[email protected].2
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/[email protected].1
uses: crowdin/[email protected].2
with:
upload_translations: false # default is false
# Use this option to upload translations for a single specified language
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Deploy API documentation to GitHub Pages
uses: JamesIves/[email protected].3
uses: JamesIves/[email protected].4
# we only deploy on push to main
if: |
github.event_name == 'push' && github.event.ref == 'refs/heads/main'
Expand Down
41 changes: 28 additions & 13 deletions .github/workflows/github-projects-ventilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
issues:
types:
- labeled
- opened
- transferred
- edited

jobs:
add-to-projects:
Expand All @@ -12,63 +15,63 @@ jobs:
steps:
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/43 # Add issue to the openfoodfacts-design project
project-url: https://github.com/orgs/openfoodfacts/projects/11 # Add issue to the openfoodfacts-design project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: mockups available, needs mockup
labeled: 🎨 Mockup available, 🎨 Mockup required
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/36 # Add issue to the open pet food facts project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: open pet food facts
labeled: 🐾 Open Pet Food Facts
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/11 # Add issue to the open products facts project
project-url: https://github.com/orgs/openfoodfacts/projects/43 # Add issue to the open products facts project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: open products facts
labeled: 📸 Open Products Facts
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/37 # Add issue to the open beauty facts project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: open beauty facts
labeled: 🧴 Open Beauty Facts
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/4 # Add issue to the packaging project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: packaging
labeled: 📦 Packaging
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/25 # Add issue to the documentation project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: documentation
labeled: 📚 Documentation
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/5 # Add issue to the folksonomy project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: folksonomy project
labeled: 🏷️ Folksonomy Project
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/44 # Add issue to the data quality project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: data quality
labeled: 🧽 Data quality
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/82 # Add issue to the search project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: search
labeled: 🔎 Search
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/41 # Add issue to the producer platform project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: producers platform
labeled: 🏭 Producers Platform
label-operator: OR
- uses: actions/add-to-project@main
with:
Expand All @@ -80,5 +83,17 @@ jobs:
with:
project-url: https://github.com/orgs/openfoodfacts/projects/92 # Add issue to the Nutri-Score project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: nutriscore
labeled: 🚦 Nutri-Score
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/132 # Add issue to the Top upvoted issues board
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: ⭐ top issue, 👍 Top 10 Issue!
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/57 # Add issue to the Most impactful issues board
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🎯 P0, 🎯 P1
label-operator: OR
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## [2.44.0](https://github.com/openfoodfacts/openfoodfacts-server/compare/v2.43.0...v2.44.0) (2024-09-09)


### Features

* 99 French "indice de durabilité" Label images ([#10734](https://github.com/openfoodfacts/openfoodfacts-server/issues/10734)) ([be46cf8](https://github.com/openfoodfacts/openfoodfacts-server/commit/be46cf8683c5823f3714f9cfc418c9af5f561e8a))
* 99 indice de reparabilite logos ([#10748](https://github.com/openfoodfacts/openfoodfacts-server/issues/10748)) ([e2c302b](https://github.com/openfoodfacts/openfoodfacts-server/commit/e2c302b27ee347a1f1e105e7933d956ac7873057))
* new [taxonomy].extended.json with extended synonyms ([#10744](https://github.com/openfoodfacts/openfoodfacts-server/issues/10744)) ([e1a485e](https://github.com/openfoodfacts/openfoodfacts-server/commit/e1a485e16baece15d372f676d13fb27ba68da296))
* Open folksonomies for all connected users ([#10771](https://github.com/openfoodfacts/openfoodfacts-server/issues/10771)) ([160b792](https://github.com/openfoodfacts/openfoodfacts-server/commit/160b792a6f3c935f8ab4132bc37937201bae7195))
* prepare folksonomy for multi-domain ([#10775](https://github.com/openfoodfacts/openfoodfacts-server/issues/10775)) ([6f8e772](https://github.com/openfoodfacts/openfoodfacts-server/commit/6f8e7729ff1896e2a1ca3ef76b04bfe374befde0))
* script to extract historical data for a field (e.g. Nutri-Score) for a set of products ([#10408](https://github.com/openfoodfacts/openfoodfacts-server/issues/10408)) ([d40bcf6](https://github.com/openfoodfacts/openfoodfacts-server/commit/d40bcf67e8729449aca293d3a6a33a50b6720d26))


### Bug Fixes

* block more AI bots ([#10754](https://github.com/openfoodfacts/openfoodfacts-server/issues/10754)) ([852ca5f](https://github.com/openfoodfacts/openfoodfacts-server/commit/852ca5f978803287cc5e26f96cf0366a3dbe221c))
* fix crm sync ([#10747](https://github.com/openfoodfacts/openfoodfacts-server/issues/10747)) ([336647f](https://github.com/openfoodfacts/openfoodfacts-server/commit/336647fa22707f003a74df2e90205c1e95aba453))
* import_prod_data not working ([#10750](https://github.com/openfoodfacts/openfoodfacts-server/issues/10750)) ([a895cd3](https://github.com/openfoodfacts/openfoodfacts-server/commit/a895cd361c6fb135ff220357f5dfa6acbf2b3288)), closes [#10749](https://github.com/openfoodfacts/openfoodfacts-server/issues/10749)
* remove non-JS list of products ([#10743](https://github.com/openfoodfacts/openfoodfacts-server/issues/10743)) ([6805b9f](https://github.com/openfoodfacts/openfoodfacts-server/commit/6805b9fec6898e072f1758c4844f1d4fe2ce20c3))

## [2.43.0](https://github.com/openfoodfacts/openfoodfacts-server/compare/v2.42.0...v2.43.0) (2024-08-28)


Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.frontend
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ARG USER_UID=1000
ARG USER_GID=1000

FROM node:22.7.0 AS builder
FROM node:22.8.0 AS builder
ARG USER_UID
ARG USER_GID
RUN usermod --uid $USER_UID node && \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ endif


# use bash everywhere !
SHELL := /bin/bash
SHELL := $(shell which bash)
# some vars
ENV_FILE ?= .env
NAME = "ProductOpener"
Expand Down
68 changes: 68 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
Open Food Facts Server - Release Guide
======================================

Welcome to the release guide for the Open Food Facts Server. This guide outlines the process for releasing updates to the server, considering both the automated `.net` release and the manual `.org` release handled by @stephanegigandet.

https://world.openfoodfacts.org (production - manual by @stephanegigandet)
https://world.openfoodfacts.net (pre-production - automatic on each merge, including merges on openfoodfacts-web)
https://world.openfoodfacts.dev (experimental server - manual)

1. Pre-release Checklist
-------------------------

Before you proceed with the release, ensure the following:

- [ ] All planned features, fixes, and data updates are merged into the `main` branch.
- [ ] Automated tests pass successfully (normally it's not possible to merge to main if they fail)
- [ ] Review the `CHANGELOG.md` to ensure it accurately reflects the changes in this release (if the PRs had proper names, this should be the case)
- [ ] **Important**: Coordinate with @stephanegigandet if you need a manual `.org` release due to a time-sensitive event or a bug in production.

2. Trigger Automated `.net` Release
------------------------------------

1. Merge a pull request
2. The automated CI/CD pipeline will initiate the deployment to `.net` (20 min approx)
3. Monitor the pipeline's logs for any errors or warnings.

3. Manual `.org` Release (Coordinated by @stephanegigandet)
--------------------------------------------------------------

1. @stephanegigandet will initiate the deployment process to `.org`, that might involve database updates, running scripts and server configuration changes.
2. Collaborate with @stephanegigandet to list and address any issues that arise during the `.org` deployment in the Slack #product-opener channel or in a github issue with the ```P0``` label

4. Verify Deployment
---------------------

- [ ] Once both `.net` and `.org` deployments are complete, thoroughly test the production environment to ensure functionality, API and data integrity.
- [ ] Verify that all expected changes are visible and working correctly on both `.net` and `.org`.

5. Post-release
----------------

1. **Documentation**:
- If necessary, update relevant documentation (e.g., API docs, user guides) to reflect the changes in this release. This should be done in PR, rather that after-the-fact.
- Create issues in the mobile app, SDK package… if some behaviour changes or new features require action or enable opportunities there.
2. **Communication**:
- If applicable, announce the release on the Open Food Facts slack, blog, forum, and social media channels (@stephanegigandet typically does this)
- Highlight significant new features or changes that might be of interest to the community.

3. **Issue Tracking**:
- Check and close any relevant issues that have been addressed in this release, and not closed automatically by PRs
- Review the issue tracker for any follow-up tasks or bug reports that may have arisen.

6. Troubleshooting
-------------------

In the event of any issues:

1. Immediately notify @stephanegigandet and other relevant team members.
2. @stephanegigandet will revert to the previous stable version or correct on `.org`.
3. Investigate the issue thoroughly, implement fixes, and redeploy after careful testing.

* * * * *

**Additional Notes:**

- This guide is a living document and may evolve as processes change.
- Feel free to suggest improvements or clarifications through the repository's issue tracker.
- Open communication is key to a successful release.
36 changes: 31 additions & 5 deletions cgi/display_org_table.pl
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@
$query_ref->{name} = qr/\Q$name\E/i if defined $name && $name ne '';
$query_ref->{valid_org} = $valid_org if defined $valid_org && $valid_org ne '';

$template_data_ref->{name} = $name;
$template_data_ref->{valid_org} = $valid_org;
$template_data_ref->{query_filters} = [] unless defined $template_data_ref->{query_filters};

@orgs = $orgs_collection->find($query_ref)->sort({created_t => -1})->all;

$template_data_ref = {orgs => \@orgs, has_orgs => scalar @orgs > 0};
$template_data_ref->{orgs} = \@orgs;
$template_data_ref->{has_orgs} = scalar @orgs > 0;

my $html;
process_template('web/pages/dashboard/display_orgs_table.tt.html', $template_data_ref, \$html) or $html = '';
Expand All @@ -73,22 +76,45 @@
info: "_TOTAL_ labels",
infoFiltered: " - out of _MAX_"
},
paging: false,
paging: true,
order: [[ 0, "asc" ]],
scrollX: true,
dom: 'Bfrtip',
buttons: [
{
extend: 'colvis',
text: 'Column visibility',
columns: ':gt(1)'
}
]
});
JS
;

$request_ref->{scripts} .= <<SCRIPTS
<script src="https://static.openfoodfacts.org/js/datatables.min.js"></script>
<script src="$static_subdomain/js/datatables.min.js"></script>
SCRIPTS
;

$request_ref->{header} .= <<HEADER
<link rel="stylesheet" href="https://static.openfoodfacts.org/js/datatables.min.css">
<link rel="stylesheet" href="$static_subdomain/js/datatables.min.css">
<style>
/* Custom styling for the column visibility buttons */
.dt-button-collection .dt-button.active::before {
content: "✔";
display: inline-block;
margin-right: 6px;
}
.dt-button-collection .dt-button::before {
content: " ";
display: inline-block;
margin-right: 6px;
}
</style>
HEADER
;

$request_ref->{title} = "Organization List";
$request_ref->{title} = lang("organization_list");
$request_ref->{content_ref} = \$html;
display_page($request_ref);
2 changes: 1 addition & 1 deletion conf/nginx/sites-available/obf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ server {

# Product Opener needs a root domain + a wildcard for all subdomains
# openbeautyfacts.com is also used for testing
server_name openbeautyfacts.org *.openbeautyfacts.org openbeautyfacts.com *.openbeautyfacts.com;
server_name openbeautyfacts.org *.openbeautyfacts.org;

root /srv/obf/html;

Expand Down
Loading

0 comments on commit 47a8130

Please sign in to comment.