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

Update to Ember 4.12.2 #1076

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

simonihmig
Copy link
Contributor

@simonihmig simonihmig commented Jan 8, 2024

This updates the website to Ember 4.12.2, including:

  • the app boilerplate and related dependencies by running ember-cli-update
  • updated and deduped transitive deps (due to issues) by regenerating the lockfile (except for axe-core/a11y-testing, which seems to have breaking changes in a minor version update)
  • ember-data to 4.12, including FastBoot fixes (Fastboot Support is Soft Deprecated emberjs/data#8475)
  • fix linting
  • fix an issue with ember-data + prember (see inline comment)

Probably best reviewed by commit...

Copy link

netlify bot commented Jan 8, 2024

Deploy Preview for ember-website ready!

Name Link
🔨 Latest commit b9f495e
🔍 Latest deploy log https://app.netlify.com/sites/ember-website/deploys/65a2d634a7437800099e0e92
😎 Deploy Preview https://deploy-preview-1076--ember-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@simonihmig simonihmig marked this pull request as draft January 8, 2024 22:07
// Under prember this causes `Attempted to call store.adapterFor(), but the store instance has already been destroyed.`
// So wait a bit
return new Promise((resolve) => setTimeout(resolve, 10));
}
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 is an ugly workaround for an issue with ember-data and FastBoot/prember. e-d calls flushAllPendingFetches with setTimeout (which Ember's settledness does not capture, I believe that's the problem), but as the app is torn down immediately after rendering in prember, we are getting:

Assertion Failed: Attempted to call store.adapterFor(), but the store instance has already been destroyed.

I was not really willing to spend much time investigating a "proper" solution, as

  1. the issue might have been resolved in new releases maybe
  2. I think we should actually get rid of e-d here. I'll raise a separate issue to explain my thoughts...

Copy link
Member

Choose a reason for hiding this comment

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

One concern I have is that with the current context in the code comment is that it makes it quite daunting to ever touch this part of the code. Is it possible to link to a bug ticket. (Is this even considered a bug, it seems intentional?) Or state when/how this workaround could be removed.

Removing ED would solve the problem as well, but is out of scope for this PR.

Another alternative could be downgrading Ember Data to 4.11 I assume, if this "issue" got introduced in 4.12?

Copy link
Contributor Author

@simonihmig simonihmig Mar 3, 2024

Choose a reason for hiding this comment

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

I didn't file an issue, because I wouldn't want to do so for a version that is out of date and without knowing that the problem is still present in the most recent one. But also ED has deprecated FastBoot support, so likely that could mean they wouldn't even consider it a bug?

Tbh, I don't really remember what happened when downgrading to ED to 4.11, but I am pretty sure I tried. This work is already two months old, which hits my brain's capacity limit 😅

The path I would be pursuing is to remove ED here, so the code you are concerned with wouldn't be around for too long!

Copy link
Member

Choose a reason for hiding this comment

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

I'm also a bit concerned about this hack being merged 🤔 I accept your intention to potentially remove ember-data since it's such a simple request response mode, but the intention was for the website to be a good simple demonstration of the capabilities in the default Ember blueprint. I think we should dig a bit deeper into this issue and potentially draft some help from the Ember data team especially if this issue is potentially affecting other people relying on ember-data and prember

@simonihmig simonihmig marked this pull request as ready for review January 13, 2024 18:44
@IgnaceMaes
Copy link
Member

Thanks for this!

I wanted to look into upgrading as well and only then noticed you had made a PR already 🎉

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