-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[boschshc] Fix NullPointerException
during deserialization, make long polling more robust
#17190
Conversation
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.
Thanks LGTM. You want to wait for @mike-bike test confirmation?
Thanks @lsiepel, actually this is a good idea. Let's add the |
Seems like a solid set of tests, on top of the already confirmed basics tests. If you ask me this is ready to merge. |
Next round:
Overall: All tests passed |
* Fix NPE while deserializing service data JSON objects * Catch exceptions while handling long poll results * Correct @type name for user-defined states * Add unit tests and enhance existing unit tests Signed-off-by: David Pace <dev@davidpace.de>
8265c23
to
1c11000
Compare
Hi @lsiepel and @jlaur, I just rebased my commit and one build fails with an error that seems to be unrelated to my code. Maven fails while loading some property file:
I know this can be solved locally by deleting the offending |
Ah, looks like a simple |
@mike-bike are your systems stable with the latest JAR? Any @GerdZanker or @jlaur, is it possible for one of you to review the code in the next days? |
Hi, latest JAR seems to be running stable on my test PI2 with 4.3.x and my production PI4 with 4.2 release since Aug-05.
However, I have not tried to force any |
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.
Thanks for the fix! I have added a few small questions (all optional, nothing that blocks this PR).
...n/java/org/openhab/binding/boschshc/internal/serialization/BoschServiceDataDeserializer.java
Outdated
Show resolved
Hide resolved
...n/java/org/openhab/binding/boschshc/internal/serialization/BoschServiceDataDeserializer.java
Outdated
Show resolved
Hide resolved
...hshc/src/test/java/org/openhab/binding/boschshc/internal/devices/bridge/LongPollingTest.java
Outdated
Show resolved
Hide resolved
...va/org/openhab/binding/boschshc/internal/serialization/BoschServiceDataDeserializerTest.java
Outdated
Show resolved
Hide resolved
...boschshc/src/main/java/org/openhab/binding/boschshc/internal/devices/bridge/LongPolling.java
Show resolved
Hide resolved
* Change switch statement to switch expression * Rewrite some test assertions using assertThat() * Use assertNotNull() is certain cases to get rid of compiler warnings Signed-off-by: David Pace <dev@davidpace.de>
Thank you very much for your reviews, @lsiepel and @jlaur 👍 Also big thanks to @mike-bike for the great testing support ❤️ |
@david-pace, many thanks for your effort to develop the code and to the others for reviewing. I am glad providing a little help by testing. |
I recommend to subscribe to the openHAB releases here, then you will always be notified if a new milestone build or release is published. There also was a openHAB community thread containing some release planning information, but I can't find it anymore. @jlaur, could you please share the link again? |
Maybe this? https://community.openhab.org/t/openhab-4-2-milestone-builds/154315/5 It was specific for 4.2 though. There will be a new thread for 4.3 milestone builds. It's usually quite predictable, so expect the release build around Christmas. 🙂 |
Thanks, that’s fine guys. I will monitor thing availability on every update and upgrade to development JAR provided by Davied.
Regards,
Michael
… Am 16.08.2024 um 17:17 schrieb Jacob Laursen ***@***.***>:
There also was a openHAB community thread containing some release planning information, but I can't find it anymore. @jlaur <https://github.com/jlaur>, could you please share the link again?
Maybe this?
https://community.openhab.org/t/openhab-4-2-milestone-builds/154315/5
It was specific for 4.2 though. There will be a new thread for 4.3 milestone builds. It's usually quite predictable, so expect the release build around Christmas. 🙂
—
Reply to this email directly, view it on GitHub <#17190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AHVH7GALQCN3QI3ZOC6CFJDZRYJXXAVCNFSM6AAAAABLZZX5XGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGY4TSMBSGA>.
You are receiving this because you were mentioned.
|
If you (@mike-bike, @david-pace) consider this bug critical (for sure it seems critical when it occurs, the question is how often it occurs and if it does for all users?) - and @david-pace would assess the risk of causing regressions low - we could consider cherry-picking it into 4.2.x, WDYT? |
This seems like a good candidate to be cherry-picked to Unfortunately I can only speculate how often it occurs. The only way we could reproduce the error manually was a corner case in which @mike-bike deleted devices in the Bosch App. But it seems to occur sporadically in other cases. I found the NPE once in the logs of the past 3 weeks, but without indication why it was triggered. I suspect that it was also reported in the community here, but I cannot be 100% sure because we did not find any stack traces in the logs. @mike-bike, are you aware of any other ways to prokove the Regarding the regression probability - I would consider it to be low. |
NullPointerException
during deserialization, making long polling more robust
Unfortunately there are conflicts, so it cannot be cherry-picked. We can still backport to 4.2.x, but you would then have to create a new PR targeting branch |
ok, I will try to provide a PR as soon as I have some time. Is there some guide/tutorial how to push PRs towards maintenance branches? |
I don't think so. You just need to branch out from 4.2.x and target that branch also when creating the PR. |
NullPointerException
during deserialization, making long polling more robustNullPointerException
during deserialization, make long polling more robust
Sorry, I do not have identified any reproducible method to enforce the |
I appreciate your effort to get the fix into the 4.2.x version. That would be great, but I am happy to manually load the binding after an upgrade or restart until 4.3 arrives. |
Yes, and it will also be in next 4.3 milestone. |
(openhab#17190) * Fix NPE while deserializing service data JSON objects * Catch exceptions while handling long poll results * Correct @type name for user-defined states * Add unit tests and enhance existing unit tests Signed-off-by: David Pace <dev@davidpace.de>
It was easy to solve the merge conflict and I created a PR for |
(openhab#17190) * Fix NPE while deserializing service data JSON objects * Catch exceptions while handling long poll results * Correct @type name for user-defined states * Add unit tests and enhance existing unit tests Signed-off-by: David Pace <dev@davidpace.de>
…ust (openhab#17190) * Fix NPE while deserializing service data JSON objects * Catch exceptions while handling long poll results * Correct @type name for user-defined states * Add unit tests and enhance existing unit tests Signed-off-by: David Pace <dev@davidpace.de>
…ust (openhab#17190) * Fix NPE while deserializing service data JSON objects * Catch exceptions while handling long poll results * Correct @type name for user-defined states * Add unit tests and enhance existing unit tests Signed-off-by: David Pace <dev@davidpace.de> Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
…ust (openhab#17190) * Fix NPE while deserializing service data JSON objects * Catch exceptions while handling long poll results * Correct @type name for user-defined states * Add unit tests and enhance existing unit tests Signed-off-by: David Pace <dev@davidpace.de>
…ust (openhab#17190) * Fix NPE while deserializing service data JSON objects * Catch exceptions while handling long poll results * Correct @type name for user-defined states * Add unit tests and enhance existing unit tests Signed-off-by: David Pace <dev@davidpace.de>
…ust (openhab#17190) * Fix NPE while deserializing service data JSON objects * Catch exceptions while handling long poll results * Correct @type name for user-defined states * Add unit tests and enhance existing unit tests Signed-off-by: David Pace <dev@davidpace.de> Signed-off-by: Christian Koch <christian@koch-bensheim.de>
@type
name for user-defined statescloses #17176
Test JAR can be downloaded here.