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

fix(#7670): Ensure objects unsubscribe from staleness when destroyed #7736

Merged
merged 7 commits into from
May 31, 2024

Conversation

jvigliotta
Copy link
Contributor

@jvigliotta jvigliotta commented May 23, 2024

Closes #7670

Describe your changes:

Clearing any existing staleness subscriptions before showing a new object.
Adding a new test to make sure this doesn't regress.
Added new functionality to createDomainObjectWithDefaults to be able to set toggles when creating test objects.
Using new timeAPI methods in SWG Staleness provider.

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 a notable change that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.63%. Comparing base (017380b) to head (d965a80).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7736      +/-   ##
==========================================
- Coverage   57.00%   56.63%   -0.38%     
==========================================
  Files         673      673              
  Lines       27178    27177       -1     
  Branches     2635     2636       +1     
==========================================
- Hits        15493    15391     -102     
- Misses      11356    11455      +99     
- Partials      329      331       +2     
Flag Coverage Δ
e2e-full 23.57% <0.00%> (-18.29%) ⬇️
e2e-stable 60.60% <100.00%> (+0.08%) ⬆️
unit 49.25% <28.57%> (-0.16%) ⬇️
Files Coverage Δ
example/generator/SinewaveStalenessProvider.js 100.00% <100.00%> (+11.76%) ⬆️
src/ui/components/ObjectView.vue 52.77% <100.00%> (-3.77%) ⬇️

... and 20 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

this.#updateRealTime(this.#openmct.time.getMode());
}

this.#realtimeCheck();
Copy link
Contributor

Choose a reason for hiding this comment

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

this method name slaps

@shefalijoshi shefalijoshi enabled auto-merge (squash) May 23, 2024 22:45
@shefalijoshi shefalijoshi added the pr:e2e Automatically triggers e2e tests to run label May 23, 2024
@shefalijoshi shefalijoshi added this to the Target:4.0.1 milestone May 23, 2024
e2e/appActions.js Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the pr:e2e Automatically triggers e2e tests to run label May 23, 2024
@ozyx ozyx disabled auto-merge May 23, 2024 22:54
@jvigliotta jvigliotta requested a review from ozyx May 29, 2024 19:33
Copy link
Contributor

@ozyx ozyx left a comment

Choose a reason for hiding this comment

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

LGTM, one minor nitpick you can take or leave

Comment on lines +39 to +43
// edit properties and enable staleness updates
await page.getByLabel('More actions').click();
await page.getByLabel('Edit properties...').click();
await page.getByLabel('Provide Staleness Updates', { exact: true }).click();
await page.getByLabel('Save').click();
Copy link
Contributor

Choose a reason for hiding this comment

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

🙌

@@ -59,7 +59,7 @@ export default class SinewaveLimitProvider extends EventEmitter {
subscribeToStaleness(domainObject, callback) {
const id = this.#getObjectKeyString(domainObject);

this.#realtimeCheck();
this.#realTimeCheck();
Copy link
Contributor

Choose a reason for hiding this comment

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

whoomp there it is

e2e/tests/functional/staleness.e2e.spec.js Outdated Show resolved Hide resolved
@ozyx ozyx changed the title Mct7670 fix(#7670): Ensure objects unsubscribe from staleness when destroyed May 30, 2024
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
@jvigliotta jvigliotta added the pr:e2e:couchdb npm run test:e2e:couchdb label May 30, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label May 30, 2024
@jvigliotta jvigliotta added the pr:e2e:couchdb npm run test:e2e:couchdb label May 31, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label May 31, 2024
@jvigliotta jvigliotta enabled auto-merge (squash) May 31, 2024 20:04
@jvigliotta jvigliotta merged commit eba6f0f into master May 31, 2024
21 checks passed
@jvigliotta jvigliotta deleted the mct7670 branch May 31, 2024 20:47
@ozyx ozyx modified the milestones: Target:4.0.1, Target:4.0.0 Jun 3, 2024
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 this pull request may close these issues.

Staleness indication inconsistency misapplied to layouts based on navigation.
3 participants