aws-greengrass / aws-greengrass-shadow-manager

A GreengrassV2 Component that provides offline device shadow documents and optional synchronization to the IoT device shadow service.
Apache License 2.0
9 stars 6 forks source link

Add support for reserved named shadows #206

Open tamarindsoup opened 5 months ago

tamarindsoup commented 5 months ago

Feature Description Add support for reserved named shadows, namely, shadows that start with a $.

Use Case I'm thinking of creating a custom Greengrass component that reports the version of a natively installed software to the Software Package Catalog. I'd like the component to access the $package shadow through Shadow manager.

Proposed Solution Change SHADOW_PATTERN to allow shadow names prefixed with a $. (e.g. \\$?[a-zA-Z0-9:_-]+) https://github.com/aws-greengrass/aws-greengrass-shadow-manager/blob/b24dda476c3a8f64c2b34a784a89e27825e4c6aa/src/main/java/com/aws/greengrass/shadowmanager/model/Constants.java#L52

saranyailla commented 5 months ago

Hi, thank you for bringing this to our attention.

Currently, Greengrass shadow manager component lets you manage AWS IoT Device shadows that are either named or classic only. For these configured shadows, shadow manager subscribes to their reserved MQTT topics to perform shadow operations.

To support reserved named shadows such as $package, we'll have to investigate all that it entails and evaluate the usecases. Adding it to our backlog for further evaluation.

tamarindsoup commented 5 months ago

Hi @saranyailla, thank you for your response.

I only changed the regex and it seemed to work fine, so I'd hoped it'd be a quick and easy fix, but I understand your need for a more thorough evaluation. I guess I'll keep using my fork for the time being. :smile:

Do you have a rough estimate of when this issue would be resolved?

saranyailla commented 5 months ago

We don't have an estimated timeline for this one yet. We'll use this thread to post any updates if any.