New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for unassociated streams #231
Add support for unassociated streams #231
Conversation
6867dd9
to
a8426d1
Compare
Heya @idastambuk just trying to understand what is expected here. I've tried "Get property value history" on some dissociated data streams in our squad dev account, but I'm getting a panic in the backend code still. This seems to be the same as what's currently on v1.11.1 |
Hey @fridgepoet, good catch, it only happens with property value history queries and when there is no data. I added a condition and updated the tests. |
What this PR does / why we need it:
When querying by propertyAlias was first implemented, it had support for unassociated streams ("disassociated" in AWS).
Unassociated streams are data streams that are not associated with a propertyId on an asset, but contain historical data about a property all the same. They can be queried by a propertyAlias.
You can see them here in the console if you apply the Disassociated Streams filter:
The 500 error from the bug report happened because of a null pointer reference since, when we query DescribeAssetPropertyWithContext for unassociated propertyAliases, it doesn't return an assetId or propertyId. The bug was introduced when we implemented fetching assets and property values only by propertyAlias. However, this only worked for associated streams, where DescribeAssetPropertyWithContext will actually return propertyId.
On the frontend, I fixed the panel header to show propertyAlias in the panel header when collapsed
I also moved some functions in the util package from /api, since I needed them in other packages
Which issue(s) this PR fixes:
How to test:
Add the following propertyAliased into the property alias field and test different "Get value ..." query types. For data, select "last year" in order to be able to see data, then you can zoom in.
We have a few aliased streams in our dev account:
turbine/1/torque -> disassociated - doesn't have an assetId/propertyId tied to it, so this can be tested for a fix
/turbine/1/wind_direction -> associated - for comparison
Fixes #
Special notes for your reviewer: