Skip to content

Commit c7cf830

Browse files
committed
fix(gitlab): ensure stable order in gitlab_rails monitoring_whitelist
The gitlab_rails['monitoring_whitelist'] rendering used a raw list, which does not guarantee element order. This caused non-idempotent behavior and unnecessary diffs between runs. The template now applies `unique | sort` before rendering, ensuring stable and idempotent configuration output. Signed-off-by: Norman Ziegner <n.ziegner@hzdr.de>
1 parent aeab960 commit c7cf830

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roles/gitlab/templates/gitlab.rb.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ gitlab_rails['redis_sentinels'] = [
2828
gitlab_rails['redis_sentinels_password'] = "{{ gitlab_redis_sentinel_password }}"
2929
{% endif %}
3030
{% endif %}
31-
gitlab_rails['monitoring_whitelist'] = [{{ gitlab_rails_monitoring_whitelist | map('to_json') | join(', ') }}]
31+
gitlab_rails['monitoring_whitelist'] = [{{ (gitlab_rails_monitoring_whitelist | list | unique | sort) | map('to_json') | join(', ') }}]
3232

3333
{% if gitlab_use_internal_gitaly %}
3434
{% if not __gitaly_configuration_exists %}

0 commit comments

Comments
 (0)