Skip to content

Introduce API to get Heptapod-specific version information

Fixes #599 (closed)

This is a simple implementation, the GitLab version API call is more complex. It can be edited if wanted.

NB: to make this run, I had to add this patch or it would complain about Gitlab::Database::LoadBalancing::RackMiddleware::Sticking::STICK_OBJECT being not found, but this is unrelated to my change:

diff -r d256885afb1b lib/gitlab/database/load_balancing/sticking.rb
--- a/lib/gitlab/database/load_balancing/sticking.rb	Sun Dec 26 15:47:20 2021 +0100
+++ b/lib/gitlab/database/load_balancing/sticking.rb	Tue Jan 04 16:41:18 2022 +0100
@@ -27,8 +27,8 @@
         def stick_or_unstick_request(env, namespace, id)
           unstick_or_continue_sticking(namespace, id)
 
-          env[RackMiddleware::STICK_OBJECT] ||= Set.new
-          env[RackMiddleware::STICK_OBJECT] << [@model, namespace, id]
+          env[Gitlab::Database::LoadBalancing::RackMiddleware::STICK_OBJECT] ||= Set.new
+          env[Gitlab::Database::LoadBalancing::RackMiddleware::STICK_OBJECT] << [@model, namespace, id]
         end
 
         # Sticks to the primary if a write was performed.

Merge request reports