Ditch Gitlab::Geo::LogCursor::Daemon::VERSION
I was trying this command while working on https://gitlab.com/gitlab-org/gitlab-ee/issues/10806, but I got this error:
/opt/gitlab/embedded/bin/ruby /opt/gitlab/embedded/service/gitlab-rails/bin/geo_log_cursor --version
Traceback (most recent call last):
10: from /opt/gitlab/embedded/service/gitlab-rails/bin/geo_log_cursor:39:in `<main>'
9: from /opt/gitlab/embedded/service/gitlab-rails/bin/geo_log_cursor:32:in `parse'
8: from /opt/gitlab/embedded/lib/ruby/2.5.0/optparse.rb:1648:in `parse!'
7: from /opt/gitlab/embedded/lib/ruby/2.5.0/optparse.rb:1626:in `permute!'
6: from /opt/gitlab/embedded/lib/ruby/2.5.0/optparse.rb:1532:in `order!'
5: from /opt/gitlab/embedded/lib/ruby/2.5.0/optparse.rb:1538:in `parse_in_order'
4: from /opt/gitlab/embedded/lib/ruby/2.5.0/optparse.rb:1538:in `catch'
3: from /opt/gitlab/embedded/lib/ruby/2.5.0/optparse.rb:1552:in `block in parse_in_order'
2: from /opt/gitlab/embedded/service/gitlab-rails/bin/geo_log_cursor:25:in `block in parse'
1: from /opt/gitlab/embedded/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/opt/gitlab/embedded/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- /opt/gitlab/embedded/service/gitlab-rails/bin/../lib/gitlab/geo/log_cursor/daemon (LoadError)
That command is broken, for several reasons (which aren't really important at this point). When it would work, it would return:
0.2.0
TBH, I have no idea what this number means. And it was bumped last more than a year ago: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3305/diffs#4851d9919a9f16a875e1db6585c817ba192d9def_7_5
While the fixes are pretty easy, I was wondering: why bother? What do we want to accomplish for having a version number in this daemon? Since most of the code is in the rails codebase, we already have the version of the whole rails app? Or is this not the case when running in k8s?
So I'm suggesting to remove the existence of that version completely. Or if not, we need a clear policy when the version should get bumped, major and minor...