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

vdk-core: avoid circular references in print results #1176

Merged
merged 3 commits into from
Sep 7, 2022

Conversation

antoniivanov
Copy link
Collaborator

If there's a circular reference in the data printed by execution_results, json.dumps will fail.
So we are failing back to pprint which can handle them.

pprint would sort the keys for us which leads to more confusing message (e.g the name of the stpe is not first for each step, etc.) That's why we are not using it by default.

Sorting can be disabled but only from 3.8+

Testing Done: extended unit tests

Signed-off-by: Antoni Ivanov aivanov@vmware.com

If there's a circular reference in the data printed by
execution_results, json.dumps will fail.
So we are failing back to pprint which can handle them.

pprint would sort the keys for us which leads to more confusing message
(e.g the name of the stpe is not first for each step, etc.) That's why
we are not using it by default.

Sorting can be disabled but only from 3.8+

Testing Done: extended unit tests

Signed-off-by: Antoni Ivanov <aivanov@vmware.com>
antoniivanov and others added 2 commits September 7, 2022 11:46
…execution_results.py

Co-authored-by: Gabriel Georgiev <45939426+gageorgiev@users.noreply.github.com>
@antoniivanov antoniivanov merged commit f421175 into main Sep 7, 2022
@antoniivanov antoniivanov deleted the person/aivanov/vdk-core-summary branch September 7, 2022 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants