Ottomata has submitted this change and it was merged.

Change subject: Outputting integers in python settings.py for metrics api
......................................................................


Outputting integers in python settings.py for metrics api

Change-Id: I241a8bb03abb5f6efdf1fae68149fb3dde69cb27
---
M manifests/misc/statistics.pp
M templates/misc/e3-metrics.settings.py.erb
2 files changed, 8 insertions(+), 8 deletions(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index c0172c4..0ced104 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -259,45 +259,45 @@
                        'user'   =>  $passwords::mysql::metrics::user,
                        'passwd' =>  $passwords::mysql::metrics::pass,
                        'host'   =>  'db1047.eqiad.wmnet',
-                       'port'   =>  '3306',
+                       'port'   =>  3306,
                        'db'     =>  'prod',
                },
                'cohorts' =>  {
                        'user'   =>  $passwords::mysql::research_prod::user,
                        'passwd' =>  $passwords::mysql::research_prod::pass,
                        'host'   =>  'db1047.eqiad.wmnet',
-                       'port'   =>  '3306',
+                       'port'   =>  3306,
                        'db'     =>  'prod',
                },
                's1'      =>  {
                        'user'   =>   $passwords::mysql::research::user,
                        'passwd' =>   $passwords::mysql::research::pass,
                        'host'   =>  's1-analytics-slave.eqiad.wmnet',
-                       'port'   =>   '3306',
+                       'port'   =>   3306,
                },
                's2'      =>  {
                        'user'   =>   $passwords::mysql::research::user,
                        'passwd' =>   $passwords::mysql::research::pass,
                        'host'   =>  's2-analytics-slave.eqiad.wmnet',
-                       'port'   =>  '3306',
+                       'port'   =>  3306,
                },
                's3'      =>  {
                        'user'   =>   $passwords::mysql::research::user,
                        'passwd' =>   $passwords::mysql::research::pass,
                        'host'   =>  's3-analytics-slave.eqiad.wmnet',
-                       'port'   =>  '3306',
+                       'port'   =>  3306,
                },
                's4'      =>  {
                        'user'   =>   $passwords::mysql::research::user,
                        'passwd' =>   $passwords::mysql::research::pass,
                        'host'   =>  's4-analytics-slave.eqiad.wmnet',
-                       'port'   =>  '3306',
+                       'port'   =>  3306,
                },
                's5'      =>  {
                        'user'   =>   $passwords::mysql::research::user,
                        'passwd' =>   $passwords::mysql::research::pass,
                        'host'   =>  's5-analytics-slave.eqiad.wmnet',
-                       'port'   =>  '3306',
+                       'port'   =>  3306,
                },
        }
 
diff --git a/templates/misc/e3-metrics.settings.py.erb 
b/templates/misc/e3-metrics.settings.py.erb
index 85e1d4f..b6ddcab 100644
--- a/templates/misc/e3-metrics.settings.py.erb
+++ b/templates/misc/e3-metrics.settings.py.erb
@@ -22,7 +22,7 @@
 <% mysql_connections.keys.sort.each do |name| -%>
     <%= "'#{name}'" %>: {
 <% mysql_connections[name].keys.sort.each do |key| -%>
-        <%= "'#{key}': '#{mysql_connections[name][key]}'," %>
+        <%= "'#{key}'" %>: <%= (mysql_connections[name][key] =~ /^d+$/) ? 
mysql_connections[name][key] : "'#{mysql_connections[name][key]}'" %>,
 <% end # connection..each -%>
     },
 <% end # mysql_connections..each -%>

-- 
To view, visit https://gerrit.wikimedia.org/r/53507
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I241a8bb03abb5f6efdf1fae68149fb3dde69cb27
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata <o...@wikimedia.org>
Gerrit-Reviewer: Ottomata <o...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to