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

Condition Widgets trigger hundreds of persistence calls. #5137

Closed
3 of 5 tasks
akhenry opened this issue Apr 28, 2022 · 2 comments
Closed
3 of 5 tasks

Condition Widgets trigger hundreds of persistence calls. #5137

akhenry opened this issue Apr 28, 2022 · 2 comments

Comments

@akhenry
Copy link
Contributor

akhenry commented Apr 28, 2022

Summary

Navigating to a condition widget triggers hundreds of persistence calls, despite nothing having changed.

Expected vs Current Behavior

Condition widgets (and indeed all object views) should not be mutating domain objects unless the user has actually changed something. Mutating a domain object will trigger persistence, which is expensive. Do not use mutation to establish an object's default state.

Steps to Reproduce

  1. Create a condition widget
  2. Create a condition set, drag in a telemetry point, and define a basic rule.
  3. Edit the condition widget and apply some conditional styling
  4. Save the condition widget. Open the network tab and observe that it is now making persistence calls in an endless loop.

Environment

  • Open MCT Version: e75befa
  • Deployment Type: testathon

Impact Check List

  • Data loss or misrepresented data? - Eventually causes browser to crash
  • 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?

Additional Information

@akhenry
Copy link
Contributor Author

akhenry commented Apr 28, 2022

It looks like this is the offending line of code.

There are two issues here -

  1. This line of code mutates the domain object in view mode, even if nothing about the object has changed.
  2. The logic here encodes knowledge of condition widgets into ObjectView. ObjectView should be agnostic of Condition Widgets.

@shefalijoshi
Copy link
Contributor

shefalijoshi commented May 2, 2022

I'm no longer seeing requests from condition widgets

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

Successfully merging a pull request may close this issue.

5 participants