-
Notifications
You must be signed in to change notification settings - Fork 266
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
Clean render()/check() NGSIv1 method from indent argument passing #2760
Comments
We are now in an "almost" finished status with regards to this change, and the situation is as follows: Branch haderding/remove_ngsiv1_indent implements a refactor in render()/check() code to remove all the whitespace and all the newlines in all the NGSIv1 renders. In addition, the
The harnessFunctions.sh localBrokerStart() function has been adjusted in haderding/remove_ngsiv1_indent in order to use
In all cases above, note that the only changes are in the EDIT: the compare branch also shows changes in the 2846_empty_maps_in_metrics/empty_maps_in_metrics.test test. This is probably due to changes in the content length of the above test are causing slight changes in the byte count statistics. |
Ready to merge this work into master but, due to planning reasons, this will be deferred some sprints away in the future. Milestone changed. |
Quick link to the branch holding the changes related with this issue (useful while the corresponding PR is not yet cast): https://github.com/telefonicaid/fiware-orion/compare/haderding/remove_ngsiv1_indent |
The following 119 unit test are failing. They will be DISABLED.
There isn't any "core" unit test in that list, but anyway they should be fixed eventually (this issue will remain opened until we find a solution for this). |
Above 119 disabled tests in commit c689a24. Note the commit has +/- 119 lines changed, as expected. I'm writting done in this issue as it can be useful to reverse it in the future to re-enable again. |
Implemented in PR #3020 However, this is not the end of the story for this issue :). Pending after the above PR merge:
|
Most of the work consolidated in 1.9.0. Post-implementation tasks moved forward a couple of versions, to milestone 1.11.0. |
PR #3083 does:
Fix the disabled unit tests is pending. |
PR #3086 fix the pending disabled unit tests. This was the last item of work in this issue, so it can be closed. |
The removal work has been already done at branch haderding/remove_ngsiv1_indent (note the typo 'haderding' in the branch name).
However, in order to have a "safe measure" in the case that some API client in IoTP were (wrongly) processing the result in text-positional way (instead of the right way in JSON way) we should implement a formatting step just before response NGSIv1 payloads in order to keep 100% backward compatibility (the existing .test and unit test will guarantee that). This formatting step should be activable by configuration (e.g.
-legacyNgsiv1Indent
) and it is thought as a provisional measure to be removed (including the CLI) once we check that no IoTP case breaks.The builtin PrettyWriter from rapidjson could do the trick (see
fiware-orion/src/lib/rest/restReply.cpp
Line 70 in 43e96f9
:
(different to the usual way in any JSON pretty printer out there) so probably we would need to re-implement a special pretty printer ourselves :(The text was updated successfully, but these errors were encountered: