Azure / Azure/azure-iot-cli-extension
[bug] Target condition containing "IN" works in Portal but fails upon create
- Dominant language
- Python
- Stars
- 88
- Forks
- 78
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 9
Description
Using Azure Portal, if I create a deployment that has a target condition like `tags.environment IN ['foo','bar'] OR deviceId IN ['a','b','c']`, that condition finds all expected devices when I “Find Devices” on that blade, but when I attempt to “create” that deployment, I get an error: `InvalidConfigurationTargetCondition`.
I did see the question from @digimaun on a similar issue (https://github.com/Azure/azure-iot-cli-extension/issues/347), and the answer is yes, I'm certain that the target condition works ini the portal when setting things up, and that API request returns a HTTP 200.
I can't seem to find an authoritative target condition reference, but I do note that `IN` is not listed at https://docs.microsoft.com/en-us/azure/iot-edge/module-deployment-monitoring?view=iotedge-2020-11#target-condition
So I think that either something is wrong and `IN` should be working as expected, and this just isn't well documented, or `IN` is _not_ a supported target condition, in which case it should not be working in the Portal when setting up a Deployment.
Contributor guide
Research direction
Start by comparing the Azure Portal's successful “Find Devices” target-condition request with the failing deployment create request, then review the target-condition reference linked in the report and issue #347. The issue names no repository files or tests; done means establishing whether IN is supported and identifying the corresponding CLI behavior or documentation change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- cli, cloud, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100