Alarm queryStatus source filter behaves differently for remote tag provider

Trying to hunt down some oddities in querying alarms from a remote tag provider. I've narrowed it down to this sample script:

foo = system.alarm.queryStatus(source=["*:/tag:Edge Nodes/demo/*"])
print(u'Got {} foo statuses'.format(len(foo)))
bar = system.alarm.queryStatus(source=["prov:*:/tag:Edge Nodes/demo/*"])
print(u'Got {} bar statuses'.format(len(bar)))

If I run that on the gateway with the tag provider locally, I get output like this:

Got 68 foo statuses
Got 68 bar statuses

If I run that on the gateway accessing the tags remotely, I get output like this:

Got 68 foo statuses
Got 0 bar statuses

The full sources of the tags look like this, for example:

prov:MQTT Engine:/tag:Edge Nodes/demo/352656102738872/Battery:/alm:BATTERY_LOW

Does the alarm query filter engine for remote tag providers have a bug here? It seems to not notice/expand * if it's not at the beginning or end of a filter.

it seems I have the same sort of issue with the SDK when I use AlarmManager to subscribe for alarms notification on remote alarms (in 8.1.38).
Something probably change, because it worked for me somewhere before 8.1.38.

Oh, FWIW I am seeing my bad behavior in 8.1.36.

If @Dcortez can look at this issue

Thanks for your patience, I got caught up on a few issues on my end. Let me revisit this. I'll try to pinpoint what version this broke on and see what changes were made in that version.

I also have a support ticket open on this issue, and the agent helping me discovered that tweaking the filter string to prov*:*:/tag:Edge Nodes/demo/* (notice the extra wildcard after prov but before colon) does get the results. (I also let him know that you were investigating, @dcortez.)


We're going to create a bug ticket for this issue. In the meantime, using the additional * will be a workaround for this issue.