These are chat archives for reactioncommerce/reaction

6th
Sep 2016
soyJsus
@soyJSus
Sep 06 2016 01:04
hell
soyJsus
@soyJSus
Sep 06 2016 01:35
Hello, how I can export the products and import them into another site ?
Brent Hoover
@zenweasel
Sep 06 2016 02:50
You can just use the mongo command-line tools
Owen Hoskins
@owenhoskins
Sep 06 2016 13:22
Hey all. I am looking for a way to publish a collection based on having "createProduct" permissions. Is there something along these lines in the Reaction codebase somewhere? I know I can use this.userId in publish functions but looking to utilize in Reaction's roles logic into a publish function.
Brent Hoover
@zenweasel
Sep 06 2016 13:23
I think you want something like if (Roles.userIsInRole(userId, ["admin", "owner"], shopId)) {
Owen Hoskins
@owenhoskins
Sep 06 2016 13:24
Thanks! Will try that out.
Spencer Norman
@spencern
Sep 06 2016 17:15
Noticing that the reaction repo CI has a lot of failed builds because of
curl --retry 10 --retry-delay 5 -v http://localhost
* About to connect() to localhost port 80 (#0)
*   Trying 127.0.0.1... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host

curl --retry 10 --retry-delay 5 -v http://localhost returned exit code 7
We’re also experiencing a bunch of failed builds because of this, what are the ramifications of just removing the curl test from the build?
For us it’s intermittent, and this test will fail sometimes and then on a rebuild it will pass without any changes to code.
Jeremy Shimko
@jshimko
Sep 06 2016 17:25
Well, that’s a slightly complicated answer. That test failing means the app in that particular Docker build is not returning valid HTTP responses. Which means it would also likely fail if you tried to deploy that build (which is often what happens next in the CI pipeline). So yes, the inconsistent stuff on Circle is definitely a headache, but I don’t know that we can confidently remove a test like that one. It’s obviously pretty basic, but it doesn’t get more important than the app actually running. What it comes down to is you could have the app pass all of its JS-based tests, but then the container that gets built (which has a ton of non-Reaction dependencies) could then fail to run.
Spencer Norman
@spencern
Sep 06 2016 17:27
right, ok. That’s what I thought this was doing. Is it likely a Circle issue that is causing the inconsistency?
Jeremy Shimko
@jshimko
Sep 06 2016 17:28
Yeah, I suspect some dependency is failing to install or timing out.
However, that should fail the Docker build itself
which means the curl test would never happen
Spencer Norman
@spencern
Sep 06 2016 17:28
Yeah, that’s the weird part. Our docker build is completing every time
but ~3/4 of our builds the curl test fails
Jeremy Shimko
@jshimko
Sep 06 2016 17:29
It sounds like maybe the container doesn’t want to run on the CI host for some reason.
Probably the best thing you could do to debug is try to catch a build with SSH enabled and then hop in there and do the docker-compose up manually to watch the docker logs as the container starts
Spencer Norman
@spencern
Sep 06 2016 17:31
I’ll try that
3Maestros
@3Maestros
Sep 06 2016 17:32
@mikemurray is there any reason why reaction is not using any kind of UI template such as this http://webapplayers.com/inspinia_admin-v2.5/index.html, they come bundled with some nifty UI elements, I have found this to immensely help with time to market. Your thoughts?
Spencer Norman
@spencern
Sep 06 2016 17:32
should I be able to run the curl test from the shell if it passes correctly?
Jeremy Shimko
@jshimko
Sep 06 2016 17:32
yes
Spencer Norman
@spencern
Sep 06 2016 17:32
:+1:
Jeremy Shimko
@jshimko
Sep 06 2016 17:32
those exact commands from the yaml should work
Spencer Norman
@spencern
Sep 06 2016 17:32
ok, thanks
Jeremy Shimko
@jshimko
Sep 06 2016 17:33
I suppose there’s a chance it’s taking too long to start the app. I hate to make that awful build time longer, but you could try extending the wait. It currently only waits 10 secs before starting the curl’s. It’s probably pretty unlikely to be ready considering a bunch of first boot data still has to get inserted at that point.
And then it only tries 10 times with 5 secs between each.
Spencer Norman
@spencern
Sep 06 2016 17:34
yeah, was considering extending that wait, what’s an extra 30s on an 18 minute build
;)
Jeremy Shimko
@jshimko
Sep 06 2016 17:35
so if the app isn’t ready within 60 secs, it’ll fail.
And that feels totally possible.
Spencer Norman
@spencern
Sep 06 2016 17:35
yeah, it seems like it’s semi dependent on some random variable. How busy a given circle container is, could be the missing piece.
Jeremy Shimko
@jshimko
Sep 06 2016 17:35
yeah
I’d change the initial wait to 30 secs, then up the retry interval to 10 secs.
I bet that does the trick
Spencer Norman
@spencern
Sep 06 2016 17:37
Any thoughts on how to get the shell to report every retry so I can get a feel for how long it’s taking before the build is ready?
Jeremy Shimko
@jshimko
Sep 06 2016 17:37
So…
- docker-compose -f .reaction/docker/docker-compose.test.yml up -d; sleep 30
- curl --retry 10 --retry-delay 10 -v http://localhost
Spencer Norman
@spencern
Sep 06 2016 17:38
yeah
Jeremy Shimko
@jshimko
Sep 06 2016 17:40
well, the -v option is for “verbose”, so I’m not really sure how to make that yell more.
you could make a little bash for loop with an echo in it
sounds gross, but it’d work
Spencer Norman
@spencern
Sep 06 2016 17:41
yeah, :+1: that’s what I was thinking. Will be gross
soyJsus
@soyJSus
Sep 06 2016 20:33
hi
i deploy my app in heroku
soyJsus
@soyJSus
Sep 06 2016 20:38
but no show page,
show page blanck
shis is logs
and consol log chrome :smile:
Error invoking SubsManager.subscribe("Inventory"): Subscription 'Inventory' not found
eabbcd0….js?meteor_js_resource=true:229 BlazeLayout warning: unknown template "coreLayout"
Thanks for any help they can make me