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

shopId not available when fixtures are loaded #2313

Closed
brent-hoover opened this issue May 19, 2017 · 3 comments
Closed

shopId not available when fixtures are loaded #2313

brent-hoover opened this issue May 19, 2017 · 3 comments
Assignees
Labels
bug For issues that describe a defect or regression in the released software

Comments

@brent-hoover
Copy link
Collaborator

Expected behavior

Shop should be loaded before all other fixtures so that every record that requires a shopId (which is almost all of them) can use it

Actual Behavior

Fixture data is getting loaded with a null for shopId resulting in numerous errors since these records will never be found by the application

One example is #2180

Steps to Reproduce the Behavior

This is the hard part, it appears this error only occurs when running on a remote Docker container (at least I have never been able to reproduce it running a local container).

There have been several attempts to fix this issue but they have all been unsuccessful, which is compounded by the fact that it's hard to verify the bug is actually fixed.

@brent-hoover brent-hoover added the bug For issues that describe a defect or regression in the released software label May 19, 2017
@jshimko
Copy link
Contributor

jshimko commented May 23, 2017

I'm pretty sure this shouldn't be possible after my fix in #2224 (which is merged into development now). The shop fixture is the first thing to load on app startup (before Reaction.init()) and then loading translation fixtures is completely blocked until a shopId exists (translations are loaded in the onCoreInit hook).

So I guess we just need to confirm that anyone that's still experiencing this issue has tried the development branch in the last 13 days.

@jshimko
Copy link
Contributor

jshimko commented Jun 21, 2017

Are we sure this has continued to happen after #2224 was merged? I've never been able to reproduce it, so I'm not sure what to do about it at this point.

I'm also not sure how it's even possible for other fixtures to load before the shopId exists. The fixtures are the first thing that happens on app startup and all secondary fixtures are blocked until the shopId is available. And then Reaction.init() is also blocked until they're done loading. I just don't see how it's still possible without Mongo returning inconsistent results.

@brent-hoover
Copy link
Collaborator Author

For now I am going off the assumption that #2224 has fixed this problem and we can reopen when it's reported again. I would still like to see hello.reactioncommerce.com updated and see if it's still happening there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For issues that describe a defect or regression in the released software
Projects
None yet
Development

No branches or pull requests

2 participants