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

[Bug Report] Version 2.x of iot-device-client, requires version of reported properties to be sent, while 1.x not require that #1776

Closed
dzakub opened this issue Feb 23, 2024 · 2 comments
Labels
bug fix checked in Fix checked into main or preview, but not yet released.

Comments

@dzakub
Copy link
Contributor

dzakub commented Feb 23, 2024

Context

  • OS and version used: any
  • Java runtime used: openjdk version "17.0.10" 2024-01-16
  • SDK version used: 2.3.0

Description of the issue

This issue is about compatibility between version 1.x and 2.x.

Behavior in version 1.x:
Sending message to $iothub/twin/PATCH/properties/reported/# mqtt topic (sendReportedProperties method) without version resulted in no error and client was getting a 200 (OK) response on topic $iothub/twin/res/200/
Behavior in version 2.x:
Sending message to $iothub/twin/PATCH/properties/reported/# mqtt topic (sendReportedProperties method) without version results in error and client was getting a 412 (PRECONDITION_FAILED) response on topic $iothub/twin/res/412/

So upgrade to version 2.x causes unnecessary changes for users of client library. Forcing them to manage reported properties version, which can be problematic due to asynchronous and distributed nature of system.

This is a request for reverting behavior to the one present in 1.x version of client.

@dzakub dzakub added the bug label Feb 23, 2024
@dzakub dzakub changed the title [Bug Report] Verision 2.x of iot-device-client, requires version of reported properties to, be send while 1.x [Bug Report] Version 2.x of iot-device-client, requires version of reported properties to be sent, while 1.x not Feb 23, 2024
@dzakub dzakub changed the title [Bug Report] Version 2.x of iot-device-client, requires version of reported properties to be sent, while 1.x not [Bug Report] Version 2.x of iot-device-client, requires version of reported properties to be sent, while 1.x not requires that Feb 23, 2024
@dzakub dzakub changed the title [Bug Report] Version 2.x of iot-device-client, requires version of reported properties to be sent, while 1.x not requires that [Bug Report] Version 2.x of iot-device-client, requires version of reported properties to be sent, while 1.x not require that Feb 23, 2024
dzakub added a commit to dzakub/azure-iot-sdk-java that referenced this issue Feb 23, 2024
…eported properties to be sent, while 1.x not require that Azure#1776
@dzakub
Copy link
Contributor Author

dzakub commented Feb 23, 2024

PR with a fix:
#1777

timtay-microsoft added a commit that referenced this issue Mar 11, 2024
…ying the version (#1779)

* Fixing issue: Version 2.x of iot-device-client, requires version of reported properties to be sent, while 1.x not require that #1776

* Add integration test for updating reported properties without version

Remove some duplicated logic around building a topic string for subscribing to desired properties from MQTT layer

---------

Co-authored-by: dzakub <jakubowski.bartosz@gmail.com>
@timtay-microsoft timtay-microsoft added the fix checked in Fix checked into main or preview, but not yet released. label Mar 11, 2024
@timtay-microsoft
Copy link
Member

Fixed as of 2.5.0, so I'll close this thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix checked in Fix checked into main or preview, but not yet released.
Projects
None yet
Development

No branches or pull requests

2 participants