Skip to content

Add cell specific dependencies to cell related config tasks

Peter Leitzen requested to merge pl-cell-deps into main

What does this merge request do and why?

Prior this commit running rake gitlab-topology-service/config.toml did not regenerate the config if cell manager code has changed.

Usually, it's sufficient to check if gdk.yml and config templates changed but since cell manager is tweaking cell config we need to check this file as well. Same for cell port manager.

Refs !4143 (comment 2177730715)

How to set up and validate locally

  1. Checkout main
  2. Run rake gitlab-topology-service/config.toml gitlab-http-router/wrangler.gdk.toml: Potential changes - ignore them.
  3. Run rake gitlab-topology-service/config.toml gitlab-http-router/wrangler.gdk.toml again - No changes
  4. Change cell manager like:
diff --git a/lib/cell_manager.rb b/lib/cell_manager.rb
index 283473fbf..24b24c86c 100644
--- a/lib/cell_manager.rb
+++ b/lib/cell_manager.rb
@@ -165,6 +165,8 @@ class CellManager
     yaml = main_gdk_config_yaml.merge(cell_instance_config(cell))
 
     config = cell_config_for(cell_gdk_root, cell_gdk_config_path, yaml)
+    config.bury!('gitlab.rails.session_store.session_cookie_token_prefix', 'abcd')
+    main_gdk_config.bury!('gitlab_http_router.gitlab_rules_config', 'xyz')
     config.bury_multiple!(
       'cells.port_offset' => port_offset_for(cell.__index),
       'cells.enabled' => false,
  1. Run rake gitlab-topology-service/config.toml gitlab-http-router/wrangler.gdk.toml again - No changes 💥
  2. Switch to this branch
  3. Run rake gitlab-topology-service/config.toml gitlab-http-router/wrangler.gdk.toml - changes
  4. Reset applied changes via git reset --hard
  5. Run rake gitlab-topology-service/config.toml gitlab-http-router/wrangler.gdk.toml - changes

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Peter Leitzen

Merge request reports

Loading