Skip to content

WEBCORE-2676: Remove ds-patched.model.is-destroyed deprecation and guard#16

Draft
jiayingxu wants to merge 1 commit into
v3.12.6-patchedfrom
jiayingxu/WEBCORE-2676-assess-destroyed-patch
Draft

WEBCORE-2676: Remove ds-patched.model.is-destroyed deprecation and guard#16
jiayingxu wants to merge 1 commit into
v3.12.6-patchedfrom
jiayingxu/WEBCORE-2676-assess-destroyed-patch

Conversation

@jiayingxu

Copy link
Copy Markdown

Description

This PR removes the custom ds-patched.model.is-destroyed deprecation and the !this.isDestroyed guard from Ember Data's InternalModel.getRecord() method.

The original patch (introduced by Alex Navasardyan in 2022, ported to TypeScript by Martin Munoz in 2023) added an early-exit guard to prevent record materialization when getRecord() is called on destroyed InternalModels. This was needed to unblock an Ember 3.4 upgrade at the time.

The goal of this PR is to roll back this custom behavior on our v3.12.6 fork and assess the impact on Iverson. When we later attempt to upgrade to the mainline of Ember Data 3.28, we can compare how it behaves to this version of our fork without the patch, helping us understand if this custom patch is still necessary.

Changes:

  • Removed the deprecation warning that fired when isDestroyed was true
  • Removed the && !this.isDestroyed guard from the materialization condition
  • Reverted back to the original Ember Data behavior

Related commits:

Summary

Ticket: https://addepar.atlassian.net/browse/WEBCORE-2676

  • Estimate the impact of a regression caused by this PR:
    • Unknown - this is an experimental assessment to measure impact on Iverson

Release notes: none

This removes the custom patch that added an early-exit guard when
getRecord() is called on a destroyed InternalModel. The goal is to
assess the impact of this removal on Iverson to better understand
whether this behavior will be needed when upgrading to mainline 3.28.

This reverts the custom fork changes originally introduced in:
- 400aaea by Alex Navasardyan (2022)
- e30f989 by Martin Munoz (2023)

Related to WEBCORE-2676

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@cedg-builds cedg-builds left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM! TY!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants