-
Notifications
You must be signed in to change notification settings - Fork 91
Task/default attribute value null instead blank #946
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
Task/default attribute value null instead blank #946
Conversation
No faults where reported about iotas: Failing scenarios: 6 features passed, 3 failed, 62 skipped |
…te_value_null_instead_blank
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
But let's wait a bit before merging, in order not adding more entropy to master until we have reports from CI e2e testing tonight after the merging of the big bunch of code in PR #849
From travis:
|
It seems that some test related with NGSI-LD are failing:
@jason-fox could you have a look an provide feedback on how to fix them, please? |
From the latest ETSI specification:
The tests in question are failing with 500 BadRequestData because the input payload to the context broker is invalid. |
When sending an undefined value, you need to insert a JSON object which is interpreted as const NGSI_LD_NULL = { '@type': 'Intangible', '@value': null }; Where |
test/unit/ngsi-ld/examples/contextRequests/createMinimumProvisionedDevice.json
Show resolved
Hide resolved
…ionedDevice.json Co-authored-by: Fermín Galán Márquez <[email protected]>
…te_value_null_instead_blank
At 54ec0b9, using
At 2db114b, using
So it seems that using the "NGSI-LD null way" test restuls are worse than with just null... Definitely, we need help from NGSI-LD experts to fix this. @jason-fox could you provide feedback on how to fix this (or even better: a PR with the fix itself using revert-945-revert-942-task/default_attribute_value_null_instead_blank as base branch), please? |
…ault_attribute_value_null_instead_blank Fixing requests
The unexpected side-effect from this change is a change in default truthy-ness of undefined alert(Boolean(true)); // returns true
alert(Boolean(false)); // returns false
alert(Boolean(null)); // returns false
alert(Boolean(' ')); // true Previously if I had the following {
"id": "light1",
"type": "Light",
"state": {
"type": "Boolean",
"value": " "
}
} This is implicitly Now I have the following: {
"id": "light1",
"type": "Light",
"state": {
"type": "Boolean",
"value": null
}
} But for NGSI-LD as explained, you can't have a |
Thanks for the feedback @jason-fox We think that side-effect would not have any impact on the existing e2e usages of the issue. We are going to merge this PR and we will confirm it after the CI e2e after some hours. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(revert from a revert)
this branch contais PR changes from original branch task/default_attribute_value_null_instead_blank
Do not merge until passes: