Skip to content

Conversation

@NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Sep 8, 2025

From: https://github.com/bertdeblock/failing-ember-beta-test

Very surprised our existing tests didn't catch this

It turns out we haven't been doing much owner-linked destruction testing.

If folks use clearRender, things work great.
The issue is that if the owner is destroyed, we want everything used with the owner to also be destroyed -- and somehow this linkage got missed during the renderComponent work.

Implementation PR, for reference: #20962

`,
},
integration: {
'destruction-test.gjs': `
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this test is passing in 6.7

@github-actions
Copy link

github-actions bot commented Sep 8, 2025

Estimated Asset Sizes

Diff

--- main/out.txt	2025-09-08 20:38:42.000000000 +0000
+++ pr/./pr-17568479549/out.txt	2025-09-09 01:01:24.000000000 +0000
@@ -1,34 +1,34 @@
 ╔═══════╤═══════════╤═══════════╗
 ║       │ Min       │ Gzip      ║
 ╟───────┼───────────┼───────────╢
-║ Total │ 418.65 KB │ 232.22 KB ║
+║ Total │ 418.65 KB │ 232.25 KB ║
 ╚═══════╧═══════════╧═══════════╝
 
 ╔══════════════════════╤══════════╤═══════════╗
 ║ @ember/*             │ Min      │ Gzip      ║
 ╟──────────────────────┼──────────┼───────────╢
-║ Total                │ 239.4 KB │ 147.23 KB ║
+║ Total                │ 239.4 KB │ 147.26 KB ║
 ╟──────────────────────┼──────────┼───────────╢
-║ -internals           │ 35.46 KB │ 25.49 KB  ║
-║ application          │ 12.83 KB │ 7.7 KB    ║
+║ -internals           │ 35.46 KB │ 25.5 KB   ║
+║ application          │ 12.83 KB │ 7.66 KB   ║
 ║ array                │ 12.66 KB │ 7.32 KB   ║
 ║ canary-features      │ 304 B    │ 419 B     ║
-║ component            │ 1.07 KB  │ 1005 B    ║
+║ component            │ 1.07 KB  │ 1.01 KB   ║
 ║ controller           │ 1.8 KB   │ 1.36 KB   ║
 ║ debug                │ 11.4 KB  │ 7.92 KB   ║
 ║ deprecated-features  │ 31 B     │ 77 B      ║
 ║ destroyable          │ 561 B    │ 383 B     ║
 ║ enumerable           │ 259 B    │ 387 B     ║
-║ helper               │ 823 B    │ 605 B     ║
+║ helper               │ 823 B    │ 596 B     ║
 ║ instrumentation      │ 2.43 KB  │ 1.78 KB   ║
-║ modifier             │ 669 B    │ 581 B     ║
+║ modifier             │ 669 B    │ 588 B     ║
 ║ object               │ 33.78 KB │ 20.79 KB  ║
 ║ owner                │ 159 B    │ 178 B     ║
-║ renderer             │ 406 B    │ 350 B     ║
-║ routing              │ 58.08 KB │ 33.43 KB  ║
+║ renderer             │ 406 B    │ 366 B     ║
+║ routing              │ 58.08 KB │ 33.45 KB  ║
 ║ runloop              │ 2.2 KB   │ 1.33 KB   ║
 ║ service              │ 859 B    │ 741 B     ║
-║ template             │ 430 B    │ 364 B     ║
+║ template             │ 430 B    │ 352 B     ║
 ║ template-compilation │ 429 B    │ 366 B     ║
 ║ template-compiler    │ 57.91 KB │ 30.4 KB   ║
 ║ template-factory     │ 94 B     │ 160 B     ║

Details

This PRmain
╔═══════╤═══════════╤═══════════╗
║       │ Min       │ Gzip      ║
╟───────┼───────────┼───────────╢
║ Total │ 418.65 KB │ 232.25 KB ║
╚═══════╧═══════════╧═══════════╝

╔══════════════════════╤══════════╤═══════════╗
║ @ember/*             │ Min      │ Gzip      ║
╟──────────────────────┼──────────┼───────────╢
║ Total                │ 239.4 KB │ 147.26 KB ║
╟──────────────────────┼──────────┼───────────╢
║ -internals           │ 35.46 KB │ 25.5 KB   ║
║ application          │ 12.83 KB │ 7.66 KB   ║
║ array                │ 12.66 KB │ 7.32 KB   ║
║ canary-features      │ 304 B    │ 419 B     ║
║ component            │ 1.07 KB  │ 1.01 KB   ║
║ controller           │ 1.8 KB   │ 1.36 KB   ║
║ debug                │ 11.4 KB  │ 7.92 KB   ║
║ deprecated-features  │ 31 B     │ 77 B      ║
║ destroyable          │ 561 B    │ 383 B     ║
║ enumerable           │ 259 B    │ 387 B     ║
║ helper               │ 823 B    │ 596 B     ║
║ instrumentation      │ 2.43 KB  │ 1.78 KB   ║
║ modifier             │ 669 B    │ 588 B     ║
║ object               │ 33.78 KB │ 20.79 KB  ║
║ owner                │ 159 B    │ 178 B     ║
║ renderer             │ 406 B    │ 366 B     ║
║ routing              │ 58.08 KB │ 33.45 KB  ║
║ runloop              │ 2.2 KB   │ 1.33 KB   ║
║ service              │ 859 B    │ 741 B     ║
║ template             │ 430 B    │ 352 B     ║
║ template-compilation │ 429 B    │ 366 B     ║
║ template-compiler    │ 57.91 KB │ 30.4 KB   ║
║ template-factory     │ 94 B     │ 160 B     ║
║ test                 │ 923 B    │ 627 B     ║
║ utils                │ 3.93 KB  │ 3.5 KB    ║
║ version              │ 55 B     │ 131 B     ║
╚══════════════════════╧══════════╧═══════════╝

╔═════════════════╤═══════════╤══════════╗
║ @glimmer/*      │ Min       │ Gzip     ║
╟─────────────────┼───────────┼──────────╢
║ Total           │ 179.25 KB │ 84.99 KB ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.19 KB  │ 5.44 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.89 KB  │ 13.23 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.63 KB  ║
║ reference       │ 5.51 KB   │ 3.18 KB  ║
║ runtime         │ 95.26 KB  │ 42.69 KB ║
║ tracking        │ 989 B     │ 961 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 15.64 KB  │ 6.86 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝
╔═══════╤═══════════╤═══════════╗
║       │ Min       │ Gzip      ║
╟───────┼───────────┼───────────╢
║ Total │ 418.65 KB │ 232.22 KB ║
╚═══════╧═══════════╧═══════════╝

╔══════════════════════╤══════════╤═══════════╗
║ @ember/*             │ Min      │ Gzip      ║
╟──────────────────────┼──────────┼───────────╢
║ Total                │ 239.4 KB │ 147.23 KB ║
╟──────────────────────┼──────────┼───────────╢
║ -internals           │ 35.46 KB │ 25.49 KB  ║
║ application          │ 12.83 KB │ 7.7 KB    ║
║ array                │ 12.66 KB │ 7.32 KB   ║
║ canary-features      │ 304 B    │ 419 B     ║
║ component            │ 1.07 KB  │ 1005 B    ║
║ controller           │ 1.8 KB   │ 1.36 KB   ║
║ debug                │ 11.4 KB  │ 7.92 KB   ║
║ deprecated-features  │ 31 B     │ 77 B      ║
║ destroyable          │ 561 B    │ 383 B     ║
║ enumerable           │ 259 B    │ 387 B     ║
║ helper               │ 823 B    │ 605 B     ║
║ instrumentation      │ 2.43 KB  │ 1.78 KB   ║
║ modifier             │ 669 B    │ 581 B     ║
║ object               │ 33.78 KB │ 20.79 KB  ║
║ owner                │ 159 B    │ 178 B     ║
║ renderer             │ 406 B    │ 350 B     ║
║ routing              │ 58.08 KB │ 33.43 KB  ║
║ runloop              │ 2.2 KB   │ 1.33 KB   ║
║ service              │ 859 B    │ 741 B     ║
║ template             │ 430 B    │ 364 B     ║
║ template-compilation │ 429 B    │ 366 B     ║
║ template-compiler    │ 57.91 KB │ 30.4 KB   ║
║ template-factory     │ 94 B     │ 160 B     ║
║ test                 │ 923 B    │ 627 B     ║
║ utils                │ 3.93 KB  │ 3.5 KB    ║
║ version              │ 55 B     │ 131 B     ║
╚══════════════════════╧══════════╧═══════════╝

╔═════════════════╤═══════════╤══════════╗
║ @glimmer/*      │ Min       │ Gzip     ║
╟─────────────────┼───────────┼──────────╢
║ Total           │ 179.25 KB │ 84.99 KB ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.19 KB  │ 5.44 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.89 KB  │ 13.23 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.63 KB  ║
║ reference       │ 5.51 KB   │ 3.18 KB  ║
║ runtime         │ 95.26 KB  │ 42.69 KB ║
║ tracking        │ 989 B     │ 961 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 15.64 KB  │ 6.86 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't find any place @glimmer/component was tested, so I just added some tests here

@NullVoxPopuli NullVoxPopuli changed the title Destruction repro Fix issue with renderer's cleanup since the introduction of renderComponent Sep 9, 2025
@NullVoxPopuli NullVoxPopuli changed the title Fix issue with renderer's cleanup since the introduction of renderComponent [Bugfix Beta] Fix issue with renderer's cleanup since the introduction of renderComponent Sep 9, 2025
@kategengler kategengler requested a review from ef4 September 9, 2025 05:34
@kategengler kategengler merged commit a0ac467 into emberjs:main Sep 9, 2025
29 checks passed
@NullVoxPopuli NullVoxPopuli deleted the nvp/destruction-repro branch September 12, 2025 19:01
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.

3 participants