telefonicaid / telefonicaid/iotagent-node-lib
Device is created when sending measures to non existing device
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 62
- Forks
- 90
- Avg merge
- 2h 35m
- Merged PRs (30d)
- 1
Description
We've discovered a bug in the library.
If we try to send a measure to a non existing device, we get a 404 - DEVICE_NOT_FOUND error but at the same time a device without any attribute is created in IoTA's and Orion CB's database.
When I say a device without any attribute I refer to the following:
{
"device_id": "test",
"service": "MyService",
"service_path": "/MyServicePath",
"entity_name": "MyEntity:test",
"entity_type": "MyEntity",
"attributes": [],
"lazy": [],
"commands": [],
"static_attributes": []
}
This is a very important bug, because it's really simple to create as many devices as something want and that could eat our database space.
By the way, I don't have appendMode enabled.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported measure request for a non-existing device with appendMode disabled, then trace the library's device and measure handling path. Confirm the failing case returns 404 DEVICE_NOT_FOUND without creating an empty device in either IoTA's or Orion CB's database.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100