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

Fix the structure issue on the json file extracted by the exportLogDataToJSON method #189

Closed
mickaelgobbo opened this issue Oct 4, 2024 · 1 comment · Fixed by #193
Closed
Labels
bug Something isn't working

Comments

@mickaelgobbo
Copy link
Collaborator

mickaelgobbo commented Oct 4, 2024

Expected Behaviour

As an expected behavior, we expect to have a json with a right structure, file extracted from the exportLogDataToJSON methods.

Actual Behaviour

Currently, the json file structure is not good.

Steps to Reproduce

contact me in direct if you want an example of the extraction from our log projects.
i have a CI job extracting on the fly a json object from the exportLogDataToJSON method.

Sample extracted file that illustrates the problem

As an example of the json extraction we have:

"[ {\n \"fileName\" : \"aaa.log\",\n \"code\" : \"ODB-aaaaa\",\n \"test\" : \"aaaaa\",\n \"testSuite\" : \"aaaa\",\n \"topology\" : \"aaaaaa\",\n \"timing\" : \"aaaaa\",\n \"errorMessage\" : \"aaaaaa\",\n \"className\" : \"Provisioning\",\n \"thread\" : \"aaaaaa\",\n \"testStatus\" : \"N/A\",\n \"frequence\" : \"1\",\n \"deployment\" : \"2594\",\n \"timestamp\" : \"2024-10-01T11:40:22.977Z\"\n}, {\n \"fileName\" : \"aaaa.log\",\n \"code\" : \"aaaaaa\",\n \"test\" : \"aaaa\",\n \"testSuite\" : \"Standard\",\n \"topology\" : \"transfer_control\",\n \"timing\" : \"during_tests\",\n \"errorMessage\" : \"aaaaaaaaaaa",\n \"className\" : \"aaaaaaaa\",\n \"thread\" : \"aaaaa\",\n \"testStatus\" : \"PASS\",\n \"frequence\" : \"1\",\n \"deployment\" : \"2594\",\n \"timestamp\" : \"2024-10-01T12:04:56.673Z\"\n} ]"

Proposition of fixes.

To have a good one, the bellow adaptation on the extraction have to be done:

Remove the CRLF : remove the \r\n (windows extraction) or remove the \n (linux extraction)
remove the backslash
should start by [{ instead of "[{
should end by }] instead of }]"

tested in local and by applying the above fixes, the structure is good.

@mickaelgobbo mickaelgobbo added the bug Something isn't working label Oct 4, 2024
@baubakg baubakg added this to the 1.11.1 milestone Oct 4, 2024
@baubakg baubakg closed this as completed Oct 4, 2024
@baubakg baubakg reopened this Oct 8, 2024
@baubakg baubakg removed this from the 1.11.1 milestone Oct 8, 2024
baubakg added a commit that referenced this issue Oct 8, 2024
@baubakg baubakg linked a pull request Oct 8, 2024 that will close this issue
9 tasks
@baubakg baubakg closed this as completed in 6c60ef2 Oct 8, 2024
@baubakg
Copy link
Member

baubakg commented Oct 8, 2024

@mickaelgobbo the snapshot is ready for testing.

baubakg added a commit that referenced this issue Oct 14, 2024
* fixed #189 : removed preprint
* Removing escapes altogether
* Updating release notes
* Reintroduced the proper test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants