-
Notifications
You must be signed in to change notification settings - Fork 265
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
Hardening/1298 render compound simplification #3292
Hardening/1298 render compound simplification #3292
Conversation
@@ -39,7 +39,6 @@ payload='{ | |||
"type": "Room", | |||
"isPattern": "false", | |||
"id": "ConferenceRoom", | |||
"attributeDomainName" : "ADN", |
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.
Obviously, attributeDomainName and metadata domain has been removed from .test.
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.
NTC
@@ -183,7 +183,7 @@ Date: REGEX(.*) | |||
05. GET entities matching q=A1==1 AND mq=A1.M1==2, see E2, using /v1/queryContext | |||
================================================================================= | |||
HTTP/1.1 200 OK | |||
Content-Length: 246 | |||
Content-Length: 245 |
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.
This is due to a "\n" has been removed in NGSIv1 rendering. That "\n" was probably forgotten when the de-indent work in NGSIv1 was done.
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.
NTC
@@ -86,7 +86,7 @@ echo | |||
=================================================================== | |||
HTTP/1.1 201 Created | |||
Content-Length: 0 | |||
Location: /v2/entities/E1?type=none | |||
Location: /v2/entities/E1?type=Thing |
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.
Looking to the version of this .test in master is seems this PR has solved a bug in default typing (although I'm not sure how I have done that!:)
Probably this deserves a line in CNR, something like:
- Fix: default types for entities and attributes in NGSIv2 was wrongly using "none" in some cases
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.
Fixed in 6fb9656
@@ -155,7 +155,7 @@ Date: REGEX(.*) | |||
02. GET the entity using /v1/queryContext |
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.
Changes in Content-Length in this .test due to "\n" removal in rendering logic.
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.
NTC
@@ -229,7 +229,7 @@ Date: REGEX(.*) | |||
======================================================================== |
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.
Changes in Content-Length in this .test due to "\n" removal in rendering logic.
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.
NTC
@@ -356,7 +356,7 @@ Date: REGEX(.*) | |||
===================================================================================== | |||
POST http://localhost:REGEX(\d+)/notify |
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.
Changes in Content-Length in this .test due to "\n" removal in rendering logic.
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.
NTC
// So, if V2 rendering is destroyed by this modification, it is only because the V2 rendering is using | ||
// a method that it SHOULD NOT USE ! | ||
// | ||
out += "\n"; |
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.
This is the "\n" that I mention in .test comment was removed.
NTC (informative)
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
src/lib/ngsi/ContextElement.cpp
Outdated
bool commaAfterContextAttributeVector = domainMetadataVectorRendered; | ||
bool commaAfterAttributeDomainName = domainMetadataVectorRendered || contextAttributeVectorRendered; | ||
bool commaAfterEntityId = commaAfterAttributeDomainName || attributeDomainNameRendered; | ||
#endif |
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.
All this to be removed in this PR, right?
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.
Yes. I missed it...
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.
Fixed in 6ddd2cb
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
This PR continues the render unification and simplification work in issue #1298. In particular:
Some .test has been modified, but I think they are needed modifications and doesn't break backward compability. Please find specific comment on the .test files.