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

[Export As JSON] Exports with Objects using Conditional Styling can cause multiple files to be saved #6566

Closed
4 of 7 tasks
jvigliotta opened this issue Apr 6, 2023 · 2 comments · Fixed by #6568
Closed
4 of 7 tasks
Labels
Milestone

Comments

@jvigliotta
Copy link
Contributor

Summary

Sometimes, when exporting to JSON, if the export includes an object that has conditional styling, multiple json files will be saved. The reason for this seems to be a race condition triggered between the interplay of these two methods: https://github.com/nasa/openmct/blob/master/src/plugins/exportAsJSONAction/ExportAsJSONAction.js#L215-L277

Expected vs Current Behavior

One JSON file should be exported, the action should wait until all items have been processed.

Steps to Reproduce

  1. Create a display layout
  2. Add two or more items that have conditional styling (keep the items they are using to be styled, outside of the exported objects)
  3. Export the item as JSON
  4. If above doesn't work add another item or two to the display layout and export again
  5. Note multiple files have been saved

Impact Check List

  • Data loss or misrepresented data?
  • Regression? Did this used to work or has it always been broken?
  • Is there a workaround available? Waiting and taking the last file
  • Does this impact a critical component?
  • Is this just a visual bug with no functional impact?
  • Does this block the execution of e2e tests?
  • Does this have an impact on Performance?
@unlikelyzero
Copy link
Collaborator

This will need to be verified on release/2.2.0 and release/2.2.2

@ozyx
Copy link
Member

ozyx commented Apr 17, 2023

Verified fixed on 2.2.0. Exporting a display layout with two conditionally styled objects only saved one JSON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants