Skip to content

[iot] identity_assignment is called on another thread #25479

@jiasli

Description

@jiasli

I discovered a problem with iot module:

create = client.iot_hub_resource.begin_create_or_update(resource_group_name, hub_name, hub_description, polling=True)
if identity_role and identity_scopes:
create.add_done_callback(identity_assignment)

polling=True causes SDK to start a separate thread to do the LRO polling. Even if identity_assignment fails, it fails in that separate thread, so the main thread running the CLI command still succeeds, which is not expected.

Originally posted by @jiasli in #25452 (comment)

Metadata

Metadata

Assignees

Labels

IotHubaz iotService AttentionThis issue is responsible by Azure service team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions