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(core): fail to clean up framework observers #11782

Merged

Conversation

HuiSF
Copy link
Contributor

@HuiSF HuiSF commented Aug 10, 2023

Description of changes

Added logic to clean up the Framework detection observers, and ignore new incoming observers after the detection completes.

Issue #, if available

#11770

Description of how you validated changes

Unit tests.

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@HuiSF HuiSF requested review from a team as code owners August 10, 2023 19:53
@HuiSF HuiSF requested a review from erinleigh90 August 10, 2023 19:53
erinleigh90
erinleigh90 previously approved these changes Aug 10, 2023
Copy link
Contributor

@erinleigh90 erinleigh90 left a comment

Choose a reason for hiding this comment

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

LGTM

erinleigh90
erinleigh90 previously approved these changes Aug 10, 2023
jimblanc
jimblanc previously approved these changes Aug 10, 2023
cwomack
cwomack previously approved these changes Aug 10, 2023
Copy link
Contributor

@cwomack cwomack left a comment

Choose a reason for hiding this comment

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

LGTM!

@HuiSF HuiSF dismissed stale reviews from erinleigh90, cwomack, and jimblanc via f4dc3bf August 11, 2023 16:58
@HuiSF HuiSF force-pushed the hui/fix/core/framework-observers-memory-leak branch from 6043df7 to f4dc3bf Compare August 11, 2023 16:58
@HuiSF HuiSF requested a review from a team as a code owner August 11, 2023 16:58
jimblanc
jimblanc previously approved these changes Aug 11, 2023
erinleigh90
erinleigh90 previously approved these changes Aug 11, 2023
@HuiSF HuiSF dismissed stale reviews from erinleigh90 and jimblanc via 11c5509 August 11, 2023 18:09
@HuiSF HuiSF force-pushed the hui/fix/core/framework-observers-memory-leak branch from f4dc3bf to 11c5509 Compare August 11, 2023 18:09
});

afterAll(() => {
jest.useRealTimers();
Copy link
Member

Choose a reason for hiding this comment

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

nit: I'd prefer using afterEach (see previous suggestion) for better isolation between tests, but not a blocker.

@HuiSF HuiSF merged commit 6af6c01 into aws-amplify:main Aug 11, 2023
31 checks passed
@HuiSF HuiSF deleted the hui/fix/core/framework-observers-memory-leak branch August 11, 2023 19:33
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.

None yet

5 participants