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

Static asset compilation for Consul UI #1543

Merged
merged 5 commits into from
Dec 25, 2015
Merged

Static asset compilation for Consul UI #1543

merged 5 commits into from
Dec 25, 2015

Conversation

ryanuber
Copy link
Member

Adds the static web assets into the Consul binary with an explicit flag required to enable.
Thanks to @rgl for prior art in #1274.

@slackpad
Copy link
Contributor

Code LGTM but the build failure looks related to this change:

--- FAIL: TestEnableWebUI (0.13s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x7e904e]
goroutine 6499 [running]:
testing.tRunner.func1(0xc82150c5a0)
    /usr/local/go/src/testing/testing.go:450 +0x171
github.com/elazarl/go-bindata-assetfs.(*AssetFS).Open(0xc821e0bef0, 0xc82164e2b0, 0xf, 0x0, 0x0, 0x0, 0x0)
    /home/travis/gopath/src/github.com/elazarl/go-bindata-assetfs/assetfs.go:148 +0x22e
net/http.serveFile(0x2b9f5b923f80, 0xc821f980a0, 0xc8217a9880, 0x2b9f5b954b88, 0xc821e0bef0, 0xdfd190, 0x1, 0xdfd201)
    /usr/local/go/src/net/http/fs.go:394 +0x5b1
net/http.(*fileHandler).ServeHTTP(0xc821f79860, 0x2b9f5b923f80, 0xc821f980a0, 0xc8217a9880)
    /usr/local/go/src/net/http/fs.go:483 +0x19c
net/http.StripPrefix.func1(0x2b9f5b923f80, 0xc821f980a0, 0xc8217a9880)
    /usr/local/go/src/net/http/server.go:1455 +0x1a5
net/http.HandlerFunc.ServeHTTP(0xc821e0bf20, 0x2b9f5b923f80, 0xc821f980a0, 0xc8217a9880)
    /usr/local/go/src/net/http/server.go:1422 +0x3a
net/http.(*ServeMux).ServeHTTP(0xc821e0bec0, 0x2b9f5b923f80, 0xc821f980a0, 0xc8217a9880)
    /usr/local/go/src/net/http/server.go:1699 +0x17d
github.com/hashicorp/consul/command/agent.TestEnableWebUI.func1(0xc8220967d0)
    /home/travis/gopath/src/github.com/hashicorp/consul/command/agent/http_test.go:642 +0x291
github.com/hashicorp/consul/command/agent.httpTestWithConfig(0xc82150c5a0, 0xc822091f30, 0xf9a880)
    /home/travis/gopath/src/github.com/hashicorp/consul/command/agent/http_test.go:693 +0x132
github.com/hashicorp/consul/command/agent.TestEnableWebUI(0xc82150c5a0)
    /home/travis/gopath/src/github.com/hashicorp/consul/command/agent/http_test.go:650 +0x45
testing.tRunner(0xc82150c5a0, 0x1297db8)
    /usr/local/go/src/testing/testing.go:456 +0x98
created by testing.RunTests
    /usr/local/go/src/testing/testing.go:561 +0x86d

@ryanuber
Copy link
Member Author

Huh... I had checked out go-bindata-assetfs a while back. Upon updating I see this problem locally. Seems related to elazarl/go-bindata-assetfs#23

@ryanuber
Copy link
Member Author

I fixed this, just needed to re-generate the assets, but now I'm getting some really scary test failures from inside the state store and all over the place. I'll try pushing this through travis a few more times and see what we get.

@ryanuber
Copy link
Member Author

Test failures are now unrelated to this so going to merge this in.

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.

2 participants