These are chat archives for reactioncommerce/reaction

5th
Oct 2017
Benno
@btotheenno
Oct 05 2017 10:08
hey everyone!
what is the best way to setup shop defaults for timezone, currencies, languages, enabled plugins etc ?
as i saw that plugins are configured in /private/settings/reaction.json and timezone, currencies are configured in the shop schema..
Josh Cox
@joshuacox
Oct 05 2017 15:16
@jshimko I suspect meteor caching is giving false sucesses on your circleCI, can you set up another circleCI account and test making a fresh reaction?
i have very consistent failures with >meteor 1.5.1 in just about everywhwere I can test reactioncommerce/reaction#3023
Jeremy Shimko
@jshimko
Oct 05 2017 15:20
I can take a look when I have a few mins. FWIW, I have consistent success on every machine I build on. Fresh clone of Reaction on Mac, Linux, local, GitlabCI, Circle, etc. I know this is a real problem that several people are having, but I can’t seem to reliably reproduce it.
Josh Cox
@joshuacox
Oct 05 2017 15:21
Notice in that gihub issue I have an exact commit that fails for me, yet passes for reaction's CI so far as Iknow there are no differences (in code, env vars have my dockerhub creds)
when you say 'fresh clone` are you rebuilding npm etc? I mean with no previous reaction directory and no caches on a fresh machine?
Jeremy Shimko
@jshimko
Oct 05 2017 15:23
I can git clone reaction, cd into it, and run docker build
Josh Cox
@joshuacox
Oct 05 2017 15:23
docker build? or reaction build x?
Jeremy Shimko
@jshimko
Oct 05 2017 15:24
they’re technically the same thing, but when you’re debugging a build problem, I recommend removing any unnecessary middleman (reaction-cli in this case)
reaction build mything === docker build -t mything .
Josh Cox
@joshuacox
Oct 05 2017 15:25
the circleCI stuff I have posted is using the default .circleci which I is using docker build I believe
Jeremy Shimko
@jshimko
Oct 05 2017 15:26
yep
Josh Cox
@joshuacox
Oct 05 2017 15:26
I'll give that a try on my gauntlet of machines, but the cirlceci and travis ci builds are all failing for me above 1.5.1
FWIW the machine I have from August builds, everything I built last month exhibits this issue
Jeremy Shimko
@jshimko
Oct 05 2017 15:45
Another note… there is no cached Meteor in a Docker build. It downloads everything from scratch every time
Meteor is cached for the test env in Circle, but it gets downloaded every time once the docker build starts
CF
@ChenfengLiu
Oct 05 2017 16:09
Hi reaction team, I'm trying to build a landing page for my shop. This might be a stupid question, but I just couldn't figure out what is the path to reference a background image (using Reactjs). I stored my image in /import/plugins/custom/my-plugin/client/assets/img.jpg
    let bgURL = "/assets/orange-background-2.jpg";
    const welcomeBanner = {
      display: 'flex',
      height: '70vh',
      backgroundImage: 'url('+ bgURL + ') noRepeat center center fixed',
    };
Please help~
CF
@ChenfengLiu
Oct 05 2017 16:23
Just figured it out, I stored the image in /public/resources and used Meteor.absoluteUrl() + "resources/img.jpg";
CF
@ChenfengLiu
Oct 05 2017 16:39
And I'm really struggling with implementing a custom UI for the shop. It takes about 3 minutes for the browser to refresh every time I make some change (because i'm using my laptop)...
Does anyone have tricks on how to make this process faster? (like Heroku? or make a slim version of reaction?)
I imagine every customer of Reaction would have to create their own custom landing page plugin. Is there a way to make this more convenient?
Santiago Botta
@sgobotta
Oct 05 2017 18:31
Do you wait for server/client changes or you just re-run the whole app?
CF
@ChenfengLiu
Oct 05 2017 19:33
I wait for changes. Re-run the whole app usually takes me about 6 - 10 min.
@sgobotta
Santiago Botta
@sgobotta
Oct 05 2017 19:36
Uhm, i assume you let the app build when it automatically detects changes on either client or server files. It may be related to your hardware, it usually takes around 20-30 seconds to me. Though the first time I run reaction i have to wait between 3 - 4.30 minutes until it builds
@ChenfengLiu
CF
@ChenfengLiu
Oct 05 2017 19:43
It's probably the hardware. I'm using a 4-year-old thinkpad laptop with i7 (dual core), 16G ram...
Is there any other way to speed this up? @sgobotta
Santiago Botta
@sgobotta
Oct 05 2017 19:47
Well, I'm not sure. Im using the same configuration you have. What about the drive? I've got a 128gb ssd
Michael Ermer
@MichaelErmer
Oct 05 2017 19:48
off topic, is there a way to stop glitter from using the dedicated gpu on a macbook?
CF
@ChenfengLiu
Oct 05 2017 19:51
@sgobotta I'm using a hard drive... T-T
Michael Ermer
@MichaelErmer
Oct 05 2017 19:52
it takes very long (1-2min) for me too, on the latest macbook pro
Josh Cox
@joshuacox
Oct 05 2017 20:36
@jshimko what else could be different between my build at circleCI and reaction's build?
seeing as how I'm pushing the exact same commits and getting different results?
@ChenfengLiu I dev inside of a ramdisk, this speeds things up a bit (but not as much as you'd hope)
Josh Cox
@joshuacox
Oct 05 2017 20:44
@jshimko can I get an explanation of what these lines are doing? If not restoring meteor cache?
Jeremy Shimko
@jshimko
Oct 05 2017 20:45
that’s restoring Meteor cache in the Circle test environment, not inside the Docker build
because we run meteor test before building the docker image
Josh Cox
@joshuacox
Oct 05 2017 20:46
well I'm assuming my circleCI does not have that same cache
Jeremy Shimko
@jshimko
Oct 05 2017 20:46
but the error happens inside the container, so that should be irrelevant
Josh Cox
@joshuacox
Oct 05 2017 20:47
have you tried making a fresh CI account?
so you’re not crazy
actually, that is in the Meteor test and not the Docker build
so the cache is relevant at that point
Josh Cox
@joshuacox
Oct 05 2017 20:48
ok, well that makes me feel better, I'm going to dig out all the binary analysis tricks in my toolbox tonight
IDA pro included
I don't know what else to do
Jeremy Shimko
@jshimko
Oct 05 2017 20:50
So it's clearly something that’s happening while building npm modules from scratch. And our restored Meteor/node_modules cache is what allows the build to only build the modules that have changed since the last run. So that explains it at least a little.
Josh Cox
@joshuacox
Oct 05 2017 20:51
ya and gridfs is usually the last thing before the coredump
Daniel Honig
@dhonig
Oct 05 2017 20:51
You know
Jeremy Shimko
@jshimko
Oct 05 2017 20:51
Maybe try adding the TOOL_NODE_FLAGS="--max-old-space-size=4096" before the reaction test command
Daniel Honig
@dhonig
Oct 05 2017 20:51
that was happening with a local build on Manjaro/Arch
not yet even with docker
then I added the 4096 argument and I think it worked after that
its unclear to me if the argument was really required
Josh Cox
@joshuacox
Oct 05 2017 20:53
ya I've tested 1024, 2048, 4096, 9096, and 14096 to no effect locally on my broken machine
Jeremy Shimko
@jshimko
Oct 05 2017 21:40
@joshuacox Solved.
jshimko/reaction@1b45cdb
https://circleci.com/gh/jshimko/reaction/3
Josh Cox
@joshuacox
Oct 05 2017 22:22
hooray! looks like jshimko/reaction@1b45cdb? was it, let me try here
Daniel Honig
@dhonig
Oct 05 2017 22:56
Ok back from hell installing an SSL cert to cloudfront
@joshuacox @jshimko that's rad
What is the change that fixed this @jshimko ?
  • TOOL_NODE_FLAGS: "--max-old-space-size=4096"
so now we know about that one
Josh Cox
@joshuacox
Oct 05 2017 23:18
Ya at least for circleci.com it looks like that number needs to be tweaked for each builder
@jshimko cheers!
Jeremy Shimko
@jshimko
Oct 05 2017 23:20
yep, 4096 on circle and 2048 on my macbook have been working for months
and 2048 on gitlab-ci