You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "Ma77Ball (via GitHub)" <gi...@apache.org> on 2026/06/03 02:58:44 UTC

[I] menu.component.ts mixes manual Subscription cleanup with untilDestroyed [texera]

Ma77Ball opened a new issue, #5323:
URL: https://github.com/apache/texera/issues/5323

   menu.component.ts uses untilDestroyed(this) for subscription teardown throughout, but also keeps two leftover manual Subscription fields, making the cleanup contract inconsistent and harder to reason about:
   
   - computingUnitStatusSubscription only aggregates a stream that is already piped through untilDestroyed(this), so the field, its .add() wrapper, and the ngOnDestroy unsubscribe are redundant.
   - durationUpdateSubscription is used to imperatively stop and restart the 1-second elapsed-time timer on each ExecutionDurationUpdateEvent (a manual switch), which RxJS switchMap expresses declaratively.
   
   Proposed cleanup (behavior-preserving):
   - Remove computingUnitStatusSubscription entirely and rely on untilDestroyed(this) for teardown.
   - Replace durationUpdateSubscription with a switchMap pipe so the timer reset is handled by the operator chain.
   - Drop the now-unused Subscription import, leaving the component on a single consistent cleanup style.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] menu.component.ts mixes manual Subscription cleanup with untilDestroyed [texera]

Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang closed issue #5323: menu.component.ts mixes manual Subscription cleanup with untilDestroyed
URL: https://github.com/apache/texera/issues/5323


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org