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

[#1858] Don't treat removeCmdHandlingAdapterInstance 404 as error #1926

Merged

Conversation

calohmn
Copy link
Contributor

@calohmn calohmn commented Apr 28, 2020

This is for #1858 and replaces #1922:
"Command handling adapter instance" entries may expire.
Therefore, getting a NOT FOUND result when invoking removeCommandHandlingAdapterInstance() shouldn't be treated as an error.

For that, the DeviceConnectionClient.removeCommandHandlingAdapterInstance method has been changed to return a Future<Boolean> now (instead of Future<Void>), with a false value returned if a NOT FOUND was received from the server.

When a command consumer is closed, the removeCommandHandlingAdapterInstance method is still called every time - just to be on the safe side, even though the entry might have been already deleted because it has expired.

…as error.

Command handling adapter instance entries may expire.
Therefore, getting a NOT FOUND result when invoking
removeCommandHandlingAdapterInstance() shouldn't be treated
as an error.

Signed-off-by: Carsten Lohmann <[email protected]>
@calohmn calohmn added C&C Command and Control Device Connection issues regarding the storage of device connection information labels Apr 28, 2020
@calohmn calohmn added this to the 1.3.0 milestone Apr 28, 2020
@calohmn calohmn requested a review from sophokles73 as a code owner April 28, 2020 06:03
Copy link
Contributor

@sophokles73 sophokles73 left a comment

Choose a reason for hiding this comment

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

LGTM

@calohmn calohmn merged commit 57b0b83 into eclipse-hono:master Apr 28, 2020
@calohmn calohmn deleted the PR/no_404_error_for_rmvcmdhandlinginst branch April 28, 2020 07:54
calohmn added a commit to bosch-io/hono that referenced this pull request Oct 20, 2020
This reverts eclipse-hono#1926 and makes the method behave according to
the API spec again, returning a failed Future if the entry
wasn't removed.

Signed-off-by: Carsten Lohmann <[email protected]>
calohmn added a commit to bosch-io/hono that referenced this pull request Oct 20, 2020
This reverts eclipse-hono#1926 and makes the method behave according to
the API spec again, returning a failed Future if the entry
wasn't removed.

Signed-off-by: Carsten Lohmann <[email protected]>
calohmn added a commit that referenced this pull request Oct 20, 2020
This reverts #1926 and makes the method behave according to
the API spec again, returning a failed Future if the entry
wasn't removed.

Signed-off-by: Carsten Lohmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C&C Command and Control Device Connection issues regarding the storage of device connection information
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants