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

issues with multi entity notification (wrong servicepath created) #208

Closed
chicco785 opened this issue Jun 13, 2019 · 1 comment
Closed
Assignees

Comments

@chicco785
Copy link
Contributor

Describe the bug
When a multiple notification is sent, the service path created is a comma separated version of all servicepaths of the entities.
It could be that the header sent by orion is exactly that. We should then split it and attach it one for entity.

entity_id entity_type fiware_servicepath powerstate time_index timeinstant
urn:ngsi-ld:Streetlight:sl-6 Streetlight /Diorama,/Diorama,/Diorama,/Diorama,/Diorama,/Diorama NULL 1560425955297 (2019-06-13T11:39:15.297Z) NULL
urn:ngsi-ld:Streetlight:sl-1 Streetlight /Diorama,/Diorama,/Diorama,/Diorama,/Diorama,/Diorama NULL 1560422941000 (2019-06-13T10:49:01.000Z) 1560422941000 (2019-06-13T10:49:01.000Z)
urn:ngsi-ld:Streetlight:sl-3 Streetlight /Diorama,/Diorama,/Diorama,/Diorama,/Diorama,/Diorama NULL 1560422941000 (2019-06-13T10:49:01.000Z) 1560422941000 (2019-06-13T10:49:01.000Z)
urn:ngsi-ld:Streetlight:sl-2 Streetlight /Diorama,/Diorama,/Diorama,/Diorama,/Diorama,/Diorama NULL 1560422941000 (2019-06-13T10:49:01.000Z) 1560422941000 (2019-06-13T10:49:01.000Z)
urn:ngsi-ld:Streetlight:sl-5 Streetlight /Diorama,/Diorama,/Diorama,/Diorama,/Diorama,/Diorama NULL 1560425955297 (2019-06-13T11:39:15.297Z) NULL
urn:ngsi-ld:Streetlight:sl-4 Streetlight /Diorama,/Diorama,/Diorama,/Diorama,/Diorama,/Diorama NULL 1560360355000 (2019-06-12T17:25:55.000Z) 1560360355000 (2019-06-12T17:25:55.000Z)

Environment (please complete the following information):

  • CrateDB 3.3.3
chicco785 added a commit that referenced this issue Sep 19, 2020
* added code to group entities by servicepath when multiple notifications arrive at once (#208)
* add tests and integration tests (so we have also test with orion triggering such case)
* fix notification tests to rely only on api calls (remove call to translator)
* changed error code to 400 when due to invalid request
* upgraded python to 3.8.5
* fix integration test to use new docker image with entrypoint (#362)
@chicco785 chicco785 mentioned this issue Sep 19, 2020
@c0c0n3 c0c0n3 closed this as completed in 23e4b85 Sep 22, 2020
@c0c0n3
Copy link
Member

c0c0n3 commented Sep 22, 2020

closed by #363

chicco785 added a commit that referenced this issue Sep 22, 2020
* added code to group entities by servicepath when multiple notifications arrive at once (#208)
* add tests and integration tests (so we have also test with orion triggering such case)
* fix notification tests to rely only on api calls (remove call to translator)
* changed error code to 400 when due to invalid request
* upgraded python to 3.8.5
* fix integration test to use new docker image with entrypoint (#362)
c0c0n3 added a commit that referenced this issue Sep 25, 2020
* fix #208

* added code to group entities by servicepath when multiple notifications arrive at once (#208)
* add tests and integration tests (so we have also test with orion triggering such case)
* fix notification tests to rely only on api calls (remove call to translator)
* changed error code to 400 when due to invalid request
* upgraded python to 3.8.5
* fix integration test to use new docker image with entrypoint (#362)

* minor fixes

* remove build (we can assume a build is available)
* remove volumes at the end of the test
* increase timesleep for one test
* improve code

* fix #347

* fix wrong delete logic not keeping into account correctly servicePath!=None
* add test for #347 bug
 * add test for selective service path delete

* add drop all also to single entity delete if table is empty

* fix tests to correctly delete entities with service paths

* dont drop table when deleting entities, use a separate endpoint for that.

* factor out common http code from delete module.

* make delete api work w/ any translator.

* keep timescale version in env var as done for other services.

* temp solution to automate delete tests for timescale, ditch when timescale support is complete.

* use droptable query param to drop entity table instead of separate endpoint.

Co-authored-by: c0c0n3 <andrea.falconi@gmail.com>
c0c0n3 added a commit that referenced this issue Sep 25, 2020
* fix #208

* added code to group entities by servicepath when multiple notifications arrive at once (#208)
* add tests and integration tests (so we have also test with orion triggering such case)
* fix notification tests to rely only on api calls (remove call to translator)
* changed error code to 400 when due to invalid request
* upgraded python to 3.8.5
* fix integration test to use new docker image with entrypoint (#362)

* minor fixes

* remove build (we can assume a build is available)
* remove volumes at the end of the test
* increase timesleep for one test
* improve code

* minor fixes

* fix timeing for notifications
* fix error message check

* add tests to produce a similar case as #353

* use only from
* use from in combination with last

* put building of docker image back in load test.

* fix backward compat test.

Co-authored-by: c0c0n3 <andrea.falconi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants