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

Deployment configuration updates fail when using IoTHubConfigurationManager.update_configuration #2

Open
debugaftercoffee opened this issue Apr 1, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@debugaftercoffee
Copy link

Context

  • OS and version used: MacOS 11.6.4
  • Python version: 3.7.5
  • pip version: 20.2.3
  • list of installed packages: azure-iot-hub 2.6.0

Description of the issue

It is not possible to update a device configuration using IoTHubConfigurationManager.update_configuration. All requests result in Operation returned an invalid status code 'Conflict'. In the code example below, I retrieve an existing configuration, change the target_condition and then attempt to update it.

Code sample exhibiting the issue

from msrest.exceptions import HttpOperationError
from azure.iot.hub import IoTHubConfigurationManager

config_service = IoTHubConfigurationManager(iothub_conn_str)

# retrieve an existing deployment
current_config = config_service.get_configuration("my_deployment")
print(current_config)

# change the target condition
current_config.target_condition = "tags.environment='test'"

try:
    config_service.update_configuration(current_config, current_config.etag)
except HttpOperationError as ex:
    print(ex)
@debugaftercoffee debugaftercoffee added the bug Something isn't working label Apr 1, 2022
@github-actions github-actions bot added the IoTSDK label Apr 1, 2022
@cartertinney cartertinney transferred this issue from Azure/azure-iot-sdk-python Jul 28, 2022
@KhazAkar
Copy link

Did you managed to solve this issue? I currently also experience it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants