-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
fix: warnings in producers tests #11190
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #11190 +/- ##
==========================================
- Coverage 49.25% 49.22% -0.04%
==========================================
Files 78 78
Lines 22371 22405 +34
Branches 5365 5374 +9
==========================================
+ Hits 11019 11028 +9
- Misses 9996 10020 +24
- Partials 1356 1357 +1 ☔ View full report in Codecov by Sentry. |
### What ``` Error 3 https://github.com/openfoodfacts/openfoodfacts-server/actions/runs/7462755789/job/20306470532?pr=9288#step:4:560 Name "FFI::Platypus::keep" used only once: possible typo at /usr/lib/x86_64-linux-gnu/perl-base/XSLoader.pm line 111. error: ecoscore origin does not exist in taxonomy {origin => "IW",origin_id => "en:IW"} error: ecoscore origin does not exist in taxonomy {origin => "SW",origin_id => "en:SW"} error: ecoscore origin does not exist in taxonomy {origin => "US-AL",origin_id => "en:US-AL"} error: ecoscore origin does not exist in taxonomy {origin => "US-GA",origin_id => "en:US-GA"} error: ecoscore origin does not exist in taxonomy {origin => "US-LA",origin_id => "en:US-LA"} error: ecoscore origin does not exist in taxonomy {origin => "US-MS",origin_id => "en:US-MS"} error: ecoscore origin does not exist in taxonomy {origin => "US-SC",origin_id => "en:US-SC"} error: ecoscore origin does not exist in taxonomy {origin => "US-TX",origin_id => "en:US-TX"} error: ecoscore origin does not exist in taxonomy {origin => "WO",origin_id => "en:WO"} error: ecoscore origin does not exist in taxonomy {origin => "Eaux internationales",origin_id => "fr:Eaux internationales"} error: ecoscore origin does not exist in taxonomy {origin => "S\x{e3}o Tom\x{e9} e Pr\x{ed}ncipe",origin_id => "fr:S\x{e3}o Tom\x{e9} e Pr\x{ed}ncipe"} error: ecoscore origin does not exist in taxonomy {origin => "Territoires fran\x{e7}ais du Sud",origin_id => "fr:Territoires fran\x{e7}ais du Sud"} Use of uninitialized value $_[0] in substitution (s///) at tests/unit/attributes.t line 221. ``` Added in the taxonomies ### Related issue(s) and discussion - Fixes #9655 (together with #11189 and #11190)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the newly failing tests in api_v3_product_read.t
may need to be reviewed 🤔
@hangy I think the changes in results of api_v3_product_read.t are good changes, consistent with the normalization we do (remove leading 0s, so EAN14 with a leading 0 becomes EAN13). |
/update_tests_results |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @benbenben2 !
🤖 I have created a release *beep* *boop* --- ## [2.54.0](v2.53.0...v2.54.0) (2025-01-10) ### Features * gzip js, css, SVG icons assets ([#11208](#11208)) ([c0a5275](c0a5275)) ### Bug Fixes * "NutriScore V2" SVGs with blank space ([#11218](#11218)) ([38d79e8](38d79e8)) * avoid crash in display_orgs_table when org.created_t is not set, fix permission ([#11203](#11203)) ([765d796](765d796)) * greenscore attribute with old ecoscore_data ([#11212](#11212)) ([4f596ad](4f596ad)) * Invalid OFF dark icon ([#11206](#11206)) ([f63daa8](f63daa8)) * Nutripatrol url trailing slash removal regex ([#11204](#11204)) ([f42f8dd](f42f8dd)) * Nutriscore for fresh herbs ([#11112](#11112)) ([cdd7cf5](cdd7cf5)) * Remove irrelevant things in Config_obf.pm ([c5d448d](c5d448d)) * Remove irrelevant things in the Open Beauty Facts config ([#11195](#11195)) ([c5d448d](c5d448d)) * remove warning in Display.pm related to Environmental Scoring ([#11172](#11172)) ([176fe9e](176fe9e)) * Removing irrelevant fields in the Open Products Facts config ([4583ed2](4583ed2)) * Removing irrelevant fields in the Open Products Facts config ([#11202](#11202)) ([4583ed2](4583ed2)) * typo in ecoscore redirect ([#11213](#11213)) ([85fd575](85fd575)) * use ecoscore data when greenscore not available ([#11197](#11197)) ([5ae1273](5ae1273)) * warnings in producers tests ([#11190](#11190)) ([0588976](0588976)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Alex Garel <[email protected]>
What
I commented this warning. It can be used for future devs.
However, there were additional warnings in the code because is() expected a single comparison and not an array.
After fixing this, it showed that some tests were not passing. I fixed them all (see reworks in Products.pm) but could be good if someone with GS1 knowledge could review it.
Ping @hangy because I noticed that you worked on this part of the code and GS1::SyntaxEngine::FFI::GS1Encoder
Related issue(s) and discussion