Skip to content
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

REST Data Messages metric has stale value type #2744

Closed
lorthirk opened this issue Oct 17, 2019 · 0 comments · Fixed by #2746
Closed

REST Data Messages metric has stale value type #2744

lorthirk opened this issue Oct 17, 2019 · 0 comments · Fixed by #2746
Assignees
Labels
Bug This is a bug or an unexpected behaviour. Fix it! REST API We hope to REST everyday

Comments

@lorthirk
Copy link

lorthirk commented Oct 17, 2019

Describe the bug
The messages returned by the Data Messages REST does not seem to update the metric value type if this has changed.

To Reproduce
Steps to reproduce the behavior:

  1. Send a data message
  2. Use REST API to retrieve the message back
  3. Observe the difference in metric value

Actual behaviour
The value type (string) of themetric_1 metric returned by the Data Messages REST does not match the type shown by Kapua Console (long) or the one returned by the Data Metric REST (long). Long is the type currently published by the device.

Expected behaviour
The value type of the metric_1 metric in the most recent messages returned by the Data Messages REST should be long.

Version of Kapua
1.1.0

Type of deployment
[ ] Local Vagrant deployment
[x] Docker
[ ] Openshift (in its variants)
[ ] Others

Main component affected
[ ] Console (in case of console please report info on which browser you encountered the problem)
[x] REST API
[ ] Message Broker
[ ] - Others

Additional context

REST Data Message

{
  "type": "jsonDatastoreMessage",
  "channel": {
    "semanticParts": ["channel-part-1"]
  },
  "clientId": "45F4DD37EA82",
  "deviceId": "R9Yezfu9i6g",
  "payload": {
    "body": "U2FtcGxlIGJvZHkgc3RyaW5n",
    "metrics": [
      {
        "valueType": "string",
        "value": "1104",
        "name": "metric_1"
      }
    ]
  },
  "receivedOn": "2019-06-14T10:13:07.526Z",
  "scopeId": "Wm9r0bh3bv8",
  "datastoreId": "15d256e3-618f-4260-bd49-1e80a7405ccd",
  "timestamp": "2019-06-14T10:13:07.537Z"
}
@lorthirk lorthirk self-assigned this Oct 17, 2019
@lorthirk lorthirk added the REST API We hope to REST everyday label Oct 17, 2019
@Coduz Coduz added the Bug This is a bug or an unexpected behaviour. Fix it! label Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug or an unexpected behaviour. Fix it! REST API We hope to REST everyday
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants