BryanDavis has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/200498

Change subject: Stop pinning jobrunner version with Puppet
......................................................................

Stop pinning jobrunner version with Puppet

Allow jobrunner to clone at the latest HEAD and don't reset it to a fix
hash when Puppet is run. The `vagrant git-update` command already
updates jobrunner, but the pinned version made it toggle back and forth
between HEAD and 5c927f90.

Bug: T92345
Change-Id: Ia69f2135094871d8ebfcdb6df35fff53d4772b0d
---
M puppet/hieradata/common.yaml
M puppet/modules/git/manifests/clone.pp
M puppet/modules/mediawiki/manifests/jobrunner.pp
3 files changed, 15 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/98/200498/1

diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index d1f85a7..6263a09 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -147,8 +147,6 @@
 
 mediawiki::apache::docroot: /var/www
 
-mediawiki::jobrunner::commit: 5c927f9091f446452b9fd7bcb69614c7a7fe6eff
-
 mediawiki::multiwiki::base_domain: '.wiki.local.wmftest.net'
 mediawiki::multiwiki::script_dir: "%{hiera('mediawiki::apache::docroot')}/w"
 mediawiki::multiwiki::settings_root: 
"%{hiera('mediawiki::settings_dir')}/wikis"
diff --git a/puppet/modules/git/manifests/clone.pp 
b/puppet/modules/git/manifests/clone.pp
index 95c7a97..7c55b8d 100644
--- a/puppet/modules/git/manifests/clone.pp
+++ b/puppet/modules/git/manifests/clone.pp
@@ -19,10 +19,10 @@
 # [*owner*]
 #   User that should own the checked out repository. Git commands will run as
 #   this user so the user must have the ability to create the target
-#   directory. Default 'vagrant'.
+#   directory. Default $::share_owner.
 #
 # [*group*]
-#   Group that should own the checked out repostory. Default 'vagrant'.
+#   Group that should own the checked out repostory. Default $::share_group.
 #
 # [*ensure*]
 #   What state the clone should be in. Valid values are `present` and
@@ -48,8 +48,8 @@
     $directory,
     $branch             = undef,
     $remote             = undef,
-    $owner              = 'vagrant',
-    $group              = 'vagrant',
+    $owner              = $::share_owner,
+    $group              = $::share_group,
     $ensure             = 'present',
     $depth              = $::git::default_depth,
     $recurse_submodules = true,
@@ -88,6 +88,15 @@
         timeout     => 0,
     }
 
+    if (!defined(File[$directory])) {
+        file { $directory:
+            ensure => 'directory',
+            owner  => $owner,
+            group  => $group,
+            before => Exec["git_clone_${title}"],
+        }
+    }
+
     if $ensure == 'latest' {
         exec { "git_pull_${title}":
             command  => "git pull ${arg_recurse} ${arg_depth}",
diff --git a/puppet/modules/mediawiki/manifests/jobrunner.pp 
b/puppet/modules/mediawiki/manifests/jobrunner.pp
index 7e9fef6..adbb105 100644
--- a/puppet/modules/mediawiki/manifests/jobrunner.pp
+++ b/puppet/modules/mediawiki/manifests/jobrunner.pp
@@ -3,20 +3,12 @@
 # jobrunner continuously processes the MediaWiki job queue by dispatching
 # workers to perform tasks and monitoring their success or failure.
 #
-# === Parameters
-#
-# [*commit*]
-#   Git commit to install.
-#
-class mediawiki::jobrunner(
-    $commit,
-) {
+class mediawiki::jobrunner {
     include ::mediawiki
     require ::mediawiki::multiwiki
 
-    git::install { 'mediawiki/services/jobrunner':
+    git::clone { 'mediawiki/services/jobrunner':
         directory => '/srv/jobrunner',
-        commit    => $commit,
         before    => Service['jobrunner'],
     }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia69f2135094871d8ebfcdb6df35fff53d4772b0d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <bda...@wikimedia.org>

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

Reply via email to