Workhorse template uses deprecated slice function incompatible with gomplate v5 shipped in 18.9.x CNG images

Summary

GitLab 18.9.0 and 18.9.1 ship CNG images containing gomplate v5.0.0, but the chart templates on the 8-9-stable release branch still use the deprecated slice function alias (removed in gomplate v5). This causes workhorse pods to crash-loop on startup with:

cannot index slice/array with type string

The fix (commit d4272e4e) was merged to master on Feb 20, but was not backported to 8-9-stable before the 18.9.1 release on Feb 24.

Steps to reproduce

  1. Deploy GitLab 18.9.0 or 18.9.1 using the GitLab Helm Chart (or GitLab Operator) with object storage configured
  2. Observe workhorse pods crash-looping

Configuration used

Any configuration using consolidated object storage with a supported provider (AWS, AzureRM, or Google) will trigger this.

Current behavior

The workhorse ConfigMap template at charts/gitlab/charts/webservice/templates/_helpers.tpl on the 8-9-stable branch contains:

{%- $supported_providers := slice "AWS" "AzureRM" "Google" -%}

gomplate v5.0.0 (shipped in the 18.9.x CNG images since CNG commit 898bd871, Feb 17) removed the slice alias. In v5, slice resolves to Go's built-in text/template slice function, which expects an array and index arguments, not individual strings. This produces the error cannot index slice/array with type string.

Expected behavior

The template should use coll.Slice (available since gomplate v3.2.0) which is compatible with both gomplate v4.x and v5.x:

{%- $supported_providers := coll.Slice "AWS" "AzureRM" "Google" -%}

This fix already exists on master (commit d4272e4e) and needs to be backported to 8-9-stable for an 18.9.2 patch release.

Timeline

Date Event
Feb 17 CNG Renovate Bot bumps gomplate v4.3.2 → v5.0.0
Feb 18 Chart 9.9.0 released (GitLab 18.9.0) — 8-9-stable branch still has slice
Feb 20 slicecoll.Slice fix merged to master
Feb 24 Chart 9.9.1 released (GitLab 18.9.1) — fix still not on 8-9-stable

Versions

  • Chart: 9.9.0 / 9.9.1 (8-9-stable branch)
  • CNG gomplate: v5.0.0
  • Affects both Helm Chart and GitLab Operator deployments

Operator note

Customers using the GitLab Operator cannot work around this by manually editing the ConfigMap, as the operator reconciles ConfigMaps via ownerReferences and will overwrite manual changes on the next reconciliation cycle.