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

Move all support for the legacy API into a plugin #4614

Merged
merged 17 commits into from
Jan 3, 2022
Merged

Conversation

akhenry
Copy link
Contributor

@akhenry akhenry commented Dec 18, 2021

closes #4615

This PR renders support for Open MCT's legacy API optional by moving the entire adapter layer into a plugin.

Legacy support can be enabled by installing the new legacy support plugin like so:

openmct.install(openmct.plugins.LegacySupport());

If you also require support for legacy indicators you will also need to install the LegacyIndicatorsPlugin -

openmct.install(openmct.plugins.LegacyIndicators());

For now it remains installed by default in the Open MCT source. A followup issue has been filed to ensure that legacy support is disabled by default in 1.8.3.

In addition to moving legacy support into a plugin, this PR also:

  • Adds a composition policy that was missing from the modern composition API to prevent composition of objects that do not support composability.
  • Fixes a memory leak in timers that was causing problems in tests.
  • Fixes a ton of tests broken by the removal of legacy code.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.

Author Checklist

  • Changes address original issue?
  • Unit tests included and/or updated with changes?
  • Command line build passes?
  • Has this been smoke tested?
  • Testing instructions included in associated issue?

@akhenry akhenry changed the title Make legacy support optional Move all support for the legacy API into a plugin Dec 18, 2021
@akhenry akhenry requested a review from shefalijoshi December 18, 2021 23:55
@codecov
Copy link

codecov bot commented Dec 18, 2021

Codecov Report

Merging #4614 (f07dec3) into master (51e4c0c) will decrease coverage by 1.08%.
The diff coverage is 34.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4614      +/-   ##
==========================================
- Coverage   57.35%   56.27%   -1.09%     
==========================================
  Files         718      718              
  Lines       22772    22781       +9     
  Branches     1653     1653              
==========================================
- Hits        13061    12820     -241     
- Misses       9302     9551     +249     
- Partials      409      410       +1     
Impacted Files Coverage Δ
src/plugins/condition/plugin.js 100.00% <ø> (ø)
src/plugins/legacySupport/BundleRegistry.js 75.00% <ø> (ø)
src/plugins/legacySupport/installDefaultBundles.js 40.00% <ø> (ø)
src/plugins/legacySupport/legacyRegistry.js 100.00% <ø> (ø)
src/plugins/legacySupport/plugin.js 0.00% <0.00%> (ø)
src/plugins/timer/components/Timer.vue 75.60% <ø> (+1.21%) ⬆️
src/utils/clock/Ticker.js 95.00% <80.00%> (-5.00%) ⬇️
src/MCT.js 97.80% <100.00%> (+2.52%) ⬆️
src/api/composition/CompositionAPI.js 100.00% <100.00%> (ø)
src/api/composition/DefaultCompositionProvider.js 81.81% <100.00%> (+0.86%) ⬆️
... and 52 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51e4c0c...f07dec3. Read the comment docs.

@akhenry akhenry requested a review from davetsay December 19, 2021 04:59
@unlikelyzero unlikelyzero added pr:e2e Automatically triggers e2e tests to run pr:visual labels Dec 20, 2021
@github-actions
Copy link

@github-actions
Copy link

Success ✅ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/1603268815

@unlikelyzero
Copy link
Contributor

Note: This is passing our smoke tests.

Copy link
Contributor

@davetsay davetsay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great @akhenry . I ran this in VISTA and there were no issues.

There are a couple of minor change requests inline.

@akhenry akhenry requested a review from davetsay January 3, 2022 22:07
Copy link
Contributor

@davetsay davetsay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Reviewer Checklist

Changes appear to address issue? Y
Appropriate unit tests included? Y
Code style and in-line documentation are appropriate? Y
Commit messages meet standards? Y
Has associated issue been labelled unverified? Y

@davetsay davetsay merged commit 3a65f75 into master Jan 3, 2022
@davetsay davetsay deleted the no-angular branch January 3, 2022 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:e2e Automatically triggers e2e tests to run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make legacy support optional
3 participants