Conversation
After merging all these PRs and upgrade this PR branch with master, tests pass to ok. Thus, as far as I understand the NGSIv1 removal work in IOTA-JSON code has ended. (Let's have this PR opened while the overall NGSIv1 removal work is completed) |
|
Not sure if the NGSI-v1 removal work has ended in this repo... we have recently discovered |
|
The
Obviously such a situation is only temporary. |
|
I have created (yet another) branch which removes the https://github.com/jason-fox/iotagent-node-lib/tree/feature/isCurrent |
|
Usage of isCurrentNgsi(): https://github.com/telefonicaid/iotagent-json/search?q=isCurrentNgsi |
As third alternative, we can use this PR branch (test-ngsiv1-removal) to remove NGSI-v1 IOTA code, re-scoping it's purpose (from just testing to actual code modification). Thus, it would be merged at the end (rolling back the modifications in packages.json before, as last step). |
| if (iotAgentLib.configModule.isCurrentNgsi()) { | ||
| return constants.TIMESTAMP_TYPE_NGSI2; | ||
| } | ||
| return constants.TIMESTAMP_TYPE; |
There was a problem hiding this comment.
If TIMESTAMP_TYPE constant is not used in any place, we could remove it from the source file.
| @@ -82,17 +82,7 @@ function manageConfiguration(apiKey, deviceId, device, objMessage, sendFunction, | |||
| } | |||
|
|
|||
| function extractAttributes(results, callback) { | |||
There was a problem hiding this comment.
After simplifying this function, it has ended basically in a pass-through to the callback function.
Maybe we can simplify even more, removeing extractAttributes() function?
| @@ -92,10 +92,7 @@ function guessType(attribute, device) { | |||
| } | |||
There was a problem hiding this comment.
CHANGES_NEXT_RELEASE entry is needed. Something like this:
- Remove: NGSI-v1 specific behaviours
fgalan
left a comment
There was a problem hiding this comment.
LGTM to code changes, although not ready to be merged yet (first packages.json should be changed back).
I understand same or similar changes has to be mirrored in PR telefonicaid/iotagent-ul#467
Change done in 286588d |
This PR is not for being merged, it is just to expose publicly the branch. PR will be closed (and the branch deleted) after CI e2e testing.At the end code modification and test were added.