Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Plugin Load Timing Out #1103

Closed
marstr opened this issue Jun 13, 2018 · 4 comments
Closed

Plugin Load Timing Out #1103

marstr opened this issue Jun 13, 2018 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@marstr
Copy link
Contributor

marstr commented Jun 13, 2018

Steps to Reproduce the Problem

Please describe in painful detail what you did (so others can play along with you) to get to this point. This includes things like the exact command(s) you used, or the curl command you used, that sort of thing.

  1. Develop on Windows
  2. Work in an office with a despotic and ridiculous IT department, that enforces super invasive scanning everytime one runs a program.
  3. Install a Buffalo Plugin
  4. Run any buffalo command.

Expected Behavior

Plugins should all load as expected.

Actual Behavior

Plugins sometimes take more than a second to load, and Buffalo gives up on them. I've modified my local copy of buffalo to timeout after 10 seconds, and plugins always load. When I added a test to see how long it took, most plugins loaded in about 1.5 seconds.

What I'd like to see is a way to parameterize how long before I give up on loading plugins. I can submit a PR to fix this.

Info

Please run buffalo info and paste the information below where it says "PASTE_HERE".

(I know, I know, I'll upgrade to v0.12.* later today)

?[31mERRO?[0m[0001] [PLUGIN] error loading plugin D:\Users\marstr\go\bin\buffalo-azure.exe: exit status 1

?[31mERRO?[0m[0002] [PLUGIN] error loading plugin D:\Users\marstr\go\bin\buffalo-goth.exe: exit status 1

Buffalo Version

v0.11.0

App Information

Pwd=D:\Users\marstr\go\src\github.com\gobuffalo\buffalo
Root=D:\Users\marstr\go\src\github.com\gobuffalo\buffalo
GoPath=D:\Users\marstr\go
Name=buffalo
Bin=bin\buffalo.exe
PackagePkg=github.com/gobuffalo/buffalo
ActionsPkg=github.com/gobuffalo/buffalo/actions
ModelsPkg=github.com/gobuffalo/buffalo/models
GriftsPkg=github.com/gobuffalo/buffalo/grifts
VCS=git
WithPop=false
WithDep=true
WithWebpack=false
WithYarn=false
WithDocker=true
WithGrifts=true

Go Version

go version go1.9.2 windows/amd64

Go Env

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\Users\marstr\go
set GORACE=
set GOROOT=C:\Program Files\Go
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\marstr\AppData\Local\Temp\go-build365257475=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config

Node Version

v8.9.1

NPM Version

5.7.1

╭─────────────────────────────────────╮
│ │
│ Update available 5.5.1 → 6.1.0 │
│ Run npm i -g npm to update │
│ │
╰─────────────────────────────────────╯

Yarn Version

1.6.0

PostgreSQL Version

PostgreSQL Not Found

MySQL Version

MySQL Not Found

SQLite Version

SQLite Not Found

Dep Version

dep:
version : devel
build date :
git hash :
go version : go1.9.2
go compiler : gc
platform : windows/amd64
features : ImportDuringSolve=false

Dep Status

@markbates
Copy link
Member

markbates commented Jun 13, 2018

What is your BUFFALO_PLUGIN_PATH set to? If it’s not set, it scans your PATH, I believe, which can be really slow. Try setting it something like GOPATH/bin and see if that helps.

@marstr
Copy link
Contributor Author

marstr commented Jun 13, 2018

Oooh, that's a good tip. That may be a good way to unblock me in the short-term. Thanks!

Okay if I still submit a PR to parameterize the plugin load timeout duration?

edit: My BUFFALO_PLUGIN_PATH is unset at the moment.

@markbates
Copy link
Member

Absolutely, go for it! Keep the default time really short 2-3s I think.

@marstr
Copy link
Contributor Author

marstr commented Jun 13, 2018

Yep, I'll keep the default where it's at of 1 second. :) I'm not about that slow-everybody down life.

marstr added a commit to marstr/buffalo that referenced this issue Jun 13, 2018
Doing so lets users configure how long buffalo will wait while trying to
load a plugin. In particular, this is helping on my box where security
policies are setup in a manner that frequently has plugins taking 1.5
seconds to load.

Fixes gobuffalo#1103
marstr added a commit to marstr/buffalo that referenced this issue Jun 13, 2018
Doing so lets users configure how long buffalo will wait while trying to
load a plugin. In particular, this is helping on my box where security
policies are setup in a manner that frequently has plugins taking 1.5
seconds to load.

Fixes gobuffalo#1103
@stanislas-m stanislas-m added the enhancement New feature or request label Jun 15, 2018
marstr added a commit to marstr/buffalo that referenced this issue Jun 25, 2018
Doing so lets users configure how long buffalo will wait while trying to
load a plugin. In particular, this is helping on my box where security
policies are setup in a manner that frequently has plugins taking 1.5
seconds to load.

Fixes gobuffalo#1103
markbates pushed a commit that referenced this issue Jun 27, 2018
* Adding "BUFFALO_PLUGIN_TIMEOUT" option.

Doing so lets users configure how long buffalo will wait while trying to
load a plugin. In particular, this is helping on my box where security
policies are setup in a manner that frequently has plugins taking 1.5
seconds to load.

Fixes #1103

* Refactoring to be more idiomatic/testable.

Also adding a test.

* Updating documenation

* Fixing typo

* Formatting test file.

* Taking advantage of testify

* Improving error message
markbates pushed a commit that referenced this issue Jul 4, 2018
* Adding "BUFFALO_PLUGIN_TIMEOUT" option.

Doing so lets users configure how long buffalo will wait while trying to
load a plugin. In particular, this is helping on my box where security
policies are setup in a manner that frequently has plugins taking 1.5
seconds to load.

Fixes #1103

* Refactoring to be more idiomatic/testable.

Also adding a test.

* Updating documenation

* Fixing typo

* Formatting test file.

* Taking advantage of testify

* Improving error message
markbates added a commit that referenced this issue Jul 15, 2018
* Migrate server.go logger to the app one instead of logrus (#1107)

* upgraded the default node-sass to work on node 10 (#1108)

* vgo

* Add txt for templates (#1117)

Had `text` now can do the same thing for `txt`

* keep toml simple

* remove whitespace in webpack.config.js (#1120)

* removed packr files rebase

* fix contrib guide list (#1129)

* Make the --config flag of *buffalo new* command use the config file (#1119)

* Make the --config flag of *buffalo new* command use the config file

* Remove dead code

* Add --skip-config flag and error if can't use the file passed to --config

* Add example to README

* added godoc documentation for tokenauth usage (#1060)

* Adding "BUFFALO_PLUGIN_TIMEOUT" option. (#1104)

* Adding "BUFFALO_PLUGIN_TIMEOUT" option.

Doing so lets users configure how long buffalo will wait while trying to
load a plugin. In particular, this is helping on my box where security
policies are setup in a manner that frequently has plugins taking 1.5
seconds to load.

Fixes #1103

* Refactoring to be more idiomatic/testable.

Also adding a test.

* Updating documenation

* Fixing typo

* Formatting test file.

* Taking advantage of testify

* Improving error message

* fixes a regress bootstrap version (#1143)

* Replace assets map Mutex with a RWMutex (#1146)

Once the assets map is loaded, it shouldn't change often. So, soften the read
access makes sense (and won't block rendering).

* automatically respond with a 404 if error is sql.ErrNoRows
@markbates markbates added this to the v0.12.4 milestone Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants