Closed juanpedrojose closed 8 months ago
hmm how did my integrations not catch it :thinking:
ah I know! The template is not enabling the web UI. I should alter the setup flow. There is no need to change anything in the framework. Look at the end of karafka.rb:
# Karafka now features a Web UI!
# Visit the setup documentation to get started and enhance your experience.
#
# https://karafka.io/docs/Web-UI-Getting-Started
#
# Karafka::Web.enable!
if you uncomment the last line things work as expected. So the expected flow here is:
$ rails new testapp
$ cd testapp
$ bundle add karafka --version ">= 2.3.0"
$ bundle exec karafka install
$ bundle add karafka-web --version ">= 0.8.0"
# uncomment the setup
$ bundle exec karafka-web install
everything works then.
this is why my tests didn't detect it. I enable the web UI.
Web UI should add the web enabled at the end and indeed the current flow is suboptimal. I will today enhance docs to make sure this is documented (to make sure enable is not commented out)
It actually shows a different issue, wrong template is being selected. Fixing
Funny, this will require update to both karafka and karafka-web to fully fix it because:
nonetheless I will make sure that it is handled in web without a karafka release for now
great report!
@juanpedrojose I was able to write integration specs for it. Sorry for the issue :pray:
It is already fixed in master and will be released tomorrow.
I will keep it open until the release just in case someone looks for it
0.8.1 has been released. Specs in karafka were added and pass. Will not happen again. Thank you and sorry :pray:
Both
lib/karafka/web/management/migrator.rb:55
and
lib/karafka/web/management/migrator.rb:62
return a
Hash
with stringified keys while theensure_migrable!
expects symbolized keys for schema version comparison. This results in fails when runningbundle exec karafka-web install
.A possible solution is to change
lib/karafka/web/processing/consumers/state.rb:23
andlib/karafka/web/processing/consumers/metrics.rb:23
fromto
But it's a "dirt" hack rather than a mature solution.
Expected behavior
Actual behavior
Steps to reproduce the problem
Setup details