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 notifyPropertyChange error causing backtracking re-render error #5042

Closed
wants to merge 3 commits into from

Conversation

eriktrom
Copy link
Contributor

@eriktrom eriktrom commented Jun 28, 2017

for async relationships referenced in templates

  • works with json api adapter (w/ links)
  • works w/ django rest adapter
  • works active-model-adapter

fixes #4942

cc @stefanpenner @runspired (i believe u 2 have the most context on this)

for async relationships referenced in templates

- works with json api adapter
- works w/ django rest adapter
- works active-model-adapter
@eriktrom eriktrom force-pushed the bugfix/async-rerender-error branch from 37a3c60 to ce40b9b Compare June 28, 2017 08:27
eriktrom and others added 2 commits July 5, 2017 22:56
…async-rerender-error

* 'master' of https://github.com/emberjs/data:
  update deps
  add test for hasMany + addObject + destroyRecord
  more cleanup
  cleanup
  update `ember-resolver` `loader.js` `rsvp`
@eriktrom
Copy link
Contributor Author

eriktrom commented Jul 6, 2017

@stefanpenner - related and seems important note - our app has issues when the dependent key inside a model is the hasMany relationships live record array - i believe that the attempt to reduce change events from these 2 commits is the root cause:

8c306d6
7ed1c8a

in this pr I tried hard to go with the flow of 'perf ED' - i started by reverting commits - then got this working (for re-renders at least) with no perf loss.. (i believe, big claim, hehe)

however, I'm worried about the side effects that apps like ours might run into for edge cases, especially when they go slightly outside the lines of 'ideal'. If upgrading becomes a risk..

i'll drop into dev-ember-data - say friday after lunch - can show u the codez... and have bandwidth to help move this forward - as example, one flow that does not use a dependent key on a hasMany live record array works, the other, boom. Also, save/destroyRecord/change route/save (w/ same id) goes boom too, which made me laugh out loud. unloadRecord also has a bug, un-related to 2.14, came in via 2.13...

tl;dr - after a scare this morning, prior to showing the app to a potential customer, we're on 2.12 - so down to fix it w/ u

fyi, cheerio

@eriktrom
Copy link
Contributor Author

eriktrom commented Jul 7, 2017

let me know if this is merge ready, i'll rebase to include only the first commit

@runspired
Copy link
Contributor

@eriktrom I believe we want to do some root-cause-analysis on this. Your tests look to be addressing something similar to what @stefanpenner addressed in #5048, could be related. The additional run-loops here only hide the issue, they won't solve it.

A couple of questions:

  • Does this error only happen when a newly created record is involved in the hasMany?
  • if it happens elsewhere (as the issues opened suggest links may be the issue) can you PR a failing test for the more general case to examine?

@eriktrom
Copy link
Contributor Author

I believe we want to do some root-cause-analysis on this
The additional run-loops here only hide the issue, they won't solve it.

yeah, that's pretty much what i figured... and why i left it as Ember.run.join, instead of the de-structured way, for example

A couple of questions: ...

Regarding further investigation - let me go back through, i'll write a failing test(s) and we can go from there. I'll keep working off master to ensure it's not already fixed. Thanks.

@eriktrom
Copy link
Contributor Author

eriktrom commented Aug 9, 2017

closing in favor of a root cause analysis fix

@eriktrom eriktrom closed this Aug 9, 2017
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.

hasMany association with links causes backtracking re-render error
3 participants