Lcarr has submitted this change and it was merged.
Change subject: Sort channels and logs before making config lines from them
......................................................................
Sort channels and logs before making config lines from them
Puppet doesn't ensure that array/list orders are preserved
between runs, so each run of puppet has the potential to
generate different output.
This caused ircecho to flap every time puppet was run since
it detected new config.
Bug: 46312
Change-Id: I288e9b0e6834e77a84517aea521db2ca9c804d12
---
M templates/ircecho/default.erb
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Jeremyb: Looks good to me, but someone else must approve
Lcarr: Looks good to me, approved
jenkins-bot: Verified
diff --git a/templates/ircecho/default.erb b/templates/ircecho/default.erb
index ed7112a..7b58384 100644
--- a/templates/ircecho/default.erb
+++ b/templates/ircecho/default.erb
@@ -10,7 +10,7 @@
channels = channels.map {|channel| channel.sub(/^#?/,'#') }
# join all channels to a single string. separate them w/ commas
- channels = channels.join(",")
+ channels = channels.sort.join(",")
# join the log name and (the already joined) channel list.
separate them w/ a colon
"#{log}:#{channels}"
@@ -18,7 +18,7 @@
# join the whole list of logs to one big string.
# separate each log from the next with a semicolon.
- logs = logs.join(";")
+ logs = logs.sort.join(";")
return logs
end
@@ -34,7 +34,7 @@
channels = channels.uniq
# join all channels to a single string. separate them w/ commas
- channels = channels.join(",")
+ channels = channels.sort.join(",")
return channels
end
--
To view, visit https://gerrit.wikimedia.org/r/54681
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I288e9b0e6834e77a84517aea521db2ca9c804d12
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Demon <[email protected]>
Gerrit-Reviewer: Jeremyb <[email protected]>
Gerrit-Reviewer: Lcarr <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits