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

Define navigation memory leak tests for some view types. #6718

Closed
wants to merge 4 commits into from

Conversation

akhenry
Copy link
Contributor

@akhenry akhenry commented Jun 8, 2023

Closes #4406

Describe your changes:

Defines a basic set of Playwright tests to detect a particular class of memory leaks that are easy to accidentally introduce. The memory leak that it detects occur on navigation away from a view, where the view's resources are not garbage collected and continue to use resources indefinitely.

This type of memory leak is almost always caused by a failure to clean up event listeners on destroy.

TODO:

  • This PR currently includes some disabled tests. These tests are disabled because they are currently detecting memory leaks. These memory leaks will need to be investigated and fixed before merging this PR.
  • Configure tests to run on every PR to catch memory leaks as soon as possible.

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?
  • Tests included and/or updated with changes?
  • Command line build passes?
  • Has this been smoke tested?
  • 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?
  • Has associated issue been labelled unverified? (only applicable if this PR closes the issue)
  • Has associated issue been labelled bug? (only applicable if this PR is for a bug fix)

@deploysentinel
Copy link

deploysentinel bot commented Jun 8, 2023

Current Playwright Test Results Summary

✅ 122 Passing - ❌ 1 Failing - ⚠️ 1 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 07/07/2023 05:12:27pm UTC)

Run Details

Running Job e2e-stable on CircleCI

Commit: 6f46b4d

Started: 07/07/2023 05:08:15pm UTC

❌ Failures

📄   framework/baseFixtures.e2e.spec.js • 1 Failure

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
baseFixtures tests Verify that tests fail if console.error is thrown
Initial Attempt
Error: Console error detected: [error] This should result in a failure at ( 0:14)...
Console error detected: [error] This should result in a failure at ( 0:14)

Expected: not "error"

100% (57) 57 / 57 runs
failed over last 7 days
0% (0) 0 / 57 runs
flaked over last 7 days

⚠️ Flakes

📄   functional/plugins/imagery/exampleImagery.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Example Imagery Object Can use Mouse Wheel to zoom in and out of latest image
Retry 1Initial Attempt
29.63% (8) 8 / 27 runs
failed over last 7 days
55.56% (15) 15 / 27 runs
flaked over last 7 days

View Detailed Build Results


@akhenry akhenry marked this pull request as draft June 8, 2023 01:07
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Merging #6718 (6f46b4d) into master (3b0e05e) will decrease coverage by 0.54%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #6718      +/-   ##
==========================================
- Coverage   53.87%   53.34%   -0.54%     
==========================================
  Files         624      624              
  Lines       24848    24848              
  Branches     2493     2493              
==========================================
- Hits        13386    13254     -132     
- Misses      10794    10924     +130     
- Partials      668      670       +2     
Flag Coverage Δ *Carryforward flag
e2e-full 42.27% <ø> (ø) Carriedforward from 4fff6b0
e2e-stable 52.94% <ø> (-2.61%) ⬇️
unit 48.54% <ø> (-0.05%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

see 3 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 3b0e05e...6f46b4d. Read the comment docs.

@akhenry akhenry changed the title Define navigation memory leaks for some view types. Define navigation memory leak tests for some view types. Jun 8, 2023
@shefalijoshi shefalijoshi self-requested a review June 12, 2023 19:29
@unlikelyzero unlikelyzero added this to the Target:2.2.6 milestone Jun 20, 2023
@akhenry akhenry requested review from unlikelyzero and removed request for shefalijoshi July 7, 2023 16:45
@akhenry akhenry marked this pull request as ready for review July 7, 2023 16:46
@akhenry akhenry requested a review from shefalijoshi July 7, 2023 17:06
@shefalijoshi
Copy link
Contributor

@akhenry Please close this PR - seems like an incomplete one.

@akhenry
Copy link
Contributor Author

akhenry commented Oct 2, 2023

Superseded by #7057

@akhenry akhenry closed this Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Performance] Check views for memory leak on navigation
3 participants