ECC-2220 Fix setting string keys in BUFR messages#154
ECC-2220 Fix setting string keys in BUFR messages#154
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #154 +/- ##
========================================
Coverage 30.01% 30.01%
========================================
Files 34 34
Lines 6180 6180
Branches 743 743
========================================
Hits 1855 1855
Misses 4296 4296
Partials 29 29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @oiffrig, you've just uncovered a bug in my botched attempt at a workaround for an old bug in the eccodes library that had already been fixed quite some time ago (see ECC-1623). My workaround is botched in a sense that it only works correctly for compressed messages (compressedData=1); whereas, as you found out, it doesn't do the right thing when the message is uncompressed (as is the case in your example). Unfortunately, with your change in place, this will now only work correctly for uncompressed messages, and will fail with the compressed ones. :) In any case, given that the root cause had been resolved since eccodes 2.31.0, which is quite old version by now, I think it's safe to drop the problematic workaround entirely. The generic code that follows after my workaround should now work seamlessly for both compressed and uncompressed messages. If you are OK with that, I suggest we close this PR, and I will submit a new one with the problematic code removed, and maybe will add some tests as well so that we can catch any issues with this in the future. How does it sound? |
|
Sounds good to me. Thanks for looking into it! |
Description
Setting a single-valued string key in a BUFR message results in the value being truncated, e.g.:
Fails on the second
assert. This fixes the issue to my understanding, but please check it is appropriate as I am not totally familiar with the high-level BUFR interface.Contributor Declaration
By opening this pull request, I affirm the following: