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

StaticRootPlugin does not work with non-empty or non-root namespaces #6584

Closed
1 of 7 tasks
ozyx opened this issue Apr 12, 2023 · 2 comments
Closed
1 of 7 tasks

StaticRootPlugin does not work with non-empty or non-root namespaces #6584

ozyx opened this issue Apr 12, 2023 · 2 comments

Comments

@ozyx
Copy link
Member

ozyx commented Apr 12, 2023

Summary

Creating a StaticRoot will fail to handle properly objects with a non-empty namespace (any non-default namespace), or non-root namespaces (a namespace that differs from the exported root namespace).

Notice the Missing: [object Object] items in the tree after using this JSON with the StaticRootPlugin. This is due to the plugin overwriting composition items with malformed identifiers if they have a non-empty or non-root namespace.

Expected vs Current Behavior

The StaticRootPlugin should be able to handle and remap objects with non-root and non-empty namespaces

Steps to Reproduce

  1. Start openmct-yamcs with StaticRootPlugin configured with the attached test json
  2. Notice that objects in composition don't load correctly

Environment

  • Open MCT Version: 2.2.2-SNAPSHOT
  • Deployment Type: openmct-yamcs
  • OS: MacOS
  • Browser: Chrome

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?
  • 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?

Additional Information

@ozyx
Copy link
Member Author

ozyx commented Apr 17, 2023

Testing Instructions

  1. Download and extract the attached JSON
  2. Install the plugin into openmct-yamcs with the following code:
      // Also install the Clock plugin since the JSON includes one :)
      openmct.install(openmct.plugins.Clock({ enableClockIndicator: true }));
      openmct.install(openmct.plugins.StaticRootPlugin({
          namespace: 'test-namespace',
          exportUrl: './nonemptynamespace.json'
      }));
  1. Ensure no console errors, and that the JSON is imported correctly as a static root.

@akhenry
Copy link
Contributor

akhenry commented Apr 17, 2023

Verified fixed.

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

No branches or pull requests

4 participants