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

fix: remove warning in Display.pm related to Environmental Scoring #11172

Merged
merged 9 commits into from
Jan 7, 2025

Conversation

benbenben2
Copy link
Collaborator

What

Fixed the following
Use of uninitialized value in uc at /opt/product-opener/lib/ProductOpener/Display.pm line 8006.
Argument "" isn't numeric in sprintf at /opt/product-opener/lib/ProductOpener/Display.pm line 467.

@benbenben2 benbenben2 self-assigned this Dec 27, 2024
@benbenben2 benbenben2 requested a review from a team as a code owner December 27, 2024 15:55
@hangy
Copy link
Member

hangy commented Dec 30, 2024

/update_test_results

@hangy
Copy link
Member

hangy commented Dec 30, 2024

/update_tests_results

1 similar comment
@alexgarel
Copy link
Member

/update_tests_results

@teolemon teolemon changed the title fix: remove warning fix: remove warning in Display.pm Jan 6, 2025
@teolemon teolemon changed the title fix: remove warning in Display.pm fix: remove warning in Display.pm related to Environmental Scoring Jan 6, 2025
@alexgarel
Copy link
Member

Tests are failing when I try to update tests results.

See https://github.com/openfoodfacts/openfoodfacts-server/actions/runs/12630410724/job/35190160668

@alexgarel
Copy link
Member

alexgarel commented Jan 7, 2025

@benbenben2 the page_crawler and web_html test produces a:

+<h1>Software error:</h1>
+<pre>Undefined subroutine &amp;ProductOpener::Display::display_ecoscore_calculation_details called at /opt/product-opener/lib/ProductOpener/Display.pm line 8017.
+</pre>

@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2025

Codecov Report

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

Project coverage is 49.20%. Comparing base (16acef0) to head (fc51807).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
lib/ProductOpener/Display.pm 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11172      +/-   ##
==========================================
- Coverage   49.20%   49.20%   -0.01%     
==========================================
  Files          78       78              
  Lines       22377    22380       +3     
  Branches     5366     5368       +2     
==========================================
  Hits        11011    11011              
- Misses      10008    10011       +3     
  Partials     1358     1358              

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

@alexgarel
Copy link
Member

/update_tests_results

@alexgarel alexgarel enabled auto-merge (squash) January 7, 2025 10:16
Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

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

Thanks @benbenben2, I fixed the problem, due to new name for environmental score.

@alexgarel
Copy link
Member

/lint

Copy link

sonarqubecloud bot commented Jan 7, 2025

@alexgarel alexgarel merged commit 176fe9e into main Jan 7, 2025
14 checks passed
@alexgarel alexgarel deleted the fix-remove-warning branch January 7, 2025 12:06
@benbenben2
Copy link
Collaborator Author

Thanks @benbenben2, I fixed the problem, due to new name for environmental score.

Thanks @alexgarel

alexgarel added a commit that referenced this pull request Jan 10, 2025
🤖 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants