0.5.0 ERROR Failed to read config error=yaml: unmarshal errors:
ilovezfs opened this issue · 7 comments
The Homebrew test block fails for 0.5.0, but passed for 0.4.5
https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/15124/
Issue description
The test block should pass.
Context
I'm trying to get 0.5.0 green in Homebrew's CI and merged. See Homebrew/homebrew-core#22000.
Possible Solution
Probably we just need to update the test block with some tweak to the config file.
Steps to Reproduce (for bugs)
bash-3.2$ cat test.conf
- "consumer.Profiler":
Enable: true
Runs: 100000
Batches: 100
Characters: "abcdefghijklmnopqrstuvwxyz .,!;:-_"
Message: "%256s"
Stream: "profile"
bash-3.2$ /usr/local/Cellar/gollum/0.5.0/bin/gollum -tc /tmp/gollum-test-20171221-61659-1kkdhlq/test.conf
[2017-12-21 13:54:13 PST] ERROR Failed to read config error=yaml: unmarshal errors:
line 1: cannot unmarshal !!seq into map[string]tcontainer.MarshalMap
bash-3.2$
- brew pull Homebrew/homebrew-core#22000
- brew install -dvs gollum
- brew test -vd gollum
Your Environment
Used versions
- gollum version: 0.5.0
- go version: 1.9.2
- Operating System and version: macOS 10.11, 10.12, 10.13
Config:
- "consumer.Profiler":
Enable: true
Runs: 100000
Batches: 100
Characters: "abcdefghijklmnopqrstuvwxyz .,!;:-_"
Message: "%256s"
Stream: "profile"
The test block runs
test do
(testpath/"test.conf").write <<~EOS
- "consumer.Profiler":
Enable: true
Runs: 100000
Batches: 100
Characters: "abcdefghijklmnopqrstuvwxyz .,!;:-_"
Message: "%256s"
Stream: "profile"
EOS
assert_match "parsed as ok", shell_output("#{bin}/gollum -tc #{testpath}/test.conf")
end
As stated in the release notes the configuration format changed for gollum 0.5.0
Your config should now look like this
Profiler:
Type: consumer.Profiler
Enable: true
Runs: 100000
Batches: 100
Characters: "abcdefghijklmnopqrstuvwxyz .,!;:-_"
Message: "%256s"
Streams: "profile"
also see https://github.com/trivago/gollum/blob/master/config/profile.conf
Also the result of gollum -tc should now be
Testing config testpath/test.conf
Config OK.
bash-3.2$ cat test.conf
Profiler:
Type: consumer.Profiler
Enable: true
Runs: 100000
Batches: 100
Characters: "abcdefghijklmnopqrstuvwxyz .,!;:-_"
Message: "%256s"
Streams: "profile"
bash-3.2$ /usr/local/Cellar/gollum/0.5.0/bin/gollum -tc /tmp/gollum-test-20171221-61985-vge4co/test.conf
Testing config /tmp/gollum-test-20171221-61985-vge4co/test.conf
[2017-12-21 14:05:57 PST] ERROR Configure pass failed. error=No valid producers found
bash-3.2$
Ah - my bad. Please use the file I linked above or take the producer part from it.
P.s.: Additional answers from my side might be delayed until tomorrow morning (CET)
Works! Perfect. Thank you :)
👍 thank you for keeping track of the homebrew package!
You're welcome! :)