Azure / Azure/azure-iot-sdk-csharp
After Creating Child Device With Twin, Parent Device wont show child device
- Dominant language
- C#
- Stars
- 477
- Forks
- 492
- Avg merge
- 9h 55m
- Merged PRs (30d)
- 2
Description
- **OS, version, SKU and CPU architecture used:** Windows 11 x64
- **Application's .NET Target Framework :** NET 6
- **Device:** Amd64 Laptop
- **SDK version used:** 1.39
After creating an Azure IoT Child device specifying it's parent scope and using the following method:
`registryManager.AddDeviceWithTwinAsync(device, twin)`
Notice the twin only contains desired properties and tags values.
In azure IoT Hub the device correctly shows the relation with its parent (you can see "This device has a parent assigned")
Also the parent scope points to the parent device.
**But when selecting the parent it's not showing any child device.**
Using the following method (no twin specification) does not generate the problem:
`registryManager.AddDeviceAsync(device)`
Contributor guide
Research direction
Start by reproducing the issue with Azure IoT SDK 1.39 on .NET 6, comparing registryManager.AddDeviceWithTwinAsync(device, twin) with registryManager.AddDeviceAsync(device). Inspect how the two methods create the parent-child relationship and twin, then verify that the parent shows the child while the child retains its desired properties and tags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100