feat!: stop using measures from assets and devices in exporter #369
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do ?
This modifies the digital twin exporter to use the recently introduced
ask:device-manager:${type}:get-last-measures
ask to retrieve the measures of a digital twin, instead of relying on the measures embedded in their documents.This is in preparation for the removal of the
measures
andlastMeasuredAt
fields in the documents of the assets and devices collections.Other changes
A new mechanism has been introduced in the abstract exporter, the export stream augmenters, that are used to modify the exporter search results right before they get written to the export stream.
Digital twin exporter tests were also updated to check the exact values of the export results, and to sort the export client-side (because sorting by measure in the request is no longer supported).
Breaking changes
This deprecates the use of the
measures
andlastMeasuredAt
fields in thequery
andsort
parameters of the export request.In the IoT Platform, the following places were identified that will be affected by this deprecation:
Part of KZLPRD-438.