[MediaWiki-commits] [Gerrit] integration/config[master]: Add php-redis extension to php-mediawiki image
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381931 ) Change subject: Add php-redis extension to php-mediawiki image .. Add php-redis extension to php-mediawiki image Change-Id: I38e903a1ee3511cf02ee3dd4ef5f819296c19217 --- M dockerfiles/php-mediawiki/Dockerfile 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/dockerfiles/php-mediawiki/Dockerfile b/dockerfiles/php-mediawiki/Dockerfile index ad51c7e..3dc5e11 100644 --- a/dockerfiles/php-mediawiki/Dockerfile +++ b/dockerfiles/php-mediawiki/Dockerfile @@ -7,7 +7,7 @@ # Needed for composer to install things from dist php7.0-zip \ # Needed for mediawiki -php-ast php7.0-dba php7.0-mbstring php7.0-xml && \ +php-ast php7.0-dba php7.0-mbstring php-redis php7.0-xml && \ apt-get clean && rm -rf /var/lib/apt/lists/* USER nobody -- To view, visit https://gerrit.wikimedia.org/r/381931 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I38e903a1ee3511cf02ee3dd4ef5f819296c19217 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Hashar Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Output `.env` in docker jobs for ease of debugging
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381930 ) Change subject: Output `.env` in docker jobs for ease of debugging .. Output `.env` in docker jobs for ease of debugging Change-Id: I5118aead7f306872feec9e37ed1beec5d95ab64b --- M jjb/macro-docker.yaml 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/macro-docker.yaml b/jjb/macro-docker.yaml index f7702d3..3b273a0 100644 --- a/jjb/macro-docker.yaml +++ b/jjb/macro-docker.yaml @@ -36,6 +36,9 @@ HOME=/var/lib/jenkins ZUUL +# Finally, output for debugging help +cat .env + # Create a log directory that will be # mounted into a container with --volume - builder: -- To view, visit https://gerrit.wikimedia.org/r/381930 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5118aead7f306872feec9e37ed1beec5d95ab64b Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Hashar Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Output `.env` in docker jobs for ease of debugging
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381930 ) Change subject: Output `.env` in docker jobs for ease of debugging .. Output `.env` in docker jobs for ease of debugging Change-Id: I5118aead7f306872feec9e37ed1beec5d95ab64b --- M jjb/macro-docker.yaml 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/30/381930/1 diff --git a/jjb/macro-docker.yaml b/jjb/macro-docker.yaml index f7702d3..3b273a0 100644 --- a/jjb/macro-docker.yaml +++ b/jjb/macro-docker.yaml @@ -36,6 +36,9 @@ HOME=/var/lib/jenkins ZUUL +# Finally, output for debugging help +cat .env + # Create a log directory that will be # mounted into a container with --volume - builder: -- To view, visit https://gerrit.wikimedia.org/r/381930 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5118aead7f306872feec9e37ed1beec5d95ab64b Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Add php-redis extension to php-mediawiki image
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381931 ) Change subject: Add php-redis extension to php-mediawiki image .. Add php-redis extension to php-mediawiki image Change-Id: I38e903a1ee3511cf02ee3dd4ef5f819296c19217 --- M dockerfiles/php-mediawiki/Dockerfile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/31/381931/1 diff --git a/dockerfiles/php-mediawiki/Dockerfile b/dockerfiles/php-mediawiki/Dockerfile index ad51c7e..3dc5e11 100644 --- a/dockerfiles/php-mediawiki/Dockerfile +++ b/dockerfiles/php-mediawiki/Dockerfile @@ -7,7 +7,7 @@ # Needed for composer to install things from dist php7.0-zip \ # Needed for mediawiki -php-ast php7.0-dba php7.0-mbstring php7.0-xml && \ +php-ast php7.0-dba php7.0-mbstring php-redis php7.0-xml && \ apt-get clean && rm -rf /var/lib/apt/lists/* USER nobody -- To view, visit https://gerrit.wikimedia.org/r/381931 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38e903a1ee3511cf02ee3dd4ef5f819296c19217 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Make sure `composer` is in the path in composer-package image
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381932 ) Change subject: Make sure `composer` is in the path in composer-package image .. Make sure `composer` is in the path in composer-package image Some libraries call "composer validate" as part of their test commands, which relies upon composer being in the path. And set `set -euxo pipefail` to a failure in installing or validation will abort the rest of the script. Change-Id: I3b98300049eee57d6557fb95b2a43f50effceaa7 --- M dockerfiles/composer-package/Dockerfile M dockerfiles/composer-package/run.sh 2 files changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/32/381932/1 diff --git a/dockerfiles/composer-package/Dockerfile b/dockerfiles/composer-package/Dockerfile index 2f1edf1..b53b5a3 100644 --- a/dockerfiles/composer-package/Dockerfile +++ b/dockerfiles/composer-package/Dockerfile @@ -5,6 +5,7 @@ USER root COPY --from=composer /srv/composer /srv/composer +RUN ln -s /srv/composer/vendor/bin/composer /usr/bin/composer USER nobody COPY run.sh /run.sh diff --git a/dockerfiles/composer-package/run.sh b/dockerfiles/composer-package/run.sh index 581f4c3..9cc954a 100644 --- a/dockerfiles/composer-package/run.sh +++ b/dockerfiles/composer-package/run.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -euxo pipefail + cd /src git init @@ -7,6 +9,6 @@ git checkout FETCH_HEAD git submodule --quiet update --init --recursive -/srv/composer/vendor/bin/composer --ansi validate -/srv/composer/vendor/bin/composer install --no-progress -/srv/composer/vendor/bin/composer test +composer --ansi validate +composer install --no-progress +composer test -- To view, visit https://gerrit.wikimedia.org/r/381932 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b98300049eee57d6557fb95b2a43f50effceaa7 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1066
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381929 ) Change subject: db-eqiad.php: Depool db1066 .. db-eqiad.php: Depool db1066 In order to to see if we can move db1066 to become vslow service in s3, let's use db1080 to serve also API traffic as it was originally intended on the gerrit example patchset for the hardware expansion. Let's leave this config like this for a week or so and if all goes fine, we can reallocate db1066 in s3 as vslow so we can decommission the old host there and leave s3 ready. Bug: T172679 Change-Id: Id086d1fac03f48e1a75ec81793cd1c6aa2565540 --- M wmf-config/db-eqiad.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index c13cdf1..475a47a 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -106,10 +106,10 @@ 'db1051' => 1, # B3 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1055' => 1, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1065' => 0, # D1 2.8TB 160GB, vslow, dump, master for sanitarium - 'db1066' => 10, # D1 2.8TB 160GB, api + # 'db1066' => 10, # D1 2.8TB 160GB, api #T172679#3650005 'db1072' => 50, # B2 2.8TB 160GB, api 'db1073' => 50, # B3 2.8TB 160GB, api - 'db1080' => 500, # A2 3.6TB 512GB + 'db1080' => 300, # A2 3.6TB 512GB, api #T172679#3650005 'db1083' => 500, # B1 3.6TB 512GB 'db1089' => 500, # C3 3.6TB 512GB ], @@ -270,7 +270,7 @@ 'db1065' => 1, ], 'api' => [ - 'db1066' => 1, + 'db1080' => 1, 'db1072' => 1, 'db1073' => 1, ], -- To view, visit https://gerrit.wikimedia.org/r/381929 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id086d1fac03f48e1a75ec81793cd1c6aa2565540 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Rakefile: fix wmf_style_delta check for detached head situat...
Giuseppe Lavagetto has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381928 ) Change subject: Rakefile: fix wmf_style_delta check for detached head situations .. Rakefile: fix wmf_style_delta check for detached head situations Change-Id: If8d70de11523b6be7295f3a9b0bb826bcfe1b9ef --- M Rakefile 1 file changed, 28 insertions(+), 3 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/Rakefile b/Rakefile index e6dd899..cc1f675 100644 --- a/Rakefile +++ b/Rakefile @@ -58,6 +58,23 @@ end end +# Fix ruby-git deficiencies. TODO: move to rugged instead? +module Git + class Lib +def symbolic_ref(ref) + command('symbolic-ref', ref) +end + end + class Base +def detached_head? +lib.symbolic_ref('HEAD') +false + rescue Git::GitExecuteError +true +end + end +end + class SpecDependencies # Finds all specs to run based on the changed modules. @@ -229,12 +246,20 @@ alphabet = [*('a'..'z')] random_branch_name = 'wmf_styleguide_' + (0..6).map { alphabet[rand(26)]}.join old_problems = nil -@git.branch(random_branch_name).in_branch do +# If we're in a detached head situation, assume it's ok to just roll back +if @git.detached_head? + sha1 = @git.revparse('HEAD') @git.reset_hard('HEAD^') old_problems = linter_problems - false + @git.checkout(sha1) +else + @git.branch(random_branch_name).in_branch do +@git.reset_hard('HEAD^') +old_problems = linter_problems +false + end + @git.branch(random_branch_name).delete end -@git.branch(random_branch_name).delete delta = new_problems.length - old_problems.length if delta > 0 puts "NEW violations:" -- To view, visit https://gerrit.wikimedia.org/r/381928 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If8d70de11523b6be7295f3a9b0bb826bcfe1b9ef Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Merge UserSecurity into UserProfile
SamanthaNguyen has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381908 ) Change subject: Merge UserSecurity into UserProfile .. Merge UserSecurity into UserProfile UserSecurity is small enough that it doesn't need it's own folder, and is related to UserProfile (handles visibility of certain profile fields), so it's being merged into there. Change-Id: I6e893b93347a9eafdd04416c88b179e389123c6e --- M SocialProfile.php R UserProfile/UserSecurityClass.php 2 files changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified diff --git a/SocialProfile.php b/SocialProfile.php index ad052ef..d1a9805 100644 --- a/SocialProfile.php +++ b/SocialProfile.php @@ -71,7 +71,7 @@ $wgAutoloadClasses['TopUsersPoints'] = __DIR__ . '/UserStats/TopUsers.php'; $wgAutoloadClasses['wAvatar'] = __DIR__ . '/UserProfile/AvatarClass.php'; $wgAutoloadClasses['AvatarParserFunction'] = __DIR__ . '/UserProfile/AvatarParserFunction.php'; -$wgAutoloadClasses['SPUserSecurity'] = __DIR__ . '/UserSecurity/UserSecurityClass.php'; +$wgAutoloadClasses['SPUserSecurity'] = __DIR__ . '/UserProfile/UserSecurityClass.php'; // API modules $wgAutoloadClasses['ApiUserProfilePrivacy'] = __DIR__ . '/UserProfile/ApiUserProfilePrivacy.php'; diff --git a/UserSecurity/UserSecurityClass.php b/UserProfile/UserSecurityClass.php similarity index 100% rename from UserSecurity/UserSecurityClass.php rename to UserProfile/UserSecurityClass.php -- To view, visit https://gerrit.wikimedia.org/r/381908 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6e893b93347a9eafdd04416c88b179e389123c6e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SocialProfile Gerrit-Branch: master Gerrit-Owner: SamanthaNguyen Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Lewis Cawte Gerrit-Reviewer: SamanthaNguyen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1066
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381929 ) Change subject: db-eqiad.php: Depool db1066 .. db-eqiad.php: Depool db1066 In order to to see if we can move db1066 to become vslow service in s3, let's use db1080 to serve also API traffic as it was originally intended on the gerrit example patchset for the hardware expansion. Let's leave this config like this for a week or so and if all goes fine, we can reallocate db1066 in s3 as vslow so we can decommission the old host there and leave s3 ready. Bug: T172679 Change-Id: Id086d1fac03f48e1a75ec81793cd1c6aa2565540 --- M wmf-config/db-eqiad.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/29/381929/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index c13cdf1..475a47a 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -106,10 +106,10 @@ 'db1051' => 1, # B3 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1055' => 1, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1065' => 0, # D1 2.8TB 160GB, vslow, dump, master for sanitarium - 'db1066' => 10, # D1 2.8TB 160GB, api + # 'db1066' => 10, # D1 2.8TB 160GB, api #T172679#3650005 'db1072' => 50, # B2 2.8TB 160GB, api 'db1073' => 50, # B3 2.8TB 160GB, api - 'db1080' => 500, # A2 3.6TB 512GB + 'db1080' => 300, # A2 3.6TB 512GB, api #T172679#3650005 'db1083' => 500, # B1 3.6TB 512GB 'db1089' => 500, # C3 3.6TB 512GB ], @@ -270,7 +270,7 @@ 'db1065' => 1, ], 'api' => [ - 'db1066' => 1, + 'db1080' => 1, 'db1072' => 1, 'db1073' => 1, ], -- To view, visit https://gerrit.wikimedia.org/r/381929 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id086d1fac03f48e1a75ec81793cd1c6aa2565540 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Rakefile: fix wmf_style_delta check for detached head situat...
Giuseppe Lavagetto has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381928 ) Change subject: Rakefile: fix wmf_style_delta check for detached head situations .. Rakefile: fix wmf_style_delta check for detached head situations Change-Id: If8d70de11523b6be7295f3a9b0bb826bcfe1b9ef --- M Rakefile M modules/profile/manifests/docker/engine.pp 2 files changed, 30 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/28/381928/1 diff --git a/Rakefile b/Rakefile index e6dd899..a195c0e 100644 --- a/Rakefile +++ b/Rakefile @@ -58,6 +58,24 @@ end end +# Fix ruby-git deficiencies. TODO: move to rugged instead? +module Git + class Lib +def symbolic_ref(ref) + command('symbolic-ref', ref) +end + end + class Base +def detached_head? +lib.symbolic_ref('HEAD') +false + rescue Git::GitExecuteError +true +end + end +end + + class SpecDependencies # Finds all specs to run based on the changed modules. @@ -229,12 +247,20 @@ alphabet = [*('a'..'z')] random_branch_name = 'wmf_styleguide_' + (0..6).map { alphabet[rand(26)]}.join old_problems = nil -@git.branch(random_branch_name).in_branch do +# If we're in a detached head situation, assume it's ok to just roll back +if @git.detached_head? + sha1 = @git.revparse('HEAD') @git.reset_hard('HEAD^') old_problems = linter_problems - false + @git.checkout(sha1) +else + @git.branch(random_branch_name).in_branch do +@git.reset_hard('HEAD^') +old_problems = linter_problems +false + end + @git.branch(random_branch_name).delete end -@git.branch(random_branch_name).delete delta = new_problems.length - old_problems.length if delta > 0 puts "NEW violations:" diff --git a/modules/profile/manifests/docker/engine.pp b/modules/profile/manifests/docker/engine.pp index 543ea8a..f455650 100644 --- a/modules/profile/manifests/docker/engine.pp +++ b/modules/profile/manifests/docker/engine.pp @@ -6,7 +6,7 @@ class profile::docker::engine( # We want to get settings across the hierarchy, some per host, some fleet # wide. So use hiera_hash to merge keys across the hierarchy -$settings = hiera_hash('profile::docker::engine::settings'), +$settings = hiera('profile::docker::engine::settings'), # Version to install; the default is not to pick one. $version = hiera('profile::docker::engine::version'), # Set to false if we don't want to declare the docker service here -- To view, visit https://gerrit.wikimedia.org/r/381928 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8d70de11523b6be7295f3a9b0bb826bcfe1b9ef Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Bump composer-package docker image to v2017.10.03.05.46
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381927 ) Change subject: Bump composer-package docker image to v2017.10.03.05.46 .. Bump composer-package docker image to v2017.10.03.05.46 Includes: * 7e605bd Include 'php7.0-dba' in php-mediawiki image Change-Id: I3834ba335a42151ff9335a17d0ed34c81489ea8c --- M jjb/php.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/php.yaml b/jjb/php.yaml index 666467d..a3c4d3b 100644 --- a/jjb/php.yaml +++ b/jjb/php.yaml @@ -141,7 +141,7 @@ - docker-log-dir - docker-cache-dir - docker-run-with-log-and-workspace-cache: -image: 'wmfreleng/composer-package:v2017.10.02.18.02' +image: 'wmfreleng/composer-package:v2017.10.03.05.46' logdir: '/log' # Couple jobs with a {name} prefix -- To view, visit https://gerrit.wikimedia.org/r/381927 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3834ba335a42151ff9335a17d0ed34c81489ea8c Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Hashar Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-codfw.php: Depool db2049 and db2041"
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381926 ) Change subject: Revert "db-codfw.php: Depool db2049 and db2041" .. Revert "db-codfw.php: Depool db2049 and db2041" This reverts commit 0fc64e7e353be44c7ad8a7c1cb1a0003558e802a. Change-Id: I64f7d6c034edbfcc76f796686702ccbf03752072 --- M wmf-config/db-codfw.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php index 48be022..1057ef4 100644 --- a/wmf-config/db-codfw.php +++ b/wmf-config/db-codfw.php @@ -115,8 +115,8 @@ 's2' => [ 'db2017' => 0, # B6 2.9TB 96GB, master 'db2035' => 50, # C6 2.9TB 160GB, rc, log - # 'db2041' => 100, # C6 2.9TB 160GB, api #T174509 - # 'db2049' => 400, # C6 2.9TB 160GB, #T174509 + 'db2041' => 100, # C6 2.9TB 160GB, api + 'db2049' => 400, # C6 2.9TB 160GB, 'db2056' => 50, # D6 3.3TB 160GB, dump (inactive), vslow #innodb compressed 'db2063' => 100, # D6 3.3TB 160GB, api 'db2064' => 400, # D6 3.3TB 160GB @@ -295,7 +295,7 @@ 'db2056' => 1, ], 'api' => [ - # 'db2041' => 1, + 'db2041' => 1, 'db2063' => 1, ], ], -- To view, visit https://gerrit.wikimedia.org/r/381926 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I64f7d6c034edbfcc76f796686702ccbf03752072 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Bump composer-package docker image to v2017.10.03.05.46
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381927 ) Change subject: Bump composer-package docker image to v2017.10.03.05.46 .. Bump composer-package docker image to v2017.10.03.05.46 Includes: * 7e605bd Include 'php7.0-dba' in php-mediawiki image Change-Id: I3834ba335a42151ff9335a17d0ed34c81489ea8c --- M jjb/php.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/27/381927/1 diff --git a/jjb/php.yaml b/jjb/php.yaml index 666467d..a3c4d3b 100644 --- a/jjb/php.yaml +++ b/jjb/php.yaml @@ -141,7 +141,7 @@ - docker-log-dir - docker-cache-dir - docker-run-with-log-and-workspace-cache: -image: 'wmfreleng/composer-package:v2017.10.02.18.02' +image: 'wmfreleng/composer-package:v2017.10.03.05.46' logdir: '/log' # Couple jobs with a {name} prefix -- To view, visit https://gerrit.wikimedia.org/r/381927 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3834ba335a42151ff9335a17d0ed34c81489ea8c Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Include 'php7.0-dba' in php-mediawiki image
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381925 ) Change subject: Include 'php7.0-dba' in php-mediawiki image .. Include 'php7.0-dba' in php-mediawiki image This is needed for native CDB support Change-Id: I0e57bf129419b9af30d144a6934165ef6e377804 --- M dockerfiles/php-mediawiki/Dockerfile 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/dockerfiles/php-mediawiki/Dockerfile b/dockerfiles/php-mediawiki/Dockerfile index 944ab6a..ad51c7e 100644 --- a/dockerfiles/php-mediawiki/Dockerfile +++ b/dockerfiles/php-mediawiki/Dockerfile @@ -7,7 +7,7 @@ # Needed for composer to install things from dist php7.0-zip \ # Needed for mediawiki -php-ast php7.0-mbstring php7.0-xml && \ +php-ast php7.0-dba php7.0-mbstring php7.0-xml && \ apt-get clean && rm -rf /var/lib/apt/lists/* USER nobody -- To view, visit https://gerrit.wikimedia.org/r/381925 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0e57bf129419b9af30d144a6934165ef6e377804 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Hashar Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Include 'php7.0-dba' in php-mediawiki image
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381925 ) Change subject: Include 'php7.0-dba' in php-mediawiki image .. Include 'php7.0-dba' in php-mediawiki image This is needed for native CDB support Change-Id: I0e57bf129419b9af30d144a6934165ef6e377804 --- M dockerfiles/php-mediawiki/Dockerfile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/25/381925/1 diff --git a/dockerfiles/php-mediawiki/Dockerfile b/dockerfiles/php-mediawiki/Dockerfile index 944ab6a..ad51c7e 100644 --- a/dockerfiles/php-mediawiki/Dockerfile +++ b/dockerfiles/php-mediawiki/Dockerfile @@ -7,7 +7,7 @@ # Needed for composer to install things from dist php7.0-zip \ # Needed for mediawiki -php-ast php7.0-mbstring php7.0-xml && \ +php-ast php7.0-dba php7.0-mbstring php7.0-xml && \ apt-get clean && rm -rf /var/lib/apt/lists/* USER nobody -- To view, visit https://gerrit.wikimedia.org/r/381925 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e57bf129419b9af30d144a6934165ef6e377804 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-codfw.php: Depool db2049 and db2041"
Hello Urbanecm, jenkins-bot, Jcrespo, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/381926 to review the following change. Change subject: Revert "db-codfw.php: Depool db2049 and db2041" .. Revert "db-codfw.php: Depool db2049 and db2041" This reverts commit 0fc64e7e353be44c7ad8a7c1cb1a0003558e802a. Change-Id: I64f7d6c034edbfcc76f796686702ccbf03752072 --- M wmf-config/db-codfw.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/26/381926/1 diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php index d7579c3..7d06c4b 100644 --- a/wmf-config/db-codfw.php +++ b/wmf-config/db-codfw.php @@ -115,8 +115,8 @@ 's2' => [ 'db2017' => 0, # B6 2.9TB 96GB, master 'db2035' => 50, # C6 2.9TB 160GB, rc, log - # 'db2041' => 100, # C6 2.9TB 160GB, api #T174509 - # 'db2049' => 400, # C6 2.9TB 160GB, #T174509 + 'db2041' => 100, # C6 2.9TB 160GB, api + 'db2049' => 400, # C6 2.9TB 160GB, 'db2056' => 50, # D6 3.3TB 160GB, dump (inactive), vslow #innodb compressed 'db2063' => 100, # D6 3.3TB 160GB, api 'db2064' => 400, # D6 3.3TB 160GB @@ -295,7 +295,7 @@ 'db2056' => 1, ], 'api' => [ - # 'db2041' => 1, + 'db2041' => 1, 'db2063' => 1, ], ], -- To view, visit https://gerrit.wikimedia.org/r/381926 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64f7d6c034edbfcc76f796686702ccbf03752072 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Add experimental "composer-package-php70-docker" job
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381378 ) Change subject: Add experimental "composer-package-php70-docker" job .. Add experimental "composer-package-php70-docker" job Change-Id: I3cc35d39b39a7b6e9a38455b9264bb0d2b243ee2 --- A dockerfiles/composer-package/Dockerfile A dockerfiles/composer-package/example-run.sh A dockerfiles/composer-package/run.sh M jjb/php.yaml M zuul/layout.yaml 5 files changed, 53 insertions(+), 2 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/dockerfiles/composer-package/Dockerfile b/dockerfiles/composer-package/Dockerfile new file mode 100644 index 000..2f1edf1 --- /dev/null +++ b/dockerfiles/composer-package/Dockerfile @@ -0,0 +1,11 @@ +FROM wmfreleng/composer:latest as composer + +FROM wmfreleng/php-mediawiki:latest + +USER root + +COPY --from=composer /srv/composer /srv/composer + +USER nobody +COPY run.sh /run.sh +ENTRYPOINT /bin/bash /run.sh diff --git a/dockerfiles/composer-package/example-run.sh b/dockerfiles/composer-package/example-run.sh new file mode 100644 index 000..80fd8a1 --- /dev/null +++ b/dockerfiles/composer-package/example-run.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +install --mode 777 --directory log +docker run \ +--rm --tty \ +--env ZUUL_URL=https://gerrit.wikimedia.org/r \ +--env ZUUL_PROJECT=utfnormal \ +--env ZUUL_COMMIT=668604441afd899efb073ce4c6b5545341ef6582 \ +--env ZUUL_REF=refs/changes/57/375857/1 \ +--volume /$(pwd)/log://var/lib/jenkins/log \ + wmfreleng/composer-package:latest diff --git a/dockerfiles/composer-package/run.sh b/dockerfiles/composer-package/run.sh new file mode 100644 index 000..581f4c3 --- /dev/null +++ b/dockerfiles/composer-package/run.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +cd /src + +git init +git fetch --quiet --depth 1 "${ZUUL_URL}/${ZUUL_PROJECT}" "$ZUUL_REF" +git checkout FETCH_HEAD +git submodule --quiet update --init --recursive + +/srv/composer/vendor/bin/composer --ansi validate +/srv/composer/vendor/bin/composer install --no-progress +/srv/composer/vendor/bin/composer test diff --git a/jjb/php.yaml b/jjb/php.yaml index 7fefde1..666467d 100644 --- a/jjb/php.yaml +++ b/jjb/php.yaml @@ -127,6 +127,23 @@ publishers: - castor-save +- job: +name: 'composer-package-php70-docker' +node: DebianJessieDocker +concurrent: true +properties: + - build-discarder: + days-to-keep: 15 +triggers: + - zuul +builders: + - docker-zuul-env + - docker-log-dir + - docker-cache-dir + - docker-run-with-log-and-workspace-cache: +image: 'wmfreleng/composer-package:v2017.10.02.18.02' +logdir: '/log' + # Couple jobs with a {name} prefix - job-template: !!merge : *job_composer-phpflavor-image diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 7c35aa9..3b5445b 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -1196,7 +1196,7 @@ - composer-package-hhvm-jessie - composer-package-php55-jessie experimental: - - composer-package-php70-jessie + - composer-package-php70-docker - name: npm test: @@ -6347,7 +6347,7 @@ - composer-package-hhvm-jessie - composer-package-php55-jessie experimental: - - composer-package-php70-jessie + - composer-package-php70-docker - name: mediawiki/services/mathoid template: -- To view, visit https://gerrit.wikimedia.org/r/381378 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3cc35d39b39a7b6e9a38455b9264bb0d2b243ee2 Gerrit-PatchSet: 7 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Hashar Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Drop mediawiki-core-phpcs-jessie, replaced by docker version
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381812 ) Change subject: Drop mediawiki-core-phpcs-jessie, replaced by docker version .. Drop mediawiki-core-phpcs-jessie, replaced by docker version Change-Id: I50f94b8adedee0cef4dd220d0eefb2e9f0fed4c2 --- M jjb/mediawiki.yaml M zuul/layout.yaml M zuul/parameter_functions.py 3 files changed, 0 insertions(+), 35 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/mediawiki.yaml b/jjb/mediawiki.yaml index 6ab9828..ee9f918 100644 --- a/jjb/mediawiki.yaml +++ b/jjb/mediawiki.yaml @@ -391,35 +391,6 @@ # Special job to run MW-CS against MediaWiki core. # Can't run it through composer because it'll timeout. - job: -name: 'mediawiki-core-phpcs-jessie' -node: ci-jessie-wikimedia -concurrent: true -properties: - - build-discarder: - days-to-keep: 15 -triggers: - - zuul -builders: - - castor-load - - zuul-cloner: - projects: > - mediawiki/core - - composer-update: -dir: '$WORKSPACE/src' - - shell: | -cd $WORKSPACE/src -rm -fR "$WORKSPACE/log" -mkdir -p "$WORKSPACE/log" -vendor/bin/phpcs -p -s --report-full --report-checkstyle=$WORKSPACE/log/checkstyle.xml -publishers: - - castor-save - - checkstyle: -pattern: 'log/checkstyle.xml' -can-run-on-failed: true -thresholds: - failed: -total-all: 1 -- job: name: 'mediawiki-core-phpcs-docker' node: DebianJessieDocker concurrent: true diff --git a/zuul/layout.yaml b/zuul/layout.yaml index f37c889..7c35aa9 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -801,11 +801,6 @@ branch: (?!fundraising/REL.*) queue-name: mediawiki - - name: mediawiki-core-phpcs-jessie -branch: (?!^fundraising/REL) -files: - - '^.*\.(json|php|php5|phtml|inc|xml)$' - - name: mediawiki-core-phpcs-docker branch: (?!^fundraising/REL) files: diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py index 066c15a..9462f3e 100644 --- a/zuul/parameter_functions.py +++ b/zuul/parameter_functions.py @@ -21,7 +21,6 @@ 'mw-testskin', 'mw-testskin-non-voting', 'mw-tools-codesniffer-mwcore-testrun', -'mediawiki-core-phpcs-jessie', ) php5_jobs = ( # Qunit localhost uses apache mod_php which is Zend. Lets be consistent -- To view, visit https://gerrit.wikimedia.org/r/381812 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I50f94b8adedee0cef4dd220d0eefb2e9f0fed4c2 Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Hashar Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Rakefile: add wmf styleguide checks
Giuseppe Lavagetto has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381764 ) Change subject: Rakefile: add wmf styleguide checks .. Rakefile: add wmf styleguide checks This commit introduces two different checks: * wmf_styleguide: checks the puppet files modified in current diff/commit for violations of the WMF styleguide. This is thought to be useful for developers * wmf_styleguide_delta: checks if the number of violations in the current commit is larger or equal to what we had with the previous commit. This will be used by CI to enforce we at least do not add new violations to our code. Change-Id: Ibbd1c050fb42c7cddfca7792cf3ab10cfa2acf58 --- M Gemfile M Rakefile 2 files changed, 89 insertions(+), 5 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/Gemfile b/Gemfile index 316b55f..c7eaca7 100644 --- a/Gemfile +++ b/Gemfile @@ -13,3 +13,4 @@ gem 'git', '1.3.0' gem 'puppet-lint', '2.0.2' gem 'rubocop', '~> 0.49.1', require: false +gem 'puppet-lint-wmf_styleguide-check', git: "https://gerrit.wikimedia.org/r/operations/puppet-lint/wmf_styleguide-check"; diff --git a/Rakefile b/Rakefile index fc461a4..e6dd899 100644 --- a/Rakefile +++ b/Rakefile @@ -120,16 +120,16 @@ :spec, :tox ] -@changed_files = git_changed_in_head(path) +@git = Git.open(path) +@changed_files = git_changed_in_head @tasks = setup_tasks @failed_specs = [] end private - def git_changed_in_head(path) -g = Git.open(path) -diff = g.diff('HEAD^') + def git_changed_in_head +diff = @git.diff('HEAD^') diff.name_status.select { |_, status| 'ACM'.include? status}.keys end @@ -139,6 +139,7 @@ method_name = "setup_#{cat}" tasks.concat send(method_name) end +setup_wmf_styleguide_delta tasks end @@ -155,16 +156,96 @@ end def setup_puppet_lint +# Sets up a standard puppet-lint task changed = puppet_changed_files return [] if changed.empty? # Reset puppet-lint tasks, define a new one Rake::Task[:lint].clear +PuppetLint.configuration.send('disable_wmf_styleguide') PuppetLint::RakeTask.new :puppet_lint do |config| config.fail_on_warnings = true # be strict config.log_format = '%{path}:%{line} %{KIND} %{message} (%{check})' config.pattern = changed end [:puppet_lint] + end + + def linter_problems +linter = PuppetLint.new +puppet_changed_files.each do |puppet_file| + linter.file = puppet_file + linter.run +end +linter.problems + end + + def setup_wmf_lint_check +PuppetLint.configuration.checks.each do |check| + if check == :wmf_styleguide +PuppetLint.configuration.send('enable_wmf_styleguide') + else +PuppetLint.configuration.send("disable_#{check}") + end +end + end + + def print_wmf_style_violations(problems, other=nil) +other ||= {} +events = problems.select do |p| + other.select { |x| x[:message] == p[:message] && x[:path] == p[:path] }.empty? +end +events.each do |p| + puts "#{p[:path]}:#{p[:line]} - #{p[:message]}" +end + end + + def setup_wmf_styleguide_delta +if puppet_changed_files.empty? + task :wmf_styleguide do +puts "wmf-style: no files to check" + end + task :wmf_styleguide_delta => [:wmf_styleguide] +else + desc 'Check wmf styleguide violations' + task :wmf_styleguide do +setup_wmf_lint_check +problems = linter_problems +print_wmf_style_violations(problems) +abort("wmf-styleguide: NOT OK") + end + + desc 'Check regressions for the wmf style guide' + task :wmf_styleguide_delta do +puts '---> wmf_style lint' +setup_wmf_lint_check +if @git.diff('HEAD').size > 0 + puts "Will NOT run the task as you have uncommitted changes that would be lost" + next +end + +# Only enable the wmf_styleguide +new_problems = linter_problems +# Check out temporary branch, and re-run the check to the previous commit +alphabet = [*('a'..'z')] +random_branch_name = 'wmf_styleguide_' + (0..6).map { alphabet[rand(26)]}.join +old_problems = nil +@git.branch(random_branch_name).in_branch do + @git.reset_hard('HEAD^') + old_problems = linter_problems + false +end +@git.branch(random_branch_name).delete +delta = new_problems.length - old_problems.length +if delta > 0 + puts "NEW violations:" + print_wmf_style_violations(new_problems, old_problems) + puts "Resolved violations:" + print_wmf_style_violations(old_problems, new_problems) + abort +end +puts '---> end wmf_style lint' + end +end end d
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Check minimum database server version when running update.php
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381924 ) Change subject: Check minimum database server version when running update.php .. Check minimum database server version when running update.php If MediaWiki has increased the minimum database server version that is required, check it when running update.php to ensure it is still compatible. Previously this was only checked during the installer. Bug: T162044 Change-Id: I47092c9557f4706a4dcb3a23150647e68af4317f --- M includes/installer/DatabaseInstaller.php M includes/installer/Installer.php M includes/installer/MssqlInstaller.php M includes/installer/MysqlInstaller.php M includes/installer/OracleInstaller.php M includes/installer/PostgresInstaller.php M includes/installer/SqliteInstaller.php M maintenance/update.php 8 files changed, 68 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/24/381924/1 diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index 6c56b3d..925d991 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -42,6 +42,16 @@ public $parent; /** +* @var string Set by subclasses +*/ + public static $minimumVersion; + + /** +* @var string Set by subclasses +*/ + protected static $notMiniumumVerisonMessage; + + /** * The database connection. * * @var Database @@ -63,6 +73,23 @@ protected $globalNames = []; /** +* Whether the provided version meets the necessary requirements for this type +* +* @param string $serverVersion Output of Database::getServerVersion() +* @return Status +* @since 1.30 +*/ + public static function meetsMinimumRequirement( $serverVersion ) { + if ( version_compare( $serverVersion, static::$minimumVersion ) < 0 ) { + return Status::newFatal( + static::$notMiniumumVerisonMessage, static::$minimumVersion, $serverVersion + ); + } + + return Status::newGood(); + } + + /** * Return the internal name, e.g. 'mysql', or 'sqlite'. */ abstract public function getName(); diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 52be321..012b477 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -547,6 +547,17 @@ } /** +* Get the DatabaseInstaller class name for this type +* +* @param string $type database type ($wgDBtype) +* @return string Class name +* @since 1.30 +*/ + public static function getDBInstallerClass( $type ) { + return ucfirst( $type ) . 'Installer'; + } + + /** * Get an instance of DatabaseInstaller for the specified DB type. * * @param mixed $type DB installer for which is needed, false to use default. @@ -561,7 +572,7 @@ $type = strtolower( $type ); if ( !isset( $this->dbInstallers[$type] ) ) { - $class = ucfirst( $type ) . 'Installer'; + $class = self::getDBInstallerClass( $type ); $this->dbInstallers[$type] = new $class( $this ); } diff --git a/includes/installer/MssqlInstaller.php b/includes/installer/MssqlInstaller.php index d01f954..e462220 100644 --- a/includes/installer/MssqlInstaller.php +++ b/includes/installer/MssqlInstaller.php @@ -51,7 +51,8 @@ // SQL Server 2005 RTM // @todo Are SQL Express version numbers different?) - public $minimumVersion = '9.00.1399'; + public static $minimumVersion = '9.00.1399'; + protected static $notMiniumumVerisonMessage = 'config-mssql-old'; // These are schema-level privs // Note: the web user will be created will full permissions if possible, this permission @@ -191,12 +192,7 @@ $conn = $status->value; // Check version - $version = $conn->getServerVersion(); - if ( version_compare( $version, $this->minimumVersion ) < 0 ) { - return Status::newFatal( 'config-mssql-old', $this->minimumVersion, $version ); - } - - return $status; + return static::meetsMinimumRequirement( $conn->getServerVersion() ); } /** diff --git a/includes/installer/MysqlInstaller.php b/includes/installer/MysqlInstaller.php index c5dd4dc..ab5701a 100644 --- a/includes/installer/MysqlInstaller.php +++ b/includes/installer/MysqlInstaller.php @@ -51,7 +51,8 @@ public $supportedEngines = [ 'InnoDB', 'MyISAM' ]; -
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (cb52d8b7a)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381814 ) Change subject: Update VE core submodule to master (cb52d8b7a) .. Update VE core submodule to master (cb52d8b7a) New changes: 46c8b6ec8 ce.Surface: in observed selection changes, only make cursorable selections 0c76240a4 Localisation updates from https://translatewiki.net. cb52d8b7a Follow-up Iea80013: Re-define this.$bounding after GCN re-render Bug: T148679 Bug: T176766 Bug: T176936 Change-Id: I3b6e156e007a7bdda427225f6c85d1a7ebca3f41 --- M lib/ve 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: DLynch: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/ve b/lib/ve index 84ec68d..cb52d8b 16 --- a/lib/ve +++ b/lib/ve @@ -1 +1 @@ -Subproject commit 84ec68dfba233ab77efde07da8b745351e2dc7b8 +Subproject commit cb52d8b7a698d62cdada9da033c9775cb5362309 -- To view, visit https://gerrit.wikimedia.org/r/381814 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b6e156e007a7bdda427225f6c85d1a7ebca3f41 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: DLynch Gerrit-Reviewer: Esanders Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Fix ImportMessageTest to actually test contact.
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381923 ) Change subject: Fix ImportMessageTest to actually test contact. .. Fix ImportMessageTest to actually test contact. It turns out the vars in array_intersect_key were around the wrong way, creating a false comparison. http://php.net/manual/en/function.array-intersect-key.php Also, allow for prefix & suffix to not be set. Bug: T175744 (preparatory) Change-Id: Ia2820e51a38bdc60536d44b10037e3f8fb1d93c4 --- M sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/23/381923/1 diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php index 3cba6c7..f4bee64 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php @@ -88,13 +88,15 @@ if ( !empty( $expected['contact'] ) ) { $contact = $this->callAPISuccessGetSingle('Contact', array('id' => $contribution['contact_id'])); $renamedFields = array('prefix' => 1, 'suffix' => 1); -$this->assertEquals( array_diff_key($expected['contact'], $renamedFields), array_intersect_key( $expected['contact'], $contact ) ); +$this->assertEquals( array_diff_key($expected['contact'], $renamedFields), array_intersect_key( $contact, $expected['contact'] ), print_r(array_intersect_key( $contact, $expected['contact'] ), TRUE) . " does not match " . print_r($expected['contact'], TRUE)); foreach (array_keys($renamedFields) as $renamedField) { + if (isset($expected['contact'][$renamedField])) { $this->assertEquals(civicrm_api3('OptionValue', 'getvalue', array( -'value' => $contact[$renamedField . '_id'], -'option_group_id' => 'individual_' . $renamedField, -'return' => 'name', + 'value' => $contact[$renamedField . '_id'], + 'option_group_id' => 'individual_' . $renamedField, + 'return' => 'name', )), $expected['contact'][$renamedField]); + } } } -- To view, visit https://gerrit.wikimedia.org/r/381923 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia2820e51a38bdc60536d44b10037e3f8fb1d93c4 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: CRM-21224 get LIMIT out of the where string.
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381922 ) Change subject: CRM-21224 get LIMIT out of the where string. .. CRM-21224 get LIMIT out of the where string. This one is just a clean up. It's also in https://github.com/civicrm/civicrm-core/pull/11030/commits and we could justify leaving it for now. However, it might make sense to keep in sync Change-Id: Ic9436ba59dfd95948e1edba35221c386c1599086 --- M CRM/Dedupe/Merger.php 1 file changed, 16 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/22/381922/1 diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php index 13d37bc..c249e28 100644 --- a/CRM/Dedupe/Merger.php +++ b/CRM/Dedupe/Merger.php @@ -602,6 +602,7 @@ */ public static function batchMerge($rgid, $gid = NULL, $mode = 'safe', $batchLimit = 1, $isSelected = 2, $criteria = array(), $checkPermissions = TRUE) { $redirectForPerformance = ($batchLimit > 1) ? TRUE : FALSE; +$isProcessUntilAllProcessed = !$redirectForPerformance; $reloadCacheIfEmpty = (!$redirectForPerformance && $isSelected == 2); $dupePairs = self::getDuplicatePairs($rgid, $gid, $reloadCacheIfEmpty, $batchLimit, $isSelected, '', ($mode == 'aggressive'), $criteria, $checkPermissions); @@ -610,9 +611,9 @@ // @todo stop passing these parameters in & instead calculate them in the merge function based // on the 'real' params like $isRespectExclusions $batchLimit and $isSelected. 'join' => self::getJoinOnDedupeTable(), - 'where' => self::getWhereString($batchLimit, $isSelected), + 'where' => self::getWhereString($isSelected), ); -return CRM_Dedupe_Merger::merge($dupePairs, $cacheParams, $mode, $redirectForPerformance, $checkPermissions); +return CRM_Dedupe_Merger::merge($dupePairs, $cacheParams, $mode, $isProcessUntilAllProcessed, $checkPermissions, $batchLimit); } /** @@ -633,20 +634,14 @@ /** * Get where string for dedupe join. * - * @param int $batchLimit * @param bool $isSelected * * @return string */ - protected static function getWhereString($batchLimit, $isSelected) { + protected static function getWhereString($isSelected) { $where = "de.id IS NULL"; if ($isSelected === 0 || $isSelected === 1) { $where .= " AND pn.is_selected = {$isSelected}"; -} -// else consider all dupe pairs -// @todo Adding limit to Where??!! -if ($batchLimit) { - $where .= " LIMIT {$batchLimit}"; } return $where; } @@ -749,16 +744,19 @@ * A 'safe' value skips the merge if there are any un-resolved conflicts. * Does a force merge otherwise (aggressive mode). * - * @param bool $redirectForPerformance - * Redirect to a url for batch processing. + * @param bool $isProcessUntilAllProcessed + * Iterate through the cache until all matches for the cache string are processed? * * @param bool $checkPermissions * Respect logged in user permissions. * + * @param int $batchLimit + * Number of rows to merge in each batch. One or more will be processed depending on + * $isProcessUntilAllProcessed + * * @return array|bool */ - public static function merge($dupePairs = array(), $cacheParams = array(), $mode = 'safe', - $redirectForPerformance = FALSE, $checkPermissions = TRUE + public static function merge($dupePairs = array(), $cacheParams = array(), $mode = 'safe', $isProcessUntilAllProcessed = TRUE, $checkPermissions = TRUE, $batchLimit = 0 ) { $cacheKeyString = CRM_Utils_Array::value('cache_key_string', $cacheParams); $resultStats = array('merged' => array(), 'skipped' => array()); @@ -792,14 +790,14 @@ self::dedupePair($rowsElementsAndInfo['migration_info'], $resultStats, $deletedContacts, $mode, $checkPermissions, $mainId, $otherId, $cacheKeyString); } - if ($cacheKeyString && !$redirectForPerformance) { + if ($cacheKeyString && $isProcessUntilAllProcessed) { // retrieve next pair of dupes // @todo call getDuplicatePairs. $dupePairs = CRM_Core_BAO_PrevNextCache::retrieve($cacheKeyString, $cacheParams['join'], $cacheParams['where'], 0, - 0, + $batchLimit, array(), '', FALSE @@ -1895,16 +1893,16 @@ *Array of matches meeting the criteria. */ public static function getDuplicatePairs($rule_group_id, $group_id, $reloadCacheIfEmpty, $batchLimit, $isSelected, $orderByClause = '', $includeConflicts = TRUE, $criteria = array(), $checkPermissions = TRUE, $searchLimit = 0) { -$where = self::getWhereString($batchLimit, $isSelected); +$where = self::getWhereString($isSelected); $cacheKeyString = self::getMergeCacheKeyString($ru
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: CRM--21248 Fix merge screen conflict listing
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381921 ) Change subject: CRM--21248 Fix merge screen conflict listing .. CRM--21248 Fix merge screen conflict listing Bug: T176256 (a bit tangental but experienced while investigating). Adding to https://github.com/civicrm/civicrm-core/pull/11030 Change-Id: If606536337746fd12e16a9a38ca16275e6757f9c --- M CRM/Contact/Page/DedupeFind.php M CRM/Contact/Page/DedupeMerge.php 2 files changed, 5 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/21/381921/1 diff --git a/CRM/Contact/Page/DedupeFind.php b/CRM/Contact/Page/DedupeFind.php index 41fa2ea..db1d263 100644 --- a/CRM/Contact/Page/DedupeFind.php +++ b/CRM/Contact/Page/DedupeFind.php @@ -64,6 +64,7 @@ $rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this); $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, FALSE, 0); $criteria = CRM_Utils_Request::retrieve('criteria', 'String', $this, FALSE, '{}'); +$isSelected = CRM_Utils_Request::retrieve('is_selected', 'Int', $this, FALSE, 2); $this->assign('criteria', $criteria); $isConflictMode = ($context == 'conflicts'); @@ -141,9 +142,6 @@ $this->action = CRM_Core_Action::UPDATE; $urlQry['snippet'] = 4; - if ($isConflictMode) { -$urlQry['selected'] = 1; - } $this->assign('sourceUrl', CRM_Utils_System::url('civicrm/ajax/dedupefind', $urlQry, FALSE, NULL, FALSE)); @@ -157,7 +155,7 @@ CRM_Dedupe_Merger::resetMergeStats($cacheKeyString); } - $this->_mainContacts = CRM_Dedupe_Merger::getDuplicatePairs($rgid, $gid, !$isConflictMode, 0, $isConflictMode, '', $isConflictMode, $criteria, TRUE, $limit); + $this->_mainContacts = CRM_Dedupe_Merger::getDuplicatePairs($rgid, $gid, !$isConflictMode, 0, $isSelected, '', $isConflictMode, $criteria, TRUE, $limit); if (empty($this->_mainContacts)) { if ($isConflictMode) { diff --git a/CRM/Contact/Page/DedupeMerge.php b/CRM/Contact/Page/DedupeMerge.php index da12d9b..4d26b1d 100644 --- a/CRM/Contact/Page/DedupeMerge.php +++ b/CRM/Contact/Page/DedupeMerge.php @@ -88,11 +88,11 @@ $where = NULL; if ($action == CRM_Core_Action::MAP) { $where = "pn.is_selected = 1"; - $isSelected = 1; + $urlQry['is_selected'] = 1; } else { // else merge all (2) - $isSelected = 2; + $urlQry['is_selected'] = 2; } $total = CRM_Core_BAO_PrevNextCache::getCount($cacheKeyString, NULL, $where); @@ -107,7 +107,7 @@ for ($i = 1; $i <= ceil($total / self::BATCHLIMIT); $i++) { $task = new CRM_Queue_Task( array('CRM_Contact_Page_DedupeMerge', 'callBatchMerge'), -array($rgid, $gid, $mode, self::BATCHLIMIT, $isSelected), +array($rgid, $gid, $mode, self::BATCHLIMIT, $urlQry['is_selected']), "Processed " . $i * self::BATCHLIMIT . " pair of duplicates out of " . $total ); -- To view, visit https://gerrit.wikimedia.org/r/381921 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If606536337746fd12e16a9a38ca16275e6757f9c Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: Fix UI batch merge mishandling context paramter.
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381920 ) Change subject: Fix UI batch merge mishandling context paramter. .. Fix UI batch merge mishandling context paramter. This has been added to upstream pr https://github.com/civicrm/civicrm-core/pull/11030/files#diff-55c4322ff620a36ba6af19fb5757721cR110 Bug: T176256 Change-Id: I9ef92d9fd2d2de84cb58abf5bcf561838dce818a --- M CRM/Contact/Page/DedupeMerge.php 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/20/381920/1 diff --git a/CRM/Contact/Page/DedupeMerge.php b/CRM/Contact/Page/DedupeMerge.php index 1c95481..da12d9b 100644 --- a/CRM/Contact/Page/DedupeMerge.php +++ b/CRM/Contact/Page/DedupeMerge.php @@ -72,8 +72,7 @@ 'criteria' => $criteria, ); -$criteria = json_decode($criteria, TRUE); -$cacheKeyString = CRM_Dedupe_Merger::getMergeCacheKeyString($rgid, $gid, $criteria); +$cacheKeyString = CRM_Dedupe_Merger::getMergeCacheKeyString($rgid, $gid, json_decode($criteria, TRUE)); if ($mode == 'aggressive' && !CRM_Core_Permission::check('force merge duplicate contacts')) { CRM_Core_Session::setStatus(ts('You do not have permission to force merge duplicate contact records'), ts('Permission Denied'), 'error'); @@ -117,7 +116,7 @@ } // Setup the Runner -$urlQry .= "&context=conflicts"; +$urlQry['context'] = "conflicts"; $runner = new CRM_Queue_Runner(array( 'title' => ts('Merging Duplicates..'), 'queue' => $queue, -- To view, visit https://gerrit.wikimedia.org/r/381920 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ef92d9fd2d2de84cb58abf5bcf561838dce818a Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: restbase-ng: Collect type=Table (not ColumnFamily)
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381884 ) Change subject: restbase-ng: Collect type=Table (not ColumnFamily) .. restbase-ng: Collect type=Table (not ColumnFamily) The setup of the restbase-ng environment didn't take Cassandra 3.x metric naming convention into account (probably since we were focused on Prometheus). As we are now interested in sampling via Graphite *and* Prometheus (for a short while; for verification purposes), actually collect the Cassandra 3.x-compatible metrics. Bug: T169936 Change-Id: Iffb3be0393010a4b395ca03fb4367ff94be241a1 --- M hieradata/role/common/restbase/production_ng.yaml 1 file changed, 21 insertions(+), 21 deletions(-) Approvals: Eevans: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/role/common/restbase/production_ng.yaml b/hieradata/role/common/restbase/production_ng.yaml index 1df012e..93f61b8 100644 --- a/hieradata/role/common/restbase/production_ng.yaml +++ b/hieradata/role/common/restbase/production_ng.yaml @@ -26,25 +26,25 @@ - restbase2012.codfw.wmnet profile::cassandra::metrics_whitelist: - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.CoordinatorReadLatency\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.CoordinatorScanLatency\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.EstimatedColumnCountHistogram\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.EstimatedRowCount\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.EstimatedRowSizeHistogram\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.LiveDiskSpaceUsed\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.LiveSSTableCount\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.LiveScannedHistogram\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.MaxRowSize\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.MeanRowSize\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.MinRowSize\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.PendingCompactions\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.PendingFlushes\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.RangeLatency\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.ReadLatency\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.SSTablesPerReadHistogram\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.TombstoneScannedHistogram\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.TotalDiskSpaceUsed\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.WriteLatency\..*$ + - .*\.metrics\.Table\..*\.meta\.CoordinatorReadLatency\..*$ + - .*\.metrics\.Table\..*\.meta\.CoordinatorScanLatency\..*$ + - .*\.metrics\.Table\..*\.meta\.EstimatedColumnCountHistogram\..*$ + - .*\.metrics\.Table\..*\.meta\.EstimatedRowCount\..*$ + - .*\.metrics\.Table\..*\.meta\.EstimatedRowSizeHistogram\..*$ + - .*\.metrics\.Table\..*\.meta\.LiveDiskSpaceUsed\..*$ + - .*\.metrics\.Table\..*\.meta\.LiveSSTableCount\..*$ + - .*\.metrics\.Table\..*\.meta\.LiveScannedHistogram\..*$ + - .*\.metrics\.Table\..*\.meta\.MaxRowSize\..*$ + - .*\.metrics\.Table\..*\.meta\.MeanRowSize\..*$ + - .*\.metrics\.Table\..*\.meta\.MinRowSize\..*$ + - .*\.metrics\.Table\..*\.meta\.PendingCompactions\..*$ + - .*\.metrics\.Table\..*\.meta\.PendingFlushes\..*$ + - .*\.metrics\.Table\..*\.meta\.RangeLatency\..*$ + - .*\.metrics\.Table\..*\.meta\.ReadLatency\..*$ + - .*\.metrics\.Table\..*\.meta\.SSTablesPerReadHistogram\..*$ + - .*\.metrics\.Table\..*\.meta\.TombstoneScannedHistogram\..*$ + - .*\.metrics\.Table\..*\.meta\.TotalDiskSpaceUsed\..*$ + - .*\.metrics\.Table\..*\.meta\.WriteLatency\..*$ profile::cassandra::metrics_blacklist: - .*\.15MinuteRate$ - .*\.5MinuteRate$ @@ -54,10 +54,10 @@ - .*\.meanRate$ - .*\.min$ - .*\.stddev$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\..*$ + - .*\.metrics\.Table\..*\.meta\..*$ - .*\.metrics\.Keyspace\..*$ - .*\.metrics\.Client\..*$ - - .*\.metrics\.Table\..*$ + - .*\.metrics\.ColumnFamily\..*$ ## Instances profile::cassandra::instances: "restbase1008.eqiad.wmnet": -- To view, visit https://gerrit.wikimedia.org/r/381884 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iffb3be0393010a4b395ca03fb4367ff94be241a1 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Eevans Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Eevans Gerrit-Reviewer: Elukey Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PasswordBlacklist[master]: Remove bloom filter from composer.json
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381919 ) Change subject: Remove bloom filter from composer.json .. Remove bloom filter from composer.json Change-Id: Icc168cd4b8356ee72bba972b29c09fb91a609f85 --- M composer.json 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 5dfef58..9e76b9a 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,6 @@ } }, "require": { - "makinacorpus/php-bloom": "2.0.2", "php": ">=5.5.9" }, "require-dev": { -- To view, visit https://gerrit.wikimedia.org/r/381919 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icc168cd4b8356ee72bba972b29c09fb91a609f85 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/libs/PasswordBlacklist Gerrit-Branch: master Gerrit-Owner: Reedy Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PasswordBlacklist[master]: Remove bloom filter from composer.json
Reedy has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381919 ) Change subject: Remove bloom filter from composer.json .. Remove bloom filter from composer.json Change-Id: Icc168cd4b8356ee72bba972b29c09fb91a609f85 --- M composer.json 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/PasswordBlacklist refs/changes/19/381919/1 diff --git a/composer.json b/composer.json index 5dfef58..9e76b9a 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,6 @@ } }, "require": { - "makinacorpus/php-bloom": "2.0.2", "php": ">=5.5.9" }, "require-dev": { -- To view, visit https://gerrit.wikimedia.org/r/381919 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc168cd4b8356ee72bba972b29c09fb91a609f85 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/libs/PasswordBlacklist Gerrit-Branch: master Gerrit-Owner: Reedy ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix missing order status
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381918 ) Change subject: Fix missing order status .. Fix missing order status When GlobalCollect's processResponse message encounters an error, it bails out before unstaging things, so getData..('gateway_status') returns null. Restores the old logic for the GlobalCollect adapter but still uses the unstaged stuff for the Ingenico child adapter. Bug: T176355 Change-Id: I2321827d6b8d7240f3a4f804dbd48f24b80c2b63 --- M globalcollect_gateway/globalcollect.adapter.php M ingenico_gateway/ingenico.adapter.php 2 files changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/18/381918/1 diff --git a/globalcollect_gateway/globalcollect.adapter.php b/globalcollect_gateway/globalcollect.adapter.php index a117d60..7059d6e 100644 --- a/globalcollect_gateway/globalcollect.adapter.php +++ b/globalcollect_gateway/globalcollect.adapter.php @@ -668,7 +668,7 @@ $order_status_results = false; if ( !$cancelflag && !$problemflag ) { - $statusCode = $this->getData_Unstaged_Escaped( 'gateway_status' ); + $statusCode = $this->getStatusCode( $this->getTransactionData() ); if ( $statusCode ) { if ( is_null( $original_status_code ) ) { $original_status_code = $statusCode; @@ -1790,4 +1790,11 @@ protected function approvePayment() { return $this->do_transaction( 'SET_PAYMENT' ); } + + protected function getStatusCode( $txnData ) { + if ( isset( $txnData['STATUSID'] ) ) { + return $txnData['STATUSID']; + } + return null; + } } diff --git a/ingenico_gateway/ingenico.adapter.php b/ingenico_gateway/ingenico.adapter.php index f582548..ac1f792 100644 --- a/ingenico_gateway/ingenico.adapter.php +++ b/ingenico_gateway/ingenico.adapter.php @@ -268,4 +268,8 @@ protected function approvePayment() { return $this->do_transaction( 'approvePayment' ); } + + protected function getStatusCode( $txnData ) { + return $this->getData_Unstaged_Escaped( 'gateway_status' ); + } } -- To view, visit https://gerrit.wikimedia.org/r/381918 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2321827d6b8d7240f3a4f804dbd48f24b80c2b63 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Add a list of HTML4 Inline tags
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381895 ) Change subject: Add a list of HTML4 Inline tags .. Add a list of HTML4 Inline tags Change-Id: Ibcb862c5ea7d761cfa8ee39feb2b75f6996e39ee --- M lib/config/WikitextConstants.js 1 file changed, 24 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Arlolra: Looks good to me, approved diff --git a/lib/config/WikitextConstants.js b/lib/config/WikitextConstants.js index a686058..1382b7c 100644 --- a/lib/config/WikitextConstants.js +++ b/lib/config/WikitextConstants.js @@ -213,6 +213,30 @@ 'MAP', 'OBJECT', 'PRE', 'PROGRESS', 'VIDEO', ]), + // From https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements + // plus some non-strict elements not on that list (FONT, S, STRIKE, U) since + // these are tags that are actually used on wikipedias + // + // All HTML5 formatting elements except NOBR is on this list + HTML4InlineTags: new Set([ + 'A', 'ABBR', /* 'ACRONYM', */ + 'B', 'BIG', 'BDO', 'BR', 'BUTTON', + 'CITE', 'CODE', + 'DFN', + 'EM', + 'FONT', + 'I', 'IMG', 'INPUT', + 'KBD', + 'LABEL', + 'MAP', + 'Q', + 'OBJECT', + 'S', 'SAMP', 'SCRIPT', 'SELECT', 'SMALL', 'SPAN', 'STRIKE', 'STRONG', 'SUB', 'SUP', + 'TEXTAREA', 'TIME', 'TT', + 'U', + 'VAR', + ]), + // See http://www.w3.org/html/wg/drafts/html/master/syntax.html#formatting FormattingTags: new Set([ 'A', 'B', 'BIG', 'CODE', 'EM', 'FONT', 'I', 'NOBR', -- To view, visit https://gerrit.wikimedia.org/r/381895 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibcb862c5ea7d761cfa8ee39feb2b75f6996e39ee Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry Gerrit-Reviewer: Arlolra Gerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Sbailey Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Minor: Rename BlockTags to HTML4BlockTags
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381894 ) Change subject: Minor: Rename BlockTags to HTML4BlockTags .. Minor: Rename BlockTags to HTML4BlockTags HTML5 does not have a notion of block tags Change-Id: Ie5bdf914276af46912f5b71226b8a30d82c415f2 --- M lib/config/WikitextConstants.js M lib/utils/Util.js M lib/wt2html/pp/handlers/linter.js 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: jenkins-bot: Verified Arlolra: Looks good to me, approved diff --git a/lib/config/WikitextConstants.js b/lib/config/WikitextConstants.js index cb603c9..a686058 100644 --- a/lib/config/WikitextConstants.js +++ b/lib/config/WikitextConstants.js @@ -197,7 +197,7 @@ // From https://developer.mozilla.org/en-US/docs/HTML/Block-level_elements // However, you probably want to use `Util.isBlockTag()`, where some // exceptions are being made. - BlockTags: new Set([ + HTML4BlockTags: new Set([ 'DIV', 'P', // tables 'TABLE', 'TBODY', 'THEAD', 'TFOOT', 'CAPTION', 'TH', 'TR', 'TD', diff --git a/lib/utils/Util.js b/lib/utils/Util.js index f66f734..acfa500 100644 --- a/lib/utils/Util.js +++ b/lib/utils/Util.js @@ -429,7 +429,7 @@ */ isBlockTag: function(name) { name = name.toUpperCase(); - return name !== 'VIDEO' && Consts.HTML.BlockTags.has(name); + return name !== 'VIDEO' && Consts.HTML.HTML4BlockTags.has(name); }, /** diff --git a/lib/wt2html/pp/handlers/linter.js b/lib/wt2html/pp/handlers/linter.js index 3691414..326706b 100644 --- a/lib/wt2html/pp/handlers/linter.js +++ b/lib/wt2html/pp/handlers/linter.js @@ -61,7 +61,7 @@ tagsWithChangedMisnestingBehavior = new Set(); Consts.HTML.HTML5Tags.forEach(function(t) { if (Consts.Sanitizer.TagWhiteList.has(t) && - !Consts.HTML.BlockTags.has(t) && + !Consts.HTML.HTML4BlockTags.has(t) && !Consts.HTML.FormattingTags.has(t) && !Consts.HTML.VoidTags.has(t) ) { -- To view, visit https://gerrit.wikimedia.org/r/381894 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie5bdf914276af46912f5b71226b8a30d82c415f2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry Gerrit-Reviewer: Arlolra Gerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Sbailey Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Update GUI
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381909 ) Change subject: Update GUI .. Update GUI Change-Id: Ic20069a4a83d4d3707a5ed25d89ee9d85f4d83c1 --- M gui 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/gui b/gui index c1a865f..54d9748 16 --- a/gui +++ b/gui @@ -1 +1 @@ -Subproject commit c1a865f6d71a0b09c5642b7bff2d1fe607b5f214 +Subproject commit 54d9748cb924d504fac873edfb93b88d6d2fbb09 -- To view, visit https://gerrit.wikimedia.org/r/381909 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic20069a4a83d4d3707a5ed25d89ee9d85f4d83c1 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/rdf Gerrit-Branch: master Gerrit-Owner: Smalyshev Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] marvin[master]: Update: add revision and time ID support to page summary client
Niedzielski has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381915 ) Change subject: Update: add revision and time ID support to page summary client .. Update: add revision and time ID support to page summary client Add page revision and render time UUID support to the page data client. The page data client will also want this functionality. - Add revision and time ID parameters to page revision client. - Unmarshal ETag as a proper model. - Move RESTBase URL to response definitions file. Bug: T173317 Change-Id: Icf55b128842cb7ad36c40d9ed2a8fcd2aea39bef --- M src/common/data-clients/page-summary-data-client.ts M src/common/marshallers/page-restbase-mount-everest-expected.test.json M src/common/marshallers/page-unmarshaller.test.ts M src/common/marshallers/page-unmarshaller.ts M src/common/marshallers/restbase.ts A src/common/models/etag.ts M src/common/models/page/summary.ts 7 files changed, 39 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/15/381915/1 diff --git a/src/common/data-clients/page-summary-data-client.ts b/src/common/data-clients/page-summary-data-client.ts index bbee03c..ca1edee 100644 --- a/src/common/data-clients/page-summary-data-client.ts +++ b/src/common/data-clients/page-summary-data-client.ts @@ -8,12 +8,17 @@ // https://en.wikipedia.org/api/rest_v1/#!/Page_content/get_page_summary_title export interface Params { titlePath: PageTitlePath; + revision?: number; + timeID?: string; redirect?: PageRedirect; } -const url = ({ titlePath, redirect }: Params) => { +const url = ({ titlePath, revision, timeID, redirect }: Params) => { + const revisionPath = revision === undefined ? "" : `/${revision}`; + const timeIDPath = timeID === undefined ? "" : `/${timeID}`; const redirectParam = redirect === undefined ? "" : `&redirect=${redirect}`; - return `https://en.wikipedia.org/api/rest_v1/page/summary/${titlePath}${redirectParam}`; + return `${RESTBase.PageSummary +.BASE_URL}/${titlePath}${revisionPath}${timeIDPath}${redirectParam}`; }; const HEADERS = { diff --git a/src/common/marshallers/page-restbase-mount-everest-expected.test.json b/src/common/marshallers/page-restbase-mount-everest-expected.test.json index d56cfec..2609114 100644 --- a/src/common/marshallers/page-restbase-mount-everest-expected.test.json +++ b/src/common/marshallers/page-restbase-mount-everest-expected.test.json @@ -29,5 +29,8 @@ "latitude": 27.98805556, "longitude": 86.92527778 }, - "etag": "802006980/4f754377-a235-11e7-a776-efb84f18649a" + "etag": { +"revision": 802006980, +"timeID": "4f754377-a235-11e7-a776-efb84f18649a" + } } diff --git a/src/common/marshallers/page-unmarshaller.test.ts b/src/common/marshallers/page-unmarshaller.test.ts index a2e488b..20c9bee 100644 --- a/src/common/marshallers/page-unmarshaller.test.ts +++ b/src/common/marshallers/page-unmarshaller.test.ts @@ -4,9 +4,10 @@ import { unmarshalPageSummary } from "./page-unmarshaller"; import { RESTBase } from "./restbase"; -const ETAG = "802006980/4f754377-a235-11e7-a776-efb84f18649a"; +const ETAG_REVISION = 802006980; +const ETAG_TIME_ID = "4f754377-a235-11e7-a776-efb84f18649a"; const HEADERS = new fetch.Headers(); -HEADERS.append("etag", ETAG); +HEADERS.append("etag", `${ETAG_REVISION}/${ETAG_TIME_ID}`); const NOW = new Date(Date.now()).toString(); @@ -31,7 +32,7 @@ titleHTML: "displaytitle", descriptionText: "description", lastModified: new Date(Date.parse(NOW)), -etag: ETAG, +etag: { revision: ETAG_REVISION, timeID: ETAG_TIME_ID }, wikiLanguageCode: "en", localeDirection: "ltr", extractText: "extract", diff --git a/src/common/marshallers/page-unmarshaller.ts b/src/common/marshallers/page-unmarshaller.ts index 6122404..ea9b92f 100644 --- a/src/common/marshallers/page-unmarshaller.ts +++ b/src/common/marshallers/page-unmarshaller.ts @@ -1,4 +1,5 @@ import { PageImage, PageThumbnail } from "../models/page/image"; +import { ETag } from "../models/etag"; import { PageGeolocation } from "../models/page/geolocation"; import { PageSummary } from "../models/page/summary"; import { IsomorphicHeaders } from "../types/isomorphic-unfetch-extras"; @@ -68,12 +69,13 @@ : [extractHTML]; }; -export const unmarshalETag = (headers: IsomorphicHeaders): RESTBase.ETag => { - const eTag = headers.get("ETag"); - if (!eTag) { +export const unmarshalETag = (headers: IsomorphicHeaders): ETag => { + const etag = headers.get("ETag"); + if (!etag) { throw new Error("ETag is undefined."); } - return eTag; + const [revision, timeID] = etag.split("/"); + return { revision: parseInt(revision, 10), timeID }; }; export const unmarshalPageSummary = ({ diff --git a/src/common/marshallers/restbase.ts b/src/common/marshallers/restbase.ts index e5055c3..6b884b7 100644 --- a/src/common
[MediaWiki-commits] [Gerrit] marvin[master]: Chore: break apart page modules
Niedzielski has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381913 ) Change subject: Chore: break apart page modules .. Chore: break apart page modules There are too many models in the page module. Break them apart. Bug: T173317 Change-Id: I52dd459b517d767de8d457fcf0be679675725dfe --- M src/common/components/page-summary/page-summary.tsx M src/common/data-clients/page-summary-data-client.ts M src/common/marshallers/page-unmarshaller.test.ts M src/common/marshallers/page-unmarshaller.ts D src/common/models/page.ts A src/common/models/page/geolocation.ts A src/common/models/page/image.ts A src/common/models/page/summary.ts A src/common/models/page/title.ts M src/common/pages/summary.tsx 10 files changed, 64 insertions(+), 69 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/13/381913/1 diff --git a/src/common/components/page-summary/page-summary.tsx b/src/common/components/page-summary/page-summary.tsx index abef9fc..cd13a9a 100644 --- a/src/common/components/page-summary/page-summary.tsx +++ b/src/common/components/page-summary/page-summary.tsx @@ -1,6 +1,6 @@ import { h } from "preact"; import "./page-summary.css"; -import { PageSummary as PageSummaryModel } from "../../models/page"; +import { PageSummary as PageSummaryModel } from "../../models/page/summary"; import Content from "../content/content"; export interface Props { diff --git a/src/common/data-clients/page-summary-data-client.ts b/src/common/data-clients/page-summary-data-client.ts index 3b32d00..bbee03c 100644 --- a/src/common/data-clients/page-summary-data-client.ts +++ b/src/common/data-clients/page-summary-data-client.ts @@ -1,5 +1,6 @@ import * as fetch from "isomorphic-unfetch"; -import { PageSummary, PageTitlePath } from "../models/page"; +import { PageSummary } from "../models/page/summary"; +import { PageTitlePath } from "../models/page/title"; import { RESTBase } from "../marshallers/restbase"; import { unmarshalPageSummary } from "../marshallers/page-unmarshaller"; import { PageRedirect } from "./page-redirect"; diff --git a/src/common/marshallers/page-unmarshaller.test.ts b/src/common/marshallers/page-unmarshaller.test.ts index eada598..a2e488b 100644 --- a/src/common/marshallers/page-unmarshaller.test.ts +++ b/src/common/marshallers/page-unmarshaller.test.ts @@ -1,6 +1,6 @@ import * as assert from "assert"; import * as fetch from "node-fetch"; -import { PageSummary, pageSummaryReviver } from "../models/page"; +import { PageSummary, pageSummaryReviver } from "../models/page/summary"; import { unmarshalPageSummary } from "./page-unmarshaller"; import { RESTBase } from "./restbase"; diff --git a/src/common/marshallers/page-unmarshaller.ts b/src/common/marshallers/page-unmarshaller.ts index 83e5a41..6122404 100644 --- a/src/common/marshallers/page-unmarshaller.ts +++ b/src/common/marshallers/page-unmarshaller.ts @@ -1,9 +1,6 @@ -import { - PageGeolocation, - PageImage, - PageSummary, - PageThumbnail -} from "../models/page"; +import { PageImage, PageThumbnail } from "../models/page/image"; +import { PageGeolocation } from "../models/page/geolocation"; +import { PageSummary } from "../models/page/summary"; import { IsomorphicHeaders } from "../types/isomorphic-unfetch-extras"; import { JSONObject } from "../types/json"; import { RESTBase } from "./restbase"; diff --git a/src/common/models/page.ts b/src/common/models/page.ts deleted file mode 100644 index 334a7a3..000 --- a/src/common/models/page.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { RESTBase } from "../marshallers/restbase"; - -/** - * URL-decoded normalized wiki URL path. e.g.: Main_Page, - * Bill_&_Ted's_Excellent_Adventure. - */ -export type PageTitleID = string; - -/** - * URL-encoded normalized wiki URL path. e.g.: Main_Page, - * Bill_%26_Ted%27s_Excellent_Adventure. - */ -export type PageTitlePath = string; - -/** - * Plain text localized page title. e.g.: - * Possible: Banana, Main Page, Bill & Ted's Excellent Adventure, Talk:Pie. - * Impossible: Main_Page, Bill_%26_Ted%27s_Excellent_Adventure. - */ -export type PageTitleText = string; - -export interface PageImage { - url: string; - width: number; - height: number; - landscape: boolean; -} - -export interface PageThumbnail extends PageImage { - originalURL: string; -} - -export interface PageGeolocation { - latitude: number; - longitude: number; -} - -export interface PageSummary { - wikiLanguageCode: string; - localeDirection: string; - pageID: number; - lastModified: Date; - titleText: PageTitleText; - titleHTML: string; - descriptionText: string; - extractText: string; - extractHTML: string[]; - thumbnail?: PageThumbnail; - image?: PageImage; - geolocation?: PageGeolocation; - etag: RESTBase.ETag; -} - -export const pageSummaryReviver = (key: string, value: any): any => - key === "lastModified" ? new Date(value) : value; diff --git a/src/comm
[MediaWiki-commits] [Gerrit] marvin[master]: Demo: use types instead of data for RouteConfig
Niedzielski has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381917 ) Change subject: Demo: use types instead of data for RouteConfig .. Demo: use types instead of data for RouteConfig Change-Id: I65812adb3b0d41be74300d869d544a818182bafa --- M src/common/routers/api.ts M src/common/routers/route.ts 2 files changed, 83 insertions(+), 42 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/17/381917/1 diff --git a/src/common/routers/api.ts b/src/common/routers/api.ts index 0507147..a8a4471 100644 --- a/src/common/routers/api.ts +++ b/src/common/routers/api.ts @@ -5,42 +5,89 @@ } from "../pages/summary"; import { AnyRoute, NoPropsRoute, Route, newRoute } from "./route"; -export const home: NoPropsRoute = newRoute({ - path: "/", - importModule: () => -import(/* webpackChunkName: "pages/home" */ "../pages/home"), - chunkName: "pages/home" -}); +class HomeRouteConfig { + get path() { +return "/"; + } + get chunkName() { +return "pages/home"; + } + importModule() { +return import(/* webpackChunkName: "pages/home" */ "../pages/home"); + } +} +export const home: NoPropsRoute = newRoute(new HomeRouteConfig()); -export const about: NoPropsRoute = newRoute({ - path: "/about", - importModule: () => -import(/* webpackChunkName: "pages/about" */ "../pages/about"), - chunkName: "pages/about" -}); +class AboutRouteConfig { + get path() { +return "/about"; + } + get chunkName() { +return "pages/about"; + } + get importModule() { +return import(/* webpackChunkName: "pages/about" */ "../pages/about"); + } + get stattus() { +return 404; // fail + } +} +export const about: NoPropsRoute = newRoute(new AboutRouteConfig()); -export const summary: Route = newRoute({ - path: "/page/summary/:title", - importModule: () => -import(/* webpackChunkName: "pages/summary" */ "../pages/summary"), - chunkName: "pages/summary" -}); +class SummaryRouteConfig { + get path() { +return "/page/summary/:title"; + } + get chunkName() { +return "pages/summary"; + } + importModule() { +return import(/* webpackChunkName: "pages/summary" */ "../pages/summary"); + } +} +export const summary: Route = newRoute( + new SummaryRouteConfig() +); -export const styleGuide: NoPropsRoute = newRoute({ - path: "/dev/style-guide", - importModule: () => -import(/* webpackChunkName: "pages/style-guide" */ "../pages/style-guide"), - chunkName: "pages/style-guide" -}); +class StyleGuideRouteConfig { + get path() { +return "/dev/style-guide"; + } + get chunkName() { +return "pages/style-guide"; + } + importModule() { +// eslint-disable-next-line max-len +return import(/* webpackChunkName: "pages/style-guide" */ "../pages/style-guide"); + } +} +export const styleGuide: NoPropsRoute = newRoute(new StyleGuideRouteConfig()); -export const notFound: Route = newRoute({ - // `(.*)` is the new `*`. See - // https://github.com/pillarjs/path-to-regexp/issues/37. - path: "(.*)", - importModule: () => -import(/* webpackChunkName: "pages/not-found" */ "../pages/not-found"), - chunkName: "pages/not-found", - status: 404 -}); +class NotFoundRouteConfig { + // `(.*)` is the new `*`. See https://github.com/pillarjs/path-to-regexp/issues/37. + get path() { +return "(.*)"; + } + get chunkName() { +return "pages/not-found"; + } + get status() { +return 404; + } + importModule() { +// eslint-disable-next-line max-len +return import(/* webpackChunkName: "pages/not-found" */ "../pages/not-found"); + } +} +export const notFound: Route = newRoute( + new NotFoundRouteConfig() +); + +export type AnyRouteConfig = + | HomeRouteConfig + | AboutRouteConfig + | SummaryRouteConfig + | StyleGuideRouteConfig + | NotFoundRouteConfig; export const routes: AnyRoute[] = [home, about, summary, styleGuide, notFound]; diff --git a/src/common/routers/route.ts b/src/common/routers/route.ts index 443cf75..c672000 100644 --- a/src/common/routers/route.ts +++ b/src/common/routers/route.ts @@ -1,5 +1,6 @@ import * as pathToRegExp from "path-to-regexp"; import { AnyComponent } from "../components/preact-utils"; +import { AnyRouteConfig } from "./api"; /** * A map of path-to-regexp router path names to matches. The keys must match @@ -34,7 +35,7 @@ | { getInitialProps?: undefined; Component: AnyComponent }; /** A plain configuration used to generate a Route. */ -export interface RouteConfig< +export interface Route< Params extends RouteParams | undefined = undefined, Props = undefined > { @@ -51,13 +52,6 @@ chunkName: string; /** The request status if import and request for properties succeed. */ - status?: number; -} - -export interface Route< - Params extends RouteParams | undefined = undefined, - Props = undefined -> extends RouteConfig { status: number; /** @@ -110,7 +104,7 @@ import
[MediaWiki-commits] [Gerrit] marvin[master]: Chore: rename Namespace to PageNamespace
Niedzielski has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381914 ) Change subject: Chore: rename Namespace to PageNamespace .. Chore: rename Namespace to PageNamespace Rename Namespace to PageNamespace for consistency with the other page models. Change-Id: Iefa8896faec9d879187ca2c01f15a849916d55fd --- M src/common/models/page/namespace.test.ts M src/common/models/page/namespace.ts 2 files changed, 18 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/14/381914/1 diff --git a/src/common/models/page/namespace.test.ts b/src/common/models/page/namespace.test.ts index d8863c3..275fa3f 100644 --- a/src/common/models/page/namespace.test.ts +++ b/src/common/models/page/namespace.test.ts @@ -1,25 +1,25 @@ import * as assert from "assert"; -import { Namespace, special, main, talk, file } from "./namespace"; +import { PageNamespace, special, main, talk, file } from "./namespace"; describe("namespace", () => { describe(`.special()`, () => { -it(`is special`, () => assert.ok(special(Namespace.SPECIAL))); -it(`not special`, () => assert.ok(!special(Namespace.MAIN))); +it(`is special`, () => assert.ok(special(PageNamespace.SPECIAL))); +it(`not special`, () => assert.ok(!special(PageNamespace.MAIN))); }); describe(`.main()`, () => { -it(`is main`, () => assert.ok(main(Namespace.MAIN))); -it(`not main`, () => assert.ok(!main(Namespace.TALK))); +it(`is main`, () => assert.ok(main(PageNamespace.MAIN))); +it(`not main`, () => assert.ok(!main(PageNamespace.TALK))); }); describe(`.talk()`, () => { -it(`is talk`, () => assert.ok(talk(Namespace.TALK))); -it(`not talk`, () => assert.ok(!talk(Namespace.MAIN))); -it(`special is not talk`, () => assert.ok(!talk(Namespace.SPECIAL))); +it(`is talk`, () => assert.ok(talk(PageNamespace.TALK))); +it(`not talk`, () => assert.ok(!talk(PageNamespace.MAIN))); +it(`special is not talk`, () => assert.ok(!talk(PageNamespace.SPECIAL))); }); describe(`.file()`, () => { -it(`is file`, () => assert.ok(file(Namespace.FILE))); -it(`not file`, () => assert.ok(!file(Namespace.MAIN))); +it(`is file`, () => assert.ok(file(PageNamespace.FILE))); +it(`not file`, () => assert.ok(!file(PageNamespace.MAIN))); }); }); diff --git a/src/common/models/page/namespace.ts b/src/common/models/page/namespace.ts index 18b65be..772175c 100644 --- a/src/common/models/page/namespace.ts +++ b/src/common/models/page/namespace.ts @@ -11,7 +11,7 @@ * @see {@link https://www.mediawiki.org/wiki/Manual:Namespace#Built-in_namespaces Manual:Namespace} * @see {@link https://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces|namespacealiases Namespaces reported by API} */ -export enum Namespace { +export enum PageNamespace { MEDIA = -2, SPECIAL = -1, // The only namespace where a bitwise test of TALK_MASK fails. /** Main page, disambiguation page, or article. */ @@ -33,15 +33,15 @@ CATEGORY_TALK = 15 } -export const special = (namespace: Namespace): boolean => - namespace === Namespace.SPECIAL; +export const special = (namespace: PageNamespace): boolean => + namespace === PageNamespace.SPECIAL; -export const main = (namespace: Namespace): boolean => - namespace === Namespace.MAIN; +export const main = (namespace: PageNamespace): boolean => + namespace === PageNamespace.MAIN; -export const talk = (namespace: Namespace): boolean => +export const talk = (namespace: PageNamespace): boolean => // eslint-disable-next-line no-bitwise (namespace & TALK_MASK) === TALK_MASK && !special(namespace); -export const file = (namespace: Namespace): boolean => - namespace === Namespace.FILE; +export const file = (namespace: PageNamespace): boolean => + namespace === PageNamespace.FILE; -- To view, visit https://gerrit.wikimedia.org/r/381914 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iefa8896faec9d879187ca2c01f15a849916d55fd Gerrit-PatchSet: 1 Gerrit-Project: marvin Gerrit-Branch: master Gerrit-Owner: Niedzielski Gerrit-Reviewer: Sniedzielski ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] marvin[master]: Chore: consolidate path matching in Route
Niedzielski has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381916 ) Change subject: Chore: consolidate path matching in Route .. Chore: consolidate path matching in Route - Refactor Router path matching logic into Route.toParams(). Route already has access to the fundamental RouteConfig when it's built and shouldn't really expose intermediates like the URL parameter names or regular expression. The new design keeps tightly coupled code close and simplifies the API tests. - Rename Route.url() to toPath() since it returns a URL path, not a URL. Change-Id: I111d9fdf852baf39da0c60d3afa56f9387281f7e --- M src/common/components/header/header.tsx M src/common/pages/home.tsx M src/common/routers/api.test.ts M src/common/routers/route.ts M src/common/routers/router.ts 5 files changed, 57 insertions(+), 57 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/16/381916/1 diff --git a/src/common/components/header/header.tsx b/src/common/components/header/header.tsx index c7eb263..afd2196 100644 --- a/src/common/components/header/header.tsx +++ b/src/common/components/header/header.tsx @@ -11,7 +11,7 @@ - + diff --git a/src/common/pages/home.tsx b/src/common/pages/home.tsx index 457f8a4..6de4511 100644 --- a/src/common/pages/home.tsx +++ b/src/common/pages/home.tsx @@ -11,32 +11,32 @@ Here are some test links for the time being: - Home + Home - About + About - Style Guide + Style Guide - Banana + Banana Bill & Ted's Excellent Adventure - Cucumber + Cucumber - Ice cream + Ice cream - + Article without image diff --git a/src/common/routers/api.test.ts b/src/common/routers/api.test.ts index 72361a7..fed181b 100644 --- a/src/common/routers/api.test.ts +++ b/src/common/routers/api.test.ts @@ -12,26 +12,19 @@ params: Params; }) => it(name, () => { -const url = route.url(params); -const [, ...paramValues] = route.pathRe.exec(url) || []; -assert.ok( - route.paramNames.length === -Object.keys((params as RouteParams) || {}).length -); -route.paramNames.forEach((key, index) => { - const expected = encodeURIComponent((params as RouteParams)[key.name]); - const actual = paramValues[index]; - assert.deepStrictEqual( -actual, -expected, -`${key.name} value differs. Expected: ${expected}; actual: ${actual}.` - ); +const expected: RouteParams = {}; +Object.keys((params as RouteParams) || {}).forEach(name => { + const value = (params as RouteParams)[name]; + expected[name] = encodeURIComponent(value); }); + +const path = route.toPath(params); +const result = route.toParams(path); +assert.deepStrictEqual(result, expected); }); describe("api", () => { - // eslint-disable-next-line max-len - describe("each route's path, URL parameters, and route parameters match:", () => { + describe("each route's path and URL path parameters match:", () => { [ { name: "home", route: home, params: undefined }, { name: "about", route: about, params: undefined }, diff --git a/src/common/routers/route.ts b/src/common/routers/route.ts index bcdfe54..443cf75 100644 --- a/src/common/routers/route.ts +++ b/src/common/routers/route.ts @@ -60,21 +60,47 @@ > extends RouteConfig { status: number; - /** A regular expression for matching a URL path and capturing RouteParams. */ - pathRe: RegExp; + /** + * Generate a Params object from a given URL path or void if the path does not + * match. An empty object is returned for matching NoPropsRoutes. + */ + toParams(path: string): Params | void; // eslint-disable-line no-use-before-define - /** Parameter names. These are used to generate a Params object. */ - paramNames: pathToRegExp.Key[]; - - /** Generates a URL from RouteParams. */ - url(params: Params): string; + /** Generates a URL path from Params. */ + toPath(params: Params): string; } export interface NoPropsRoute extends Route { - url(params?: undefined): string; + toPath(params?: undefined): string; } export type AnyRoute = Route; + +// This function is tightly coupled with Route.path and the parameters supplied +// to PageModule.getInitialProps. Route.path must use names that match the +// typing for the parameters of PageModule.getInitialProps(). This method only +// associates the names of Route.path with the values found in the matched URL +// path. +const toParams = ({ + pathRegExp, + paramNames, + path +}: { + path
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: CRM-21202, set retrieve = true so that its not reinitialized...
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381912 ) Change subject: CRM-21202, set retrieve = true so that its not reinitialized again and just want the DataTable instance to be returned .. CRM-21202, set retrieve = true so that its not reinitialized again and just want the DataTable instance to be returned Pulled from upstream, observed when working on dedupe bug: Bug: T176256 * CRM-21202: DataTables warning: table id=dupePairs https://issues.civicrm.org/jira/browse/CRM-21202 Change-Id: I84dcc2c839f909a94fc9f2ae007390e0189ae872 --- M templates/CRM/Contact/Page/DedupeFind.tpl 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/12/381912/1 diff --git a/templates/CRM/Contact/Page/DedupeFind.tpl b/templates/CRM/Contact/Page/DedupeFind.tpl index f518420..df90aa0 100644 --- a/templates/CRM/Contact/Page/DedupeFind.tpl +++ b/templates/CRM/Contact/Page/DedupeFind.tpl @@ -180,6 +180,7 @@ "ajax": { "url": {/literal}'{$sourceUrl}'{literal} }, + "retrieve": true, rowCallback: function (row, data) { // Set the checked state of the checkbox in the table $('input.crm-dedupe-select', row).prop('checked', data.is_selected == 1); -- To view, visit https://gerrit.wikimedia.org/r/381912 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84dcc2c839f909a94fc9f2ae007390e0189ae872 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PasswordBlacklist[master]: Initial implementation of the PasswordBlacklist
Reedy has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381911 ) Change subject: Initial implementation of the PasswordBlacklist .. Initial implementation of the PasswordBlacklist Password list source came from GitHub [1] [1] https://github.com/danielmiessler/SecLists/blob/aad07ff/Passwords/10_million_password_list_top_10.txt Change-Id: Ib467cbeae655b55d445c42d6f211b7e470d9da6b --- M README.md A scripts/data/10_million_password_list_top_10.txt A scripts/generate.php M src/PasswordBlacklist.php A src/blacklist.ser M tests/PasswordBlacklistTest.php 6 files changed, 100,094 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/PasswordBlacklist refs/changes/11/381911/1 -- To view, visit https://gerrit.wikimedia.org/r/381911 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib467cbeae655b55d445c42d6f211b7e470d9da6b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/libs/PasswordBlacklist Gerrit-Branch: master Gerrit-Owner: Reedy ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: Fix UI batch merge mishandling context paramter.
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381910 ) Change subject: Fix UI batch merge mishandling context paramter. .. Fix UI batch merge mishandling context paramter. This has been added to upstream pr https://github.com/civicrm/civicrm-core/pull/11030/files#diff-55c4322ff620a36ba6af19fb5757721cR110 Bug: T176256 Change-Id: Ic32ee22b31b6b404cc801e323393454c7db2fa6e --- M CRM/Contact/Page/DedupeMerge.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/10/381910/1 diff --git a/CRM/Contact/Page/DedupeMerge.php b/CRM/Contact/Page/DedupeMerge.php index 1c95481..bd0870f 100644 --- a/CRM/Contact/Page/DedupeMerge.php +++ b/CRM/Contact/Page/DedupeMerge.php @@ -117,7 +117,7 @@ } // Setup the Runner -$urlQry .= "&context=conflicts"; +$urlQry['context'] = "conflicts"; $runner = new CRM_Queue_Runner(array( 'title' => ts('Merging Duplicates..'), 'queue' => $queue, -- To view, visit https://gerrit.wikimedia.org/r/381910 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic32ee22b31b6b404cc801e323393454c7db2fa6e Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DataTypes[master]: Add php-parallel-lint
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381706 ) Change subject: Add php-parallel-lint .. Add php-parallel-lint php-lint will test for valid php files Also add composer fix with phpcbf Change-Id: Ic9dcc56652ec5396ae79254ef4731b1e033371fb --- M composer.json 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/composer.json b/composer.json index d01ff77..39a6c87 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,9 @@ }, "require-dev": { "phpunit/phpunit": "~4.8", - "wikibase/wikibase-codesniffer": "^0.1.0" + "wikibase/wikibase-codesniffer": "^0.1.0", + "jakub-onderka/php-parallel-lint": "0.9.2", + "jakub-onderka/php-console-highlighter": "0.3.2" }, "autoload": { "files" : [ @@ -39,7 +41,9 @@ } }, "scripts": { + "fix": "phpcbf", "test": [ + "parallel-lint . --exclude vendor --exclude node_modules", "phpcs -p -s" ] } -- To view, visit https://gerrit.wikimedia.org/r/381706 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic9dcc56652ec5396ae79254ef4731b1e033371fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataTypes Gerrit-Branch: master Gerrit-Owner: Umherirrender Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...EducationProgram[master]: Exclude failing sniff
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381759 ) Change subject: Exclude failing sniff .. Exclude failing sniff FILE: EducationProgram\includes\rows\Org.php -- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES -- 92 | WARNING | Should use function $this->msg() rather than function | | wfMessage() . | | (MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage) 97 | WARNING | Should use function $this->msg() rather than function | | wfMessage() . | | (MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage) -- No idea why tests not failing Change-Id: I035e6384728ee31d4d48abe45c57860231d1d3e1 --- M phpcs.xml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/phpcs.xml b/phpcs.xml index eca099d..2b8d3f2 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -14,6 +14,7 @@ + -- To view, visit https://gerrit.wikimedia.org/r/381759 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I035e6384728ee31d4d48abe45c57860231d1d3e1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EducationProgram Gerrit-Branch: master Gerrit-Owner: Umherirrender Gerrit-Reviewer: AndyRussG Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...BlockAndNuke[master]: build: Always exclude vendor and node_modules
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381708 ) Change subject: build: Always exclude vendor and node_modules .. build: Always exclude vendor and node_modules Change-Id: I5fa2b4905666db7bc5e9e61fd86e54f5542b3a0f --- M Gruntfile.js M composer.json M phpcs.xml 3 files changed, 8 insertions(+), 7 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/Gruntfile.js b/Gruntfile.js index 545b62a..4fcc7ca 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -10,7 +10,8 @@ jsonlint: { all: [ '**/*.json', - '!node_modules/**' + '!node_modules/**', + '!vendor/**' ] } } ); diff --git a/composer.json b/composer.json index cbb6402..02fe286 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ }, "scripts": { "test": [ - "parallel-lint . --exclude vendor", + "parallel-lint . --exclude vendor --exclude node_modules", "phpcs -p -s" ], "fix": "phpcbf" diff --git a/phpcs.xml b/phpcs.xml index a58fadc..f2a28a0 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -2,11 +2,11 @@ - - - - - + + + + + . -- To view, visit https://gerrit.wikimedia.org/r/381708 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5fa2b4905666db7bc5e9e61fd86e54f5542b3a0f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlockAndNuke Gerrit-Branch: master Gerrit-Owner: Umherirrender Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Memento[master]: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381709 ) Change subject: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0 .. build: Updating mediawiki/mediawiki-codesniffer to 13.0.0 Change-Id: I2567cdf599d16073141381b3555f045233bc08ea --- M Memento/Memento.body.php M Memento/TimeGate.php M Memento/TimeMap.php M Memento/TimeMapResource.php M composer.json M phpcs.xml 6 files changed, 10 insertions(+), 9 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/Memento/Memento.body.php b/Memento/Memento.body.php index 0ae9257..516904c 100644 --- a/Memento/Memento.body.php +++ b/Memento/Memento.body.php @@ -136,7 +136,7 @@ if ( is_object( $revision ) ) { $this->articleDatetime = $revision->getTimestamp(); - $db = wfGetDB( DB_SLAVE ); + $db = wfGetDB( DB_REPLICA ); $oldID = $article->getOldID(); $request = $article->getContext()->getRequest(); diff --git a/Memento/TimeGate.php b/Memento/TimeGate.php index f8b4438..83873fb 100644 --- a/Memento/TimeGate.php +++ b/Memento/TimeGate.php @@ -74,7 +74,7 @@ $article = new Article( $title ); $article->setContext( $this->getContext() ); - $db = wfGetDB( DB_SLAVE ); + $db = wfGetDB( DB_REPLICA ); if ( !$title->exists() ) { throw new ErrorPageError( 'timegate-title', 'timegate-404-title', [ $urlparam ] ); diff --git a/Memento/TimeMap.php b/Memento/TimeMap.php index b48ddf5..7b12ab6 100644 --- a/Memento/TimeMap.php +++ b/Memento/TimeMap.php @@ -73,7 +73,7 @@ $article = new Article( $title ); $article->setContext( $this->getContext() ); - $db = wfGetDB( DB_SLAVE ); + $db = wfGetDB( DB_REPLICA ); if ( !$title->exists() ) { throw new ErrorPageError( 'timemap-title', 'timemap-404-title', [ $urlparam ] ); diff --git a/Memento/TimeMapResource.php b/Memento/TimeMapResource.php index 73124d5..bf64f8f 100644 --- a/Memento/TimeMapResource.php +++ b/Memento/TimeMapResource.php @@ -332,7 +332,7 @@ * * @param string $urlparam the data passed into a SpecialPage * -* @returns string timestamp if found; null otherwise +* @return string timestamp if found; null otherwise */ public function extractTimestampPivot( $urlparam ) { $pivot = null; @@ -364,7 +364,7 @@ * * @param string $timestamp * -* @returns formatted timestamp; null if error +* @return formatted timestamp; null if error */ public function formatTimestampForDatabase( $timestamp ) { $formattedTimestamp = null; @@ -399,7 +399,7 @@ * the keys 'uri', 'from', and 'until' referring to the URI of * the TimeMap and its from and until dates * -* @returns string formatted timemap +* @return string formatted timemap */ public function generateTimeMapText( $data, $timeMapURI, Title $titleObj, $pagedTimeMapEntries = [] ) { diff --git a/composer.json b/composer.json index 1409209..012d7b8 100644 --- a/composer.json +++ b/composer.json @@ -2,11 +2,11 @@ "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", "jakub-onderka/php-console-highlighter": "0.3.2", - "mediawiki/mediawiki-codesniffer": "0.12.0" + "mediawiki/mediawiki-codesniffer": "13.0.0" }, "scripts": { "fix": "phpcbf", - "lint": "parallel-lint --exclude vendor --exclude node_modules", + "lint": "parallel-lint . --exclude vendor --exclude node_modules", "phpcs": "phpcs -p -s", "test": [ "composer lint", diff --git a/phpcs.xml b/phpcs.xml index 64b92ce..665dca1 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -20,7 +20,8 @@ . - + + ^Memento\.php -- To view, visit https://gerrit.wikimedia.org/r/381709 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2567cdf599d16073141381b3555f045233bc08ea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Memento Gerrit-Branch: master Gerrit-Owner: Umherirrender Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mai
[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: fix spotbugs warnings on common module
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381410 ) Change subject: fix spotbugs warnings on common module .. fix spotbugs warnings on common module Change-Id: If396d11cfd496df147dba591e956c0605a5d2903 --- M common/src/main/java/org/wikidata/query/rdf/common/WikibaseDate.java M common/src/main/java/org/wikidata/query/rdf/common/WikibasePoint.java M common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java 3 files changed, 16 insertions(+), 9 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/common/src/main/java/org/wikidata/query/rdf/common/WikibaseDate.java b/common/src/main/java/org/wikidata/query/rdf/common/WikibaseDate.java index 036801b..ab84b3d 100644 --- a/common/src/main/java/org/wikidata/query/rdf/common/WikibaseDate.java +++ b/common/src/main/java/org/wikidata/query/rdf/common/WikibaseDate.java @@ -19,6 +19,7 @@ * Handles wikidata dates. Note that this ignores leap seconds. This isn't ok * but its what joda time does so it where we're starting. */ +@SuppressFBWarnings(value = "PL_PARALLEL_LISTS", justification = "SECONDS_PER_MONTH and SECONDS_PER_MONTH_CUMULATIVE make sense as separate arrays") public class WikibaseDate { //private static final transient Logger log = LoggerFactory.getLogger(WikibaseDate.class); @@ -304,8 +305,7 @@ result = prime * result + minute; result = prime * result + month; result = prime * result + second; -result = prime * result + (int) (year ^ (year >>> 32)); -return result; +return prime * result + (int) (year ^ (year >>> 32)); } @Override diff --git a/common/src/main/java/org/wikidata/query/rdf/common/WikibasePoint.java b/common/src/main/java/org/wikidata/query/rdf/common/WikibasePoint.java index ef3dfde..038288f 100644 --- a/common/src/main/java/org/wikidata/query/rdf/common/WikibasePoint.java +++ b/common/src/main/java/org/wikidata/query/rdf/common/WikibasePoint.java @@ -2,6 +2,8 @@ import java.util.Locale; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * Representation of a coordinate point in Wikibase. */ @@ -123,6 +125,7 @@ * @param globe * @param order */ +@SuppressFBWarnings(value = "CLI_CONSTANT_LIST_INDEX", justification = "array used as a pair") public WikibasePoint(String[] components, String globe, CoordinateOrder order) { if (order == CoordinateOrder.LAT_LONG) { latitude = components[0]; @@ -159,23 +162,23 @@ * @return String representation. */ public String toOrder(CoordinateOrder order) { -final StringBuffer buf = new StringBuffer(); +final StringBuilder buf = new StringBuilder(); if (globe != null) { -buf.append("<"); +buf.append('<'); buf.append(globe); buf.append("> "); } buf.append("Point("); if (order == CoordinateOrder.LAT_LONG) { buf.append(latitude); -buf.append(" "); +buf.append(' '); buf.append(longitude); } else { buf.append(longitude); -buf.append(" "); +buf.append(' '); buf.append(latitude); } -buf.append(")"); +buf.append(')'); return buf.toString(); } } diff --git a/common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java b/common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java index 68dc6b2..107ac58 100644 --- a/common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java +++ b/common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java @@ -1,5 +1,7 @@ package org.wikidata.query.rdf.common.uri; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * Uris wikibase uses that are relative to the wikibase instance. */ @@ -170,6 +172,7 @@ /** * Add the prefixes for all related uris. */ +@SuppressFBWarnings(value = "CBX_CUSTOM_BUILT_XML", justification = "false positive - not actually XML") public StringBuilder prefixes(StringBuilder query) { query.append("PREFIX wdata: <").append(entityData).append(">\n"); query.append("PREFIX wd: <").append(entity).append(">\n"); @@ -252,9 +255,10 @@ */ public static WikibaseUris getURISystem() { if (uriSystem == null) { -if (System.getProperty(WIKIBASE_HOST_PROPERTY) != null) { +String wikibaseHostProperty = System.getProperty(WIKIBASE_HOST_PROPERTY); +if (wikibaseHostProperty != null) { uriSystem = new WikibaseUris( -System.getProperty(WIKIBASE_HOST_PROPERTY)); +wikibaseHostProperty); } else { uriSystem = WIKIDATA;
[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Update GUI
Smalyshev has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381909 ) Change subject: Update GUI .. Update GUI Change-Id: Ic20069a4a83d4d3707a5ed25d89ee9d85f4d83c1 --- M gui 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf refs/changes/09/381909/1 diff --git a/gui b/gui index c1a865f..54d9748 16 --- a/gui +++ b/gui @@ -1 +1 @@ -Subproject commit c1a865f6d71a0b09c5642b7bff2d1fe607b5f214 +Subproject commit 54d9748cb924d504fac873edfb93b88d6d2fbb09 -- To view, visit https://gerrit.wikimedia.org/r/381909 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic20069a4a83d4d3707a5ed25d89ee9d85f4d83c1 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/rdf Gerrit-Branch: master Gerrit-Owner: Smalyshev ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Merge UserSecurity into UserProfile
SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381908 ) Change subject: Merge UserSecurity into UserProfile .. Merge UserSecurity into UserProfile UserSecurity is small enough that it doesn't need it's own folder, and is related to UserProfile (handles visibility of certain profile fields), so it's being merged into there. Change-Id: I6e893b93347a9eafdd04416c88b179e389123c6e --- M SocialProfile.php R UserProfile/UserSecurityClass.php 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile refs/changes/08/381908/1 diff --git a/SocialProfile.php b/SocialProfile.php index ad052ef..d1a9805 100644 --- a/SocialProfile.php +++ b/SocialProfile.php @@ -71,7 +71,7 @@ $wgAutoloadClasses['TopUsersPoints'] = __DIR__ . '/UserStats/TopUsers.php'; $wgAutoloadClasses['wAvatar'] = __DIR__ . '/UserProfile/AvatarClass.php'; $wgAutoloadClasses['AvatarParserFunction'] = __DIR__ . '/UserProfile/AvatarParserFunction.php'; -$wgAutoloadClasses['SPUserSecurity'] = __DIR__ . '/UserSecurity/UserSecurityClass.php'; +$wgAutoloadClasses['SPUserSecurity'] = __DIR__ . '/UserProfile/UserSecurityClass.php'; // API modules $wgAutoloadClasses['ApiUserProfilePrivacy'] = __DIR__ . '/UserProfile/ApiUserProfilePrivacy.php'; diff --git a/UserSecurity/UserSecurityClass.php b/UserProfile/UserSecurityClass.php similarity index 100% rename from UserSecurity/UserSecurityClass.php rename to UserProfile/UserSecurityClass.php -- To view, visit https://gerrit.wikimedia.org/r/381908 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e893b93347a9eafdd04416c88b179e389123c6e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SocialProfile Gerrit-Branch: master Gerrit-Owner: SamanthaNguyen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: add releases-jenkins apache/varnish, move jenkins proxy config
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381907 ) Change subject: add releases-jenkins apache/varnish, move jenkins proxy config .. add releases-jenkins apache/varnish, move jenkins proxy config Bug: T164030 Change-Id: Ida13a4f8af2e82497d1fd0600b44f2256d184f73 --- M hieradata/role/common/cache/misc.yaml M manifests/site.pp M modules/profile/manifests/releases/mediawiki.pp M modules/releases/manifests/init.pp A modules/releases/templates/apache-jenkins.conf.erb M modules/releases/templates/apache.conf.erb 6 files changed, 33 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/07/381907/1 diff --git a/hieradata/role/common/cache/misc.yaml b/hieradata/role/common/cache/misc.yaml index f5830c5..00bf122 100644 --- a/hieradata/role/common/cache/misc.yaml +++ b/hieradata/role/common/cache/misc.yaml @@ -110,6 +110,9 @@ backends: eqiad: 'releases1001.eqiad.wmnet' codfw: 'releases2001.codfw.wmnet' + releases_jenkins: +backends: + eqiad: 'releases1001.eqiad.wmnet' ruthenium: be_opts: port: 8001 @@ -240,6 +243,8 @@ director: 'krypton' releases.wikimedia.org: director: 'releases' + releases-jenkins.wikimedia.org: +director: 'releases_jenkins' rt.wikimedia.org: director: 'ununpentium' scholarships.wikimedia.org: diff --git a/manifests/site.pp b/manifests/site.pp index dae5e1c..f91191f 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2079,6 +2079,7 @@ } # https://releases.wikimedia.org - VMs for releases (mediawiki and other) +# https://releases-jenkins.wikimedia.org - for releases admins node /^releases[12]001\.(codfw|eqiad)\.wmnet$/ { role(releases) interface::add_ip6_mapped { 'main': } diff --git a/modules/profile/manifests/releases/mediawiki.pp b/modules/profile/manifests/releases/mediawiki.pp index 91f363c..16d8921 100644 --- a/modules/profile/manifests/releases/mediawiki.pp +++ b/modules/profile/manifests/releases/mediawiki.pp @@ -17,7 +17,8 @@ } class { '::releases': -sitename => 'releases.wikimedia.org', +sitename => 'releases.wikimedia.org', +sitename_jenkins => 'releases-jenkins.wikimedia.org', } monitoring::service { 'http': diff --git a/modules/releases/manifests/init.pp b/modules/releases/manifests/init.pp index 973ebb2..59e1200 100644 --- a/modules/releases/manifests/init.pp +++ b/modules/releases/manifests/init.pp @@ -4,7 +4,7 @@ # that will serve static files # # production: https://releases.wikimedia.org -# +# jenkins:https://releases-jenkins.wikimedia.org # requirements: # # - initial content must be manually copied into @@ -23,6 +23,7 @@ class releases ( $sitename = undef, +$sitename_jenkins = undef, $server_admin = 'n...@wikimedia.org', ) { @@ -55,6 +56,10 @@ content => template('releases/apache.conf.erb'), } +apache::site { $sitename_jenkins: +content => template('releases/apache-jenkins.conf.erb'), +} + file { '/srv/org/wikimedia/releases/releases-header.html': ensure => 'present', mode => '0444', diff --git a/modules/releases/templates/apache-jenkins.conf.erb b/modules/releases/templates/apache-jenkins.conf.erb new file mode 100644 index 000..31d4348 --- /dev/null +++ b/modules/releases/templates/apache-jenkins.conf.erb @@ -0,0 +1,19 @@ + +ServerName <%= @sitename_jenkins %> +ServerAdmin <%= @server_admin %> + +DocumentRoot /srv/org/wikimedia/releases/ + +ProxyRequests Off +ProxyVia Off +ProxyPreserveHost On +ProxyPass /ci/ http://127.0.0.1:8080/ci/ retry=0 nocanon +ProxyPassReverse /ci http://localhost:8080/ci + +ErrorLog /var/log/apache2/<%= @sitename_jenkins %>.error.log + +LogLevel warn + +CustomLog /var/log/apache2/<%= @sitename_jenkins %>.access.log wmf +ServerSignature On + diff --git a/modules/releases/templates/apache.conf.erb b/modules/releases/templates/apache.conf.erb index 5cf2a81..ca4715f 100644 --- a/modules/releases/templates/apache.conf.erb +++ b/modules/releases/templates/apache.conf.erb @@ -22,12 +22,6 @@ HeaderName ./releases-header-mw.html -ProxyRequests Off -ProxyVia Off -ProxyPreserveHost On -ProxyPass /ci/ http://127.0.0.1:8080/ci/ retry=0 nocanon -ProxyPassReverse /ci http://localhost:8080/ci - ErrorLog /var/log/apache2/<%= @sitename %>.error.log LogLevel warn -- To view, visit https://gerrit.wikimedia.org/r/381907 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida13a4f8af2e82497d1fd0600b44f2256d184f73 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commit
[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Remove extraneous extension credits
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381906 ) Change subject: Remove extraneous extension credits .. Remove extraneous extension credits These extension credits are being removed so that instead, there will only be credits for each sub-module (UserProfile, SystemGifts, etc) and SocialProfile itself. Change-Id: Ibb82ebeb40fb47814cb640588794b91aa0c48ce8 --- M SocialProfile.php M UserGifts/Gifts.php 2 files changed, 1 insertion(+), 146 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/SocialProfile.php b/SocialProfile.php index d9ac323..ad052ef 100644 --- a/SocialProfile.php +++ b/SocialProfile.php @@ -154,97 +154,6 @@ 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', 'descriptionmsg' => 'socialprofile-desc', ); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'TopUsers', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'Adds a special page for viewing the list of users with the most points.', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'UploadAvatar', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for uploading Avatars', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'RemoveAvatar', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for removing users\' avatars', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'PopulateExistingUsersProfiles', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for initializing social profiles for existing wikis', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'ToggleUserPage', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for updating a user\'s userpage preference', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'UpdateProfile', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page to allow users to update their social profile', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'SendBoardBlast', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page to allow users to send a mass board message by selecting from a list of their friends and foes', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'UserBoard', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'Display User Board messages for a user', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'AddRelationship', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for adding friends/foe requests for existing users in the wiki', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'RemoveRelationship', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for removing existing friends/foes for the current logged in user', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'ViewRelationshipRequests', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for viewing open relationship requests for the current logged in user', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'ViewRelationships', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for viewing all relationships by type', -); -$wgExtensionCredits['parserhook'][] = array( - 'path' => __FILE__, - 'name' => 'Avatar', - 'author' => 'Adam Carter', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'descri
[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Remove extraneous extension credits
SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381906 ) Change subject: Remove extraneous extension credits .. Remove extraneous extension credits These extension credits are being removed so that instead, there will only be credits for each sub-module (UserProfile, SystemGifts, etc) and SocialProfile itself. Change-Id: Ibb82ebeb40fb47814cb640588794b91aa0c48ce8 --- M SocialProfile.php M UserGifts/Gifts.php 2 files changed, 1 insertion(+), 146 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile refs/changes/06/381906/1 diff --git a/SocialProfile.php b/SocialProfile.php index d9ac323..ad052ef 100644 --- a/SocialProfile.php +++ b/SocialProfile.php @@ -154,97 +154,6 @@ 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', 'descriptionmsg' => 'socialprofile-desc', ); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'TopUsers', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'Adds a special page for viewing the list of users with the most points.', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'UploadAvatar', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for uploading Avatars', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'RemoveAvatar', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for removing users\' avatars', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'PopulateExistingUsersProfiles', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for initializing social profiles for existing wikis', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'ToggleUserPage', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for updating a user\'s userpage preference', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'UpdateProfile', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page to allow users to update their social profile', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'SendBoardBlast', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page to allow users to send a mass board message by selecting from a list of their friends and foes', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'UserBoard', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'Display User Board messages for a user', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'AddRelationship', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for adding friends/foe requests for existing users in the wiki', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'RemoveRelationship', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for removing existing friends/foes for the current logged in user', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'ViewRelationshipRequests', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for viewing open relationship requests for the current logged in user', -); -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'ViewRelationships', - 'author' => 'David Pean', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile', - 'description' => 'A special page for viewing all relationships by type', -); -$wgExtensionCredits['parserhook'][] = array( - 'path' => __FILE__, - 'name' => 'Avatar', - 'author' => 'Adam Carter', - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProf
[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Checkstyle: fix import order
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/380714 ) Change subject: Checkstyle: fix import order .. Checkstyle: fix import order The checkstyle rule tries to match the default import order of Eclipse. Most of the corrections seem to be either related to files edited with IntelliJ or to a recent correction to the Eclipse formatter (com.* packages were supposedly not sorted correctly until recent versions). Change-Id: I79c9455f92086f6b63b36472b7d0b1dd98b4c329 --- M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/filters/ClientIPFilter.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/geo/GeoService.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/EmptyLabelServiceOptimizer.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/LabelService.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/LabelServiceExtractOptimizer.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/ldf/BigdataStatementToJenaStatementMapper.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/ldf/BlazegraphBasedTPFRequestProcessor.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/ldf/BlazegraphDataSource.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/ldf/BlazegraphDataSourceType.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/ldf/TPFRequestParserForBlazegraph.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/ldf/TriplePatternElementParserForBlazegraph.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/throttling/Throttler.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/throttling/ThrottlingFilter.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/throttling/ThrottlingState.java M blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/throttling/UserAgentIpAddressBucketing.java M blazegraph/src/test/java/org/wikidata/query/rdf/blazegraph/filters/ClientIPFilterTest.java M blazegraph/src/test/java/org/wikidata/query/rdf/blazegraph/mwapi/MWApiServiceCallUnitTest.java M blazegraph/src/test/java/org/wikidata/query/rdf/blazegraph/throttling/ThrottlerTest.java M blazegraph/src/test/java/org/wikidata/query/rdf/blazegraph/throttling/ThrottlingStateTest.java M blazegraph/src/test/java/org/wikidata/query/rdf/blazegraph/throttling/UserAgentIpAddressBucketingTest.java M common/src/main/java/org/wikidata/query/rdf/common/WikibaseDate.java M common/src/test/java/org/wikidata/query/rdf/common/WikibaseDateUnitTest.java M common/src/test/java/org/wikidata/query/rdf/common/WikibasePointUnitTest.java M src/build/checkstyle/checkstyle.xml M testTools/src/main/java/org/wikidata/query/rdf/test/Matchers.java M testTools/src/main/java/org/wikidata/query/rdf/test/StatementHelper.java M tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java M tools/src/main/java/org/wikidata/query/rdf/tool/Update.java M tools/src/main/java/org/wikidata/query/rdf/tool/Updater.java M tools/src/main/java/org/wikidata/query/rdf/tool/change/Change.java M tools/src/main/java/org/wikidata/query/rdf/tool/change/IdListChangeSource.java M tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java M tools/src/main/java/org/wikidata/query/rdf/tool/options/OptionsUtils.java M tools/src/main/java/org/wikidata/query/rdf/tool/options/UpdateOptions.java M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/RdfRepository.java M tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java 36 files changed, 225 insertions(+), 201 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/filters/ClientIPFilter.java b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/filters/ClientIPFilter.java index 9d3211c..be9a24f 100644 --- a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/filters/ClientIPFilter.java +++ b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/filters/ClientIPFilter.java @@ -1,5 +1,9 @@ package org.wikidata.query.rdf.blazegraph.filters; +import java.io.IOException; +import java.net.InetAddress; +import java.net.UnknownHostException; + import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; @@ -8,9 +12,6 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; /** * Wrap {@link HttpServletRequest} so that it honors the "X-Real-IP" header. diff --git a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/geo/GeoService.java b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/geo/GeoServic
[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Output simple list of running jobs
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381905 ) Change subject: Output simple list of running jobs .. Output simple list of running jobs Easy to ingest into prometheus. run-job -l -r will list the names of each running job, one per line. Change-Id: Ib00977e616c4d641af5b6730097dd64dad8576cb --- M bin/run-job 1 file changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control refs/changes/05/381905/1 diff --git a/bin/run-job b/bin/run-job index d2edf5e..7e615c4 100755 --- a/bin/run-job +++ b/bin/run-job @@ -9,21 +9,21 @@ from processcontrol import job_state -def list_jobs(verbose): +def list_jobs(verbose=True, only_running=False): for job_slug in job_spec.list(): try: + # FIXME: Nicer if this inner loop moved to Job rather than having + # status come from an ephemeral runner. + job = job_spec.load(job_slug) + status = runner.JobRunner(job).status() + if status is None and only_running: + continue if verbose: - # FIXME: Nicer if this inner loop moved to Job rather than having - # status come from an ephemeral runner. - job = job_spec.load(job_slug) message = "{job} - {name}".format(job=job_slug, name=job.name) - status = runner.JobRunner(job).status() if status is not None: message += "" + yaml.dump(status).strip() - - # TODO: command-line flag to verbose or not. if job.description is not None: - message += "\n " + job.description + message += "\n " + job.description.strip() if len(job.tags) > 0: message += "\n tags: " + ", ".join(job.tags) @@ -34,10 +34,12 @@ message = job_slug except AssertionError: + if only_running: + continue if verbose: message = "{job} ***Invalid configuration***".format(job=job_slug) else: - break + message = job_slug print(message) @@ -51,6 +53,7 @@ job_group.add_argument("-j", "--job", dest="job_name", help="Run a given job.", type=str) parser.add_argument("-l", "--list-jobs", help="Print a list of available jobs.", action='store_true') parser.add_argument("-s", "--status", help="Print status of all jobs.", action='store_true') + parser.add_argument("-r", "--only-running", help="Only list or print status of running jobs.", action='store_true') parser.add_argument( "-w", "--slow-start", @@ -71,8 +74,5 @@ runner = runner.JobRunner(job) runner.run(**vars(args)) - if args.list_jobs: - list_jobs(False) - - if args.status: - list_jobs(True) + if args.list_jobs or args.status: + list_jobs(verbose=args.status, only_running=args.only_running) -- To view, visit https://gerrit.wikimedia.org/r/381905 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib00977e616c4d641af5b6730097dd64dad8576cb Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/process-control Gerrit-Branch: master Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dns[master]: remove endowment.wikimedia.org
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381904 ) Change subject: remove endowment.wikimedia.org .. remove endowment.wikimedia.org endowment.wikimedia.org will not be used after all. A separate domain name from wikimedia.org will be used. Bug: T136735 Change-Id: Ia04a6e6570a8b8a1e306b192b411b9d3e5d10442 --- M templates/wikimedia.org 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 33707bb..981e592 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -521,7 +521,6 @@ docker-registry 600 IN DYNA geoip!misc-addrs docs600 IN DYNA geoip!text-addrs -endowment 600 IN DYNA geoip!misc-addrs ldap-corp.eqiad 1H IN CNAMEdubnium ldap-corp.codfw 1H IN CNAMEpollux ldap-labs.eqiad 1H IN CNAMEseaborgium -- To view, visit https://gerrit.wikimedia.org/r/381904 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia04a6e6570a8b8a1e306b192b411b9d3e5d10442 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Dzahn Gerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dns[master]: remove endowment.wikimedia.org
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381904 ) Change subject: remove endowment.wikimedia.org .. remove endowment.wikimedia.org endowment.wikimedia.org will not be used after all. A separate domain name from wikimedia.org will be used. Bug: T136735 Change-Id: Ia04a6e6570a8b8a1e306b192b411b9d3e5d10442 --- M templates/wikimedia.org 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/04/381904/1 diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 33707bb..981e592 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -521,7 +521,6 @@ docker-registry 600 IN DYNA geoip!misc-addrs docs600 IN DYNA geoip!text-addrs -endowment 600 IN DYNA geoip!misc-addrs ldap-corp.eqiad 1H IN CNAMEdubnium ldap-corp.codfw 1H IN CNAMEpollux ldap-labs.eqiad 1H IN CNAMEseaborgium -- To view, visit https://gerrit.wikimedia.org/r/381904 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia04a6e6570a8b8a1e306b192b411b9d3e5d10442 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Add LOV and OBO and OpenCitations
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381902 ) Change subject: Add LOV and OBO and OpenCitations .. Add LOV and OBO and OpenCitations Change-Id: I80f7c6d30baadcfa045c8b39a4be1b55acffdc87 --- M copyright.html 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/copyright.html b/copyright.html index 2b88118..e247dab 100644 --- a/copyright.html +++ b/copyright.html @@ -27,6 +27,7 @@ http://labs.europeana.eu/api/linked-open-data-sparql-endpoint";>Europeana http://data.cervantesvirtual.com/about";>Biblioteca Virtual Miguel de Cervantes http://datos.bne.es/sparql?help=intro";>Biblioteca Nacional de España + http://opencitations.net/";>OpenCitations http://americanart.si.edu/collections/search/lod/about/";>Smithsonian American Art Museum http://aims.fao.org/vest-registry/vocabularies/agrovoc-multilingual-agricultural-thesaurus";>AGROVOC @@ -39,7 +40,9 @@ http://data.camera.it/data/en/linked-data/";>Italian Chamber of Deputies http://linkedgeodata.org/About";>Linked Geo Data http://sisinflab.poliba.it/semanticweb/lod/losm/index2.html";>Linked Open Street Map + http://lov.okfn.org/dataset/lov/about";>Linked Open Vocabularies http://nomisma.org/";>Nomisma.org + http://obofoundry.org/";>OBO Foundry http://sdi4apps.eu/spoi/";>Smart Points of Interest http://opendatacommunities.org/sparql";>UK Department for Communities and Local Government http://statistics.data.gov.uk/sparql";>UK Office for National Statistics -- To view, visit https://gerrit.wikimedia.org/r/381902 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I80f7c6d30baadcfa045c8b39a4be1b55acffdc87 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Smalyshev Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dns[master]: add releases-jenkins to misc-web cluster
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381903 ) Change subject: add releases-jenkins to misc-web cluster .. add releases-jenkins to misc-web cluster During T164030 we had issues with the Jenkins web UI setup since releases.wm.org is already active/active in misc-web Varnish, so it uses geo-DNS. Result was some people got eqiad and the initial admin setup while others got codfw with releases2001 and broken redirects. We want to keep the existing active/active setup with rsync for actual release files but need an active/passive setup for Jenkins. So we are introducting a separate domain for releases-jenkins. Bug: T164030 Change-Id: I39287d6c3994fdfebbd84c215a9874fbd289fe8e --- M templates/wikimedia.org 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/03/381903/1 diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 33707bb..a560d02 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -582,7 +582,9 @@ ; policy.wikimedia.org goes to wordpress cluster T110203 policy 5M IN A192.0.66.2 -releases600 IN DYNA geoip!misc-addrs + +releases 600 IN DYNA geoip!misc-addrs +releases-jenkins 600 IN DYNA geoip!misc-addrs reports.frdev 1H IN CNAMEfrdev-eqiad -- To view, visit https://gerrit.wikimedia.org/r/381903 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39287d6c3994fdfebbd84c215a9874fbd289fe8e Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Add LOV and OBO and OpenCitations
Smalyshev has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381902 ) Change subject: Add LOV and OBO and OpenCitations .. Add LOV and OBO and OpenCitations Change-Id: I80f7c6d30baadcfa045c8b39a4be1b55acffdc87 --- M copyright.html 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui refs/changes/02/381902/1 diff --git a/copyright.html b/copyright.html index 2b88118..e247dab 100644 --- a/copyright.html +++ b/copyright.html @@ -27,6 +27,7 @@ http://labs.europeana.eu/api/linked-open-data-sparql-endpoint";>Europeana http://data.cervantesvirtual.com/about";>Biblioteca Virtual Miguel de Cervantes http://datos.bne.es/sparql?help=intro";>Biblioteca Nacional de España + http://opencitations.net/";>OpenCitations http://americanart.si.edu/collections/search/lod/about/";>Smithsonian American Art Museum http://aims.fao.org/vest-registry/vocabularies/agrovoc-multilingual-agricultural-thesaurus";>AGROVOC @@ -39,7 +40,9 @@ http://data.camera.it/data/en/linked-data/";>Italian Chamber of Deputies http://linkedgeodata.org/About";>Linked Geo Data http://sisinflab.poliba.it/semanticweb/lod/losm/index2.html";>Linked Open Street Map + http://lov.okfn.org/dataset/lov/about";>Linked Open Vocabularies http://nomisma.org/";>Nomisma.org + http://obofoundry.org/";>OBO Foundry http://sdi4apps.eu/spoi/";>Smart Points of Interest http://opendatacommunities.org/sparql";>UK Department for Communities and Local Government http://statistics.data.gov.uk/sparql";>UK Office for National Statistics -- To view, visit https://gerrit.wikimedia.org/r/381902 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80f7c6d30baadcfa045c8b39a4be1b55acffdc87 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Smalyshev ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Use **kwargs for JobRunner.run()
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381898 ) Change subject: Use **kwargs for JobRunner.run() .. Use **kwargs for JobRunner.run() Change-Id: I49cc5d2908c11ee6d27534f59d78bd03ce27ed5e --- M bin/run-job M processcontrol/runner.py 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Cdentinger: Looks good to me, approved jenkins-bot: Verified diff --git a/bin/run-job b/bin/run-job index 7a4cfcb..d2edf5e 100755 --- a/bin/run-job +++ b/bin/run-job @@ -69,7 +69,7 @@ if job_name is not None: job = job_spec.load(job_name) runner = runner.JobRunner(job) - runner.run(slow_start=args.slow_start) + runner.run(**vars(args)) if args.list_jobs: list_jobs(False) diff --git a/processcontrol/runner.py b/processcontrol/runner.py index aa23d67..ed7ec93 100644 --- a/processcontrol/runner.py +++ b/processcontrol/runner.py @@ -22,7 +22,7 @@ self.killer_was_me = False self.failure_reason = None -def run(self, slow_start=False): +def run(self, **kwargs): # Check that we are the service user. service_user = str(self.global_config.get("user")) if service_user.isdigit(): @@ -46,7 +46,7 @@ try: lock.begin(slug=self.job.slug) -if slow_start: +if 'slow_start' in kwargs and kwargs['slow_start']: if self.job.slow_start_command is False: raise JobFailure("This job has no slow_start_command configured") commands = self.job.slow_start_command -- To view, visit https://gerrit.wikimedia.org/r/381898 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49cc5d2908c11ee6d27534f59d78bd03ce27ed5e Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/process-control Gerrit-Branch: master Gerrit-Owner: Ejegg Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Add YAGO to copyright page
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381900 ) Change subject: Add YAGO to copyright page .. Add YAGO to copyright page Change-Id: I1d0ca1303608121164dcb2ad4b110ae46070c534 --- M copyright.html 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/copyright.html b/copyright.html index 1184879..2b88118 100644 --- a/copyright.html +++ b/copyright.html @@ -44,7 +44,8 @@ http://opendatacommunities.org/sparql";>UK Department for Communities and Local Government http://statistics.data.gov.uk/sparql";>UK Office for National Statistics http://data.ordnancesurvey.co.uk/docs/sparql";>UK ordnance survey - http://linkeddata.uriburner.com/";>URI Burnder + http://linkeddata.uriburner.com/";>URI Burner + https://www.mpi-inf.mpg.de/departments/databases-and-information-systems/research/yago-naga/yago/";>YAGO http://britishart.yale.edu/collections/using-collections/technology";>Yale Center for British Art http://www.wikipathways.org/index.php/Help:WikiPathways_Sparql_queries";>WikiPathways -- To view, visit https://gerrit.wikimedia.org/r/381900 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d0ca1303608121164dcb2ad4b110ae46070c534 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Smalyshev Gerrit-Reviewer: Jonas Kress (WMDE) Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Fix icon on copyright page
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381897 ) Change subject: Fix icon on copyright page .. Fix icon on copyright page Change-Id: Ib15ece2f4e5d289c0c943f39418fa9371db0098d --- M copyright.html 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/copyright.html b/copyright.html index 6795c52..1184879 100644 --- a/copyright.html +++ b/copyright.html @@ -11,7 +11,7 @@ - + @@ -50,4 +50,4 @@ - \ No newline at end of file + -- To view, visit https://gerrit.wikimedia.org/r/381897 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib15ece2f4e5d289c0c943f39418fa9371db0098d Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Smalyshev Gerrit-Reviewer: Jonas Kress (WMDE) Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove ELF binaries from across the tree
Faidon Liambotis has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381901 ) Change subject: Remove ELF binaries from across the tree .. Remove ELF binaries from across the tree Compiled binaries do not belong in the puppet tree. Two were in ori's home directory (sorry!), one of which (jq) is already installed via the Debian package and a package for the other one exists. The other one was "udprec" which is apparently... ancient, as it's a 32-bit executable, that cannot work on an amd64 system. Change-Id: I00a7d495c57b62a44362f8f8146a725f158ee185 --- D modules/admin/files/home/ori/.binned/jq D modules/admin/files/home/ori/.binned/peco D modules/scap/files/udprec M modules/scap/manifests/scripts.pp 4 files changed, 3 insertions(+), 6 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/admin/files/home/ori/.binned/jq b/modules/admin/files/home/ori/.binned/jq deleted file mode 100755 index 7b920c4..000 --- a/modules/admin/files/home/ori/.binned/jq +++ /dev/null Binary files differ diff --git a/modules/admin/files/home/ori/.binned/peco b/modules/admin/files/home/ori/.binned/peco deleted file mode 100755 index b90ff97..000 --- a/modules/admin/files/home/ori/.binned/peco +++ /dev/null Binary files differ diff --git a/modules/scap/files/udprec b/modules/scap/files/udprec deleted file mode 100755 index 311cd11..000 --- a/modules/scap/files/udprec +++ /dev/null Binary files differ diff --git a/modules/scap/manifests/scripts.pp b/modules/scap/manifests/scripts.pp index c4b7d65..fc0a019 100644 --- a/modules/scap/manifests/scripts.pp +++ b/modules/scap/manifests/scripts.pp @@ -82,12 +82,6 @@ mode => '0555', source => 'puppet:///modules/scap/sqldump', } -file { '/usr/local/bin/udprec': -owner => 'root', -group => 'root', -mode => '0555', -source => 'puppet:///modules/scap/udprec', -} file { '/usr/local/sbin/set-group-write2': owner => 'root', group => 'root', @@ -121,4 +115,7 @@ file { '/usr/local/bin/clear-profile': ensure => 'absent', } +file { '/usr/local/bin/udprec': +ensure => 'absent', +} } -- To view, visit https://gerrit.wikimedia.org/r/381901 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I00a7d495c57b62a44362f8f8146a725f158ee185 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove ELF binaries from across the tree
Faidon Liambotis has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381901 ) Change subject: Remove ELF binaries from across the tree .. Remove ELF binaries from across the tree …as compiled binaries do not belong in the puppet tree. Two were in ori's home directory (sorry!), one of which (jq) is already installed via the Debian package and a package for the other one exists. The other one was "udprec" which is apparently... ancient, as it's a 32-bit executable, that cannot work on an amd64 system. Change-Id: I00a7d495c57b62a44362f8f8146a725f158ee185 --- D modules/admin/files/home/ori/.binned/jq D modules/admin/files/home/ori/.binned/peco D modules/scap/files/udprec M modules/scap/manifests/scripts.pp 4 files changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/01/381901/1 diff --git a/modules/admin/files/home/ori/.binned/jq b/modules/admin/files/home/ori/.binned/jq deleted file mode 100755 index 7b920c4..000 --- a/modules/admin/files/home/ori/.binned/jq +++ /dev/null Binary files differ diff --git a/modules/admin/files/home/ori/.binned/peco b/modules/admin/files/home/ori/.binned/peco deleted file mode 100755 index b90ff97..000 --- a/modules/admin/files/home/ori/.binned/peco +++ /dev/null Binary files differ diff --git a/modules/scap/files/udprec b/modules/scap/files/udprec deleted file mode 100755 index 311cd11..000 --- a/modules/scap/files/udprec +++ /dev/null Binary files differ diff --git a/modules/scap/manifests/scripts.pp b/modules/scap/manifests/scripts.pp index c4b7d65..fc0a019 100644 --- a/modules/scap/manifests/scripts.pp +++ b/modules/scap/manifests/scripts.pp @@ -82,12 +82,6 @@ mode => '0555', source => 'puppet:///modules/scap/sqldump', } -file { '/usr/local/bin/udprec': -owner => 'root', -group => 'root', -mode => '0555', -source => 'puppet:///modules/scap/udprec', -} file { '/usr/local/sbin/set-group-write2': owner => 'root', group => 'root', @@ -121,4 +115,7 @@ file { '/usr/local/bin/clear-profile': ensure => 'absent', } +file { '/usr/local/bin/udprec': +ensure => 'absent', +} } -- To view, visit https://gerrit.wikimedia.org/r/381901 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00a7d495c57b62a44362f8f8146a725f158ee185 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Add YAGO to copyright page
Smalyshev has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381900 ) Change subject: Add YAGO to copyright page .. Add YAGO to copyright page Change-Id: I1d0ca1303608121164dcb2ad4b110ae46070c534 --- M copyright.html 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui refs/changes/00/381900/1 diff --git a/copyright.html b/copyright.html index 1184879..2b88118 100644 --- a/copyright.html +++ b/copyright.html @@ -44,7 +44,8 @@ http://opendatacommunities.org/sparql";>UK Department for Communities and Local Government http://statistics.data.gov.uk/sparql";>UK Office for National Statistics http://data.ordnancesurvey.co.uk/docs/sparql";>UK ordnance survey - http://linkeddata.uriburner.com/";>URI Burnder + http://linkeddata.uriburner.com/";>URI Burner + https://www.mpi-inf.mpg.de/departments/databases-and-information-systems/research/yago-naga/yago/";>YAGO http://britishart.yale.edu/collections/using-collections/technology";>Yale Center for British Art http://www.wikipathways.org/index.php/Help:WikiPathways_Sparql_queries";>WikiPathways -- To view, visit https://gerrit.wikimedia.org/r/381900 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d0ca1303608121164dcb2ad4b110ae46070c534 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Smalyshev ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Allow slow-starting jobs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/368217 ) Change subject: Allow slow-starting jobs .. Allow slow-starting jobs Add a config key 'slow_start_command' to define an alternate command or list of commands to be run when the --slow-start option is given to run-job Bug: T171873 Change-Id: Ie0e41d1984b943adeaefed989e1f215a08c1 --- M README.md M bin/run-job M examples/job.example.yaml M processcontrol/job_spec.py M processcontrol/runner.py A tests/data/alt_command_job.yaml M tests/test_runner.py 7 files changed, 62 insertions(+), 13 deletions(-) Approvals: Cdentinger: Looks good to me, approved jenkins-bot: Verified diff --git a/README.md b/README.md index 04b735e..2b36370 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,10 @@ blast - Blastoff job{pid: 5647, status: running} ``` +If a job configuration has a 'slow_start_command' defined, that alternate + command can be run with: + +run-job --slow-start huge_job Scheduled Jobs == diff --git a/bin/run-job b/bin/run-job index 1d4d86a..7a4cfcb 100755 --- a/bin/run-job +++ b/bin/run-job @@ -50,7 +50,14 @@ job_group.add_argument("job", nargs="?", help="Run a given job.", type=str) job_group.add_argument("-j", "--job", dest="job_name", help="Run a given job.", type=str) parser.add_argument("-l", "--list-jobs", help="Print a list of available jobs.", action='store_true') - parser.add_argument("-s", "--status", help="Print status of all jobs", action='store_true') + parser.add_argument("-s", "--status", help="Print status of all jobs.", action='store_true') + parser.add_argument( + "-w", + "--slow-start", + dest="slow_start", + help="Slow start a job, if a slow-start configuration has been supplied.", + action="store_true" + ) # TODO: --kill-job, --disable-group, --enable-group args = parser.parse_args() @@ -62,7 +69,7 @@ if job_name is not None: job = job_spec.load(job_name) runner = runner.JobRunner(job) - runner.run() + runner.run(slow_start=args.slow_start) if args.list_jobs: list_jobs(False) diff --git a/examples/job.example.yaml b/examples/job.example.yaml index 177..b8e7d00 100644 --- a/examples/job.example.yaml +++ b/examples/job.example.yaml @@ -17,12 +17,12 @@ # a shell, so globbing, redirecting, and other trickery will not work. Please # give the full path to executables as in a crontab. # -#command: /usr/X11/bin/xsnow -geometry=100x300 +# command: /usr/X11/bin/xsnow -geometry=100x300 # # Alternatively, a job can be configured as a list of several commands. These # are executed in sequence, and execution stops at the first failure. # -#command: +# command: ## Run a command directly. #- /usr/bin/puppet apply # @@ -35,7 +35,13 @@ # command: /usr/local/bin/timecard --start 9:00 --end 5:30 -# Optional schedule, in Vixie cron format: +# An optional alternate command line. This can be useful for a scheduled job +# which normally processes large amounts of data, in order to test manually +# with a smaller run using run-job --slow-start job_name. +# +# slow_start_command: /usr/local/bin/record_processor --record_count 1 + +# Optional shedule, in Vixie cron format: # minute hour day-of-month month day-of-week schedule: "*/5 * * * *" @@ -43,7 +49,7 @@ # Optional flag to prevent scheduled job execution. The job # can still be run as a single-shot. # -#disabled: true +# disabled: true # # Optional timeout in minutes, after which your job will be @@ -61,8 +67,8 @@ # # Optional job tags, which can be used to manipulate groups of jobs sharing that tag. # -#tag: beta +# tag: beta # -#tag: +# tag: #- database #- queue diff --git a/processcontrol/job_spec.py b/processcontrol/job_spec.py index 7a6b1bb..f245f5d 100644 --- a/processcontrol/job_spec.py +++ b/processcontrol/job_spec.py @@ -60,6 +60,11 @@ self.commands = self.config.get_as_list("command") +if self.config.has("slow_start_command"): +self.slow_start_command = self.config.get_as_list("slow_start_command") +else: +self.slow_start_command = False + if self.config.has("tag"): self.tags = self.config.get_as_list("tag") else: diff --git a/processcontrol/runner.py b/processcontrol/runner.py index d34516d..aa23d67 100644 --- a/processcontrol/runner.py +++ b/processcontrol/runner.py @@ -22,7 +22,7 @@ self.killer_was_me = False self.failure_reason = None -def run(self): +def run(self, slow_start=False): # Check that we are the service user. service_user = str(self.global_config.get("user")) if service_user.isdigit(): @@ -46,8 +46,16 @@ t
[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Delete unimplemented browser tests
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381899 ) Change subject: Delete unimplemented browser tests .. Delete unimplemented browser tests These browser tests were added in I55f311b6b8845e6ebf4cc5698758afd1f9042a45 but broken in Ibc0d07e8394aeb640f9efaabfe10be5317bf4b8c Let's remove these while porting over to the Node.js version of these browser tests since they are not run anywhere. (Try bundle exec cucumber tests/browser/features/ --dry-run) Bug: T177262 Change-Id: Ica745d084acbb56ec66d88a1785e7557cb12ad6e --- D tests/browser/features/popups_settings.feature 1 file changed, 0 insertions(+), 48 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/99/381899/1 diff --git a/tests/browser/features/popups_settings.feature b/tests/browser/features/popups_settings.feature deleted file mode 100644 index 1af36e0..000 --- a/tests/browser/features/popups_settings.feature +++ /dev/null @@ -1,48 +0,0 @@ -@integration @chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org @vagrant -Feature: Popups settings - Background: -Given the hover cards test page is installed -And I am logged in -And HoverCards is enabled as a beta feature -And I am on the "Popups test page" page -And the Hovercards JavaScript module has loaded - - Scenario: "Enable previews" footer link correctly appears -And I do not see the enable previews link in the footer -And I hover over the first valid link -And I see a hover card -And I disable previews in the popups settings -Then I should see the enable previews link in the footer - - Scenario: Disabling previews in the popup settings correctly disables popups -And I do not see the enable previews link in the footer -And I hover over the first valid link -And I see a hover card -And I disable previews in the popups settings -And I hover over the first valid link -Then I should not see a hover card - - Scenario: "Enable previews" footer link correctly disappears -And I do not see the enable previews link in the footer -And I hover over the first valid link -And I see a hover card -And I disable previews in the popups settings -And I enable previews in the popups settings -Then I should not see the enable previews link in the footer - - Scenario: Popups can be enabled via the "Enable previews" footer link -And I do not see the enable previews link in the footer -And I hover over the first valid link -And I see a hover card -And I disable previews in the popups settings -And I enable previews in the popups settings -And I hover over the first valid link -Then I should see a hover card - - Scenario: Dismissing settings dialog does not change popups settings -And I hover over the first valid link -And I see a hover card -And I open the popups settings dialog of the first valid link -And I dismiss the popups settings dialog of the first valid link -And I hover over the first valid link -Then I should see a hover card -- To view, visit https://gerrit.wikimedia.org/r/381899 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica745d084acbb56ec66d88a1785e7557cb12ad6e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Jdlrobson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Use **kwargs for JobRunner.run()
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381898 ) Change subject: Use **kwargs for JobRunner.run() .. Use **kwargs for JobRunner.run() Change-Id: I49cc5d2908c11ee6d27534f59d78bd03ce27ed5e --- M bin/run-job M processcontrol/runner.py 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control refs/changes/98/381898/1 diff --git a/bin/run-job b/bin/run-job index 7a4cfcb..d2edf5e 100755 --- a/bin/run-job +++ b/bin/run-job @@ -69,7 +69,7 @@ if job_name is not None: job = job_spec.load(job_name) runner = runner.JobRunner(job) - runner.run(slow_start=args.slow_start) + runner.run(**vars(args)) if args.list_jobs: list_jobs(False) diff --git a/processcontrol/runner.py b/processcontrol/runner.py index aa23d67..ed7ec93 100644 --- a/processcontrol/runner.py +++ b/processcontrol/runner.py @@ -22,7 +22,7 @@ self.killer_was_me = False self.failure_reason = None -def run(self, slow_start=False): +def run(self, **kwargs): # Check that we are the service user. service_user = str(self.global_config.get("user")) if service_user.isdigit(): @@ -46,7 +46,7 @@ try: lock.begin(slug=self.job.slug) -if slow_start: +if 'slow_start' in kwargs and kwargs['slow_start']: if self.job.slow_start_command is False: raise JobFailure("This job has no slow_start_command configured") commands = self.job.slow_start_command -- To view, visit https://gerrit.wikimedia.org/r/381898 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I49cc5d2908c11ee6d27534f59d78bd03ce27ed5e Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/process-control Gerrit-Branch: master Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.31.0-wmf.1]: Always use trackingName for tracking
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381888 ) Change subject: Always use trackingName for tracking .. Always use trackingName for tracking Change-Id: Ifc7d3275277628b310f5c017c43a76f5a7c25ea7 (cherry picked from commit ff896e0be66a918c7141e3c6da04173206012d52) --- M modules/ve-mw/init/ve.init.mw.ArticleTarget.js 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js index 53225ed..3bf99de 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js @@ -1157,7 +1157,7 @@ this.loading = dataPromise || mw.libs.ve.targetLoader.requestPageData( this.getDefaultMode(), this.pageName, { section: this.section, oldId: this.requestedRevId, - targetName: this.constructor.static.name + targetName: this.constructor.static.trackingName } ); this.loading .done( this.loadSuccess.bind( this ) ) @@ -2188,7 +2188,7 @@ dataPromise = mw.libs.ve.targetLoader.requestPageData( 'source', this.pageName, { section: this.section, oldId: this.requestedRevId, - targetName: this.constructor.static.name + targetName: this.constructor.static.trackingName } ).then( function ( response ) { return response; }, function () { @@ -2258,7 +2258,7 @@ } else { dataPromise = mw.libs.ve.targetLoader.requestParsoidData( this.pageName, { oldId: this.revid, - targetName: this.constructor.static.name, + targetName: this.constructor.static.trackingName, modified: this.edited, wikitext: this.getDocToSave() } ); -- To view, visit https://gerrit.wikimedia.org/r/381888 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc7d3275277628b310f5c017c43a76f5a7c25ea7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: wmf/1.31.0-wmf.1 Gerrit-Owner: Jforrester Gerrit-Reviewer: Catrope Gerrit-Reviewer: Esanders Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.31.0-wmf.1]: Reapply "RCFilters: Don't apply/clear highlights 66 times"
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381839 ) Change subject: Reapply "RCFilters: Don't apply/clear highlights 66 times" .. Reapply "RCFilters: Don't apply/clear highlights 66 times" Reverts 84ddcd5d23, reapplies 212d67c67. The original version broke the highlight color circles, this fixes it by using enable instead of this.highlightEnabled to pass down to the items. The former was always false, so it didn't actually propagate the state down correctly. Bug: T177107 Change-Id: I341d9bcd39252eac07bfebfa6d46895bc62c372f (cherry picked from commit 7e25acc56a8bfdc6dd793e9d4d89b801a950d70b) --- M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js 1 file changed, 6 insertions(+), 4 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js index 3b882a6..edb3d0f 100644 --- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js +++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js @@ -1026,12 +1026,14 @@ enable = enable === undefined ? !this.highlightEnabled : enable; if ( this.highlightEnabled !== enable ) { - this.highlightEnabled = enable; - + // HACK make sure highlights are disabled globally while we toggle on the items, + // otherwise we'll call clearHighlight() and applyHighlight() many many times + this.highlightEnabled = false; this.getItems().forEach( function ( filterItem ) { - filterItem.toggleHighlight( this.highlightEnabled ); - }.bind( this ) ); + filterItem.toggleHighlight( enable ); + } ); + this.highlightEnabled = enable; this.emit( 'highlightChange', this.highlightEnabled ); } }; -- To view, visit https://gerrit.wikimedia.org/r/381839 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I341d9bcd39252eac07bfebfa6d46895bc62c372f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.31.0-wmf.1 Gerrit-Owner: Catrope Gerrit-Reviewer: Catrope Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Fix icon on copyright page
Smalyshev has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381897 ) Change subject: Fix icon on copyright page .. Fix icon on copyright page Change-Id: Ib15ece2f4e5d289c0c943f39418fa9371db0098d --- M copyright.html 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui refs/changes/97/381897/1 diff --git a/copyright.html b/copyright.html index 6795c52..1184879 100644 --- a/copyright.html +++ b/copyright.html @@ -11,7 +11,7 @@ - + @@ -50,4 +50,4 @@ - \ No newline at end of file + -- To view, visit https://gerrit.wikimedia.org/r/381897 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib15ece2f4e5d289c0c943f39418fa9371db0098d Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Smalyshev ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.31.0-wmf.1]: DesktopArticleTarget: Retain 'mwTarget' stats tracking object
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381878 ) Change subject: DesktopArticleTarget: Retain 'mwTarget' stats tracking object .. DesktopArticleTarget: Retain 'mwTarget' stats tracking object Bug: T177250 Change-Id: I1584f452e16272886af459bac3e24c4995af2231 (cherry picked from commit 09cde07c452ea23d1e91533fca8038f2cfb7f948) --- M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js index 89a8038..8b1f761 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js @@ -249,7 +249,10 @@ return mw.libs.ve.targetLoader.requestPageData( mode, mw.config.get( 'wgRelevantPageName' ), { section: section, oldId: oldId, - targetName: 'article', // ve.init.mw.DesktopArticleTarget.static.name + // Should be ve.init.mw.DesktopArticleTarget.static.trackingName, but the + // class hasn't loaded yet. + // This is used for stats tracking, so do not change! + targetName: 'mwTarget', modified: modified, preload: uri.query.preload, preloadparams: uri.query[ 'preloadparams[]' ], -- To view, visit https://gerrit.wikimedia.org/r/381878 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1584f452e16272886af459bac3e24c4995af2231 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: wmf/1.31.0-wmf.1 Gerrit-Owner: Jforrester Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix: Language switch between Chinese variants
Cooltey has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381896 ) Change subject: Fix: Language switch between Chinese variants .. Fix: Language switch between Chinese variants In this update: - Dynamically adds either Simlified or Traditional Chinese when one is reading a Chinese article. - Add "converttitles=true" to LangLinksClient Bug:T176161, T177255 Change-Id: Iadc933f418c67220dd0ae10138716aa9093b10c1 --- M app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResult.java M app/src/main/java/org/wikipedia/language/LangLinksActivity.java M app/src/main/java/org/wikipedia/language/LangLinksClient.java M app/src/test/java/org/wikipedia/language/LangLinksClientTest.java 4 files changed, 42 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/96/381896/1 diff --git a/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResult.java b/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResult.java index ead48be..923d955 100644 --- a/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResult.java +++ b/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResult.java @@ -121,6 +121,13 @@ return null; } +@Nullable public String langTitle() { +if(pages != null || !pages.isEmpty()) { +return pages.get(0).title(); +} +return null; +} + @NonNull public List langLinks() { List result = new ArrayList<>(); if (pages == null || pages.isEmpty() || pages.get(0).langLinks() == null) { diff --git a/app/src/main/java/org/wikipedia/language/LangLinksActivity.java b/app/src/main/java/org/wikipedia/language/LangLinksActivity.java index adb89f5..8a4f4c2 100644 --- a/app/src/main/java/org/wikipedia/language/LangLinksActivity.java +++ b/app/src/main/java/org/wikipedia/language/LangLinksActivity.java @@ -4,6 +4,7 @@ import android.os.Bundle; import android.os.Parcelable; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; @@ -169,9 +170,10 @@ private class ClientCallback implements LangLinksClient.Callback { @Override public void success(@NonNull Call call, + @Nullable String originalTitle, @NonNull List links) { languageEntries = links; -updateLanguageEntriesSupported(languageEntries); +updateLanguageEntriesSupported(originalTitle, languageEntries); sortLanguageEntriesByMru(languageEntries); displayLangLinks(); } @@ -182,7 +184,8 @@ langLinksError.setError(caught); } -private void updateLanguageEntriesSupported(List languageEntries) { +private void updateLanguageEntriesSupported(String languageOriginTitle, List languageEntries) { +String getAcceptLanguage = title.getWikiSite().languageCode(); for (ListIterator it = languageEntries.listIterator(); it.hasNext();) { PageTitle link = it.next(); String languageCode = link.getWikiSite().languageCode(); @@ -199,11 +202,22 @@ } } } + +// TODO: setup PageTitle in correct variant +if (getAcceptLanguage.startsWith(AppLanguageLookUpTable.CHINESE_LANGUAGE_CODE)) { +if (!getAcceptLanguage.contains(AppLanguageLookUpTable.SIMPLIFIED_CHINESE_LANGUAGE_CODE)) { +languageEntries.add(new PageTitle(languageOriginTitle, WikiSite.forLanguageCode(AppLanguageLookUpTable.SIMPLIFIED_CHINESE_LANGUAGE_CODE))); +} + +if (!getAcceptLanguage.contains(AppLanguageLookUpTable.TRADITIONAL_CHINESE_LANGUAGE_CODE)) { +languageEntries.add(new PageTitle(languageOriginTitle, WikiSite.forLanguageCode(AppLanguageLookUpTable.TRADITIONAL_CHINESE_LANGUAGE_CODE))); +} +} } private void sortLanguageEntriesByMru(List entries) { int addIndex = 0; -for (String language : WikipediaApp.getInstance().getMruLanguageCodes()) { +for (String language : app.getMruLanguageCodes()) { for (int i = 0; i < entries.size(); i++) { if (entries.get(i).getWikiSite().languageCode().equals(language)) { PageTitle entry = entries.remove(i); diff --git a/app/src/main/java/org/wikipedia/language/LangLinksClient.java b/app/src/main/java/org/wikipedia/language/LangLinksClient.java index 67053b0..9b954ee 100644 --- a/app/src/main/java/org/wikipedia/language/LangLinksClient.java +++ b/app/src/main/java/org/wikipedia/language/LangLinksClient.java @@ -1,6 +1,7 @@ package org.wikipedia.la
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable jQuery 3 on Wiktionary sites
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379947 ) Change subject: Enable jQuery 3 on Wiktionary sites .. Enable jQuery 3 on Wiktionary sites Bug: T124742 Change-Id: I48cedceab210518eb64f7526a007b88398bf10c8 --- M wmf-config/InitialiseSettings.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 52eb48c..9a9b0ec 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -15004,6 +15004,9 @@ 'nlwiktionary' => true, // @Krinkle 'plwiki' => true, // @MatmaRex 'svwiki' => true, // @Nirmos + + // Roll out + 'wiktionary' => true, ], 'wgCiteResponsiveReferences' => [ -- To view, visit https://gerrit.wikimedia.org/r/379947 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I48cedceab210518eb64f7526a007b88398bf10c8 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Catrope Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Minor: Rename BlockTags to HTML4BlockTags
Subramanya Sastry has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381894 ) Change subject: Minor: Rename BlockTags to HTML4BlockTags .. Minor: Rename BlockTags to HTML4BlockTags HTML5 does not have a notion of block tags Change-Id: Ie5bdf914276af46912f5b71226b8a30d82c415f2 --- M lib/config/WikitextConstants.js M lib/utils/Util.js M lib/wt2html/pp/handlers/linter.js 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/94/381894/1 diff --git a/lib/config/WikitextConstants.js b/lib/config/WikitextConstants.js index cb603c9..a686058 100644 --- a/lib/config/WikitextConstants.js +++ b/lib/config/WikitextConstants.js @@ -197,7 +197,7 @@ // From https://developer.mozilla.org/en-US/docs/HTML/Block-level_elements // However, you probably want to use `Util.isBlockTag()`, where some // exceptions are being made. - BlockTags: new Set([ + HTML4BlockTags: new Set([ 'DIV', 'P', // tables 'TABLE', 'TBODY', 'THEAD', 'TFOOT', 'CAPTION', 'TH', 'TR', 'TD', diff --git a/lib/utils/Util.js b/lib/utils/Util.js index f66f734..acfa500 100644 --- a/lib/utils/Util.js +++ b/lib/utils/Util.js @@ -429,7 +429,7 @@ */ isBlockTag: function(name) { name = name.toUpperCase(); - return name !== 'VIDEO' && Consts.HTML.BlockTags.has(name); + return name !== 'VIDEO' && Consts.HTML.HTML4BlockTags.has(name); }, /** diff --git a/lib/wt2html/pp/handlers/linter.js b/lib/wt2html/pp/handlers/linter.js index 3691414..326706b 100644 --- a/lib/wt2html/pp/handlers/linter.js +++ b/lib/wt2html/pp/handlers/linter.js @@ -61,7 +61,7 @@ tagsWithChangedMisnestingBehavior = new Set(); Consts.HTML.HTML5Tags.forEach(function(t) { if (Consts.Sanitizer.TagWhiteList.has(t) && - !Consts.HTML.BlockTags.has(t) && + !Consts.HTML.HTML4BlockTags.has(t) && !Consts.HTML.FormattingTags.has(t) && !Consts.HTML.VoidTags.has(t) ) { -- To view, visit https://gerrit.wikimedia.org/r/381894 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5bdf914276af46912f5b71226b8a30d82c415f2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Add a list of HTML4 Inline tags
Subramanya Sastry has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381895 ) Change subject: Add a list of HTML4 Inline tags .. Add a list of HTML4 Inline tags Change-Id: Ibcb862c5ea7d761cfa8ee39feb2b75f6996e39ee --- M lib/config/WikitextConstants.js 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/95/381895/1 diff --git a/lib/config/WikitextConstants.js b/lib/config/WikitextConstants.js index a686058..0a04d3d 100644 --- a/lib/config/WikitextConstants.js +++ b/lib/config/WikitextConstants.js @@ -213,6 +213,30 @@ 'MAP', 'OBJECT', 'PRE', 'PROGRESS', 'VIDEO', ]), + // From https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements + // plus some non-strict elements not on that list (FONT, S, STRIKE, U) since + // these are tags that are actually used on wikipedias + // + // All HTML5 formatting elements except NOBR is on this list + HTML4InlineTags: new Set([ + 'A', 'ABBR', /* 'ACRONYM' */, + 'B', 'BIG', 'BDO', 'BR', 'BUTTON', + 'CITE', 'CODE', + 'DFN', + 'EM', + 'FONT', + 'I', 'IMG', 'INPUT', + 'KBD', + 'LABEL', + 'MAP', + 'Q', + 'OBJECT', + 'S', 'SAMP', 'SCRIPT', 'SELECT', 'SMALL', 'SPAN', 'STRIKE', 'STRONG', 'SUB', 'SUP', + 'TEXTAREA', 'TIME', 'TT', + 'U', + 'VAR', + ]), + // See http://www.w3.org/html/wg/drafts/html/master/syntax.html#formatting FormattingTags: new Set([ 'A', 'B', 'BIG', 'CODE', 'EM', 'FONT', 'I', 'NOBR', -- To view, visit https://gerrit.wikimedia.org/r/381895 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcb862c5ea7d761cfa8ee39feb2b75f6996e39ee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: remove endowment.wikimedia.org
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381866 ) Change subject: remove endowment.wikimedia.org .. remove endowment.wikimedia.org Removes https://endowment.wikimedia.org/ entirely. Remove 'endowment' puppet module with Apache config, microsites profile. Remove from webserver_misc_static role which is applied on node bromine. Delete director from misc-web Varnish config. This will not be used and a separate domain name will be used instead with external hosting. Bug: T136735 Change-Id: I182abf4a44d51f2482fd6d6be72037a379124ac4 --- M hieradata/role/common/cache/misc.yaml D modules/endowment/files/endowment.wikimedia.org D modules/endowment/manifests/init.pp D modules/profile/manifests/microsites/endowment.pp M modules/role/manifests/webserver_misc_static.pp 5 files changed, 0 insertions(+), 49 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/role/common/cache/misc.yaml b/hieradata/role/common/cache/misc.yaml index 1b2defb..f5830c5 100644 --- a/hieradata/role/common/cache/misc.yaml +++ b/hieradata/role/common/cache/misc.yaml @@ -166,8 +166,6 @@ director: 'darmstadtium' doc.wikimedia.org: director: 'contint1001' - endowment.wikimedia.org: -director: 'bromine' etherpad.wikimedia.org: director: 'etherpad1001' caching: 'websockets' diff --git a/modules/endowment/files/endowment.wikimedia.org b/modules/endowment/files/endowment.wikimedia.org deleted file mode 100644 index d7c2dda..000 --- a/modules/endowment/files/endowment.wikimedia.org +++ /dev/null @@ -1,18 +0,0 @@ -# vim: filetype=apache -# https://endowment.wikimedia.org (T136735) - - -ServerAdmin n...@wikimedia.org -ServerName endowment.wikimedia.org - -DocumentRoot /srv/org/wikimedia/endowment - -ErrorLog /var/log/apache2/error.log -LogLevel warn -CustomLog /var/log/apache2/access.log wmf - - -Require all granted - - - diff --git a/modules/endowment/manifests/init.pp b/modules/endowment/manifests/init.pp deleted file mode 100644 index 0983e37..000 --- a/modules/endowment/manifests/init.pp +++ /dev/null @@ -1,16 +0,0 @@ -# sets up https://endowment.wikimedia.org/ (T136735) -class endowment { - -include ::apache -include ::apache::mod::headers - -apache::site { 'endowment.wikimedia.org': -source => 'puppet:///modules/endowment/endowment.wikimedia.org', -} - -git::clone { 'wikimedia/endowment': -ensure=> 'latest', -directory => '/srv/org/wikimedia/endowment', -branch=> 'master', -} -} diff --git a/modules/profile/manifests/microsites/endowment.pp b/modules/profile/manifests/microsites/endowment.pp deleted file mode 100644 index aa88500..000 --- a/modules/profile/manifests/microsites/endowment.pp +++ /dev/null @@ -1,12 +0,0 @@ -# https://endowment.wikimedia.org/ -# https://meta.wikimedia.org/wiki/Endowment -class profile::microsites::endowment { -include ::endowment -include ::base::firewall - -ferm::service { 'endowment_http': -proto => 'tcp', -port => '80', -} -} - diff --git a/modules/role/manifests/webserver_misc_static.pp b/modules/role/manifests/webserver_misc_static.pp index 060cffb..c2813e8 100644 --- a/modules/role/manifests/webserver_misc_static.pp +++ b/modules/role/manifests/webserver_misc_static.pp @@ -9,7 +9,6 @@ include ::apache::mod::headers include ::profile::microsites::annualreport# https://annual.wikimedia.org -include ::profile::microsites::endowment # https://endowment.wikimedia.org include ::profile::microsites::static_bugzilla # https://static-bugzilla.wikimedia.org include ::profile::microsites::transparency# https://transparency.wikimedia.org -- To view, visit https://gerrit.wikimedia.org/r/381866 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I182abf4a44d51f2482fd6d6be72037a379124ac4 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Always return true on EchoUserNotificationGateway::markRead
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381893 ) Change subject: Always return true on EchoUserNotificationGateway::markRead .. Always return true on EchoUserNotificationGateway::markRead Also rename some variables. $res indicate a ResultSet, not a bool Change-Id: I4f0276cbe01a0391b4bd2616e111067b40363fea --- M includes/NotifUser.php M includes/gateway/UserNotificationGateway.php M tests/phpunit/gateway/UserNotificationGatewayTest.php 3 files changed, 20 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/93/381893/1 diff --git a/includes/NotifUser.php b/includes/NotifUser.php index 09eea3b..129b97d 100644 --- a/includes/NotifUser.php +++ b/includes/NotifUser.php @@ -350,7 +350,8 @@ /** * Mark one or more notifications read for a user. * @param array $eventIds Array of event IDs to mark read -* @return bool +* @return bool Returns true when data has been updated in DB, false on +* failure, or when there was nothing to update */ public function markRead( $eventIds ) { $eventIds = array_filter( (array)$eventIds, 'is_numeric' ); @@ -358,8 +359,8 @@ return false; } - $res = $this->userNotifGateway->markRead( $eventIds ); - if ( $res ) { + $updated = $this->userNotifGateway->markRead( $eventIds ); + if ( $updated ) { // Update notification count in cache $this->resetNotificationCount( DB_MASTER ); @@ -376,13 +377,14 @@ } } - return $res; + return $updated; } /** * Mark one or more notifications unread for a user. * @param array $eventIds Array of event IDs to mark unread -* @return bool +* @return bool Returns true when data has been updated in DB, false on +* failure, or when there was nothing to update */ public function markUnRead( $eventIds ) { $eventIds = array_filter( (array)$eventIds, 'is_numeric' ); @@ -390,8 +392,8 @@ return false; } - $res = $this->userNotifGateway->markUnRead( $eventIds ); - if ( $res ) { + $updated = $this->userNotifGateway->markUnRead( $eventIds ); + if ( $updated ) { // Update notification count in cache $this->resetNotificationCount( DB_MASTER ); @@ -408,7 +410,7 @@ } } - return $res; + return $updated; } /** @@ -450,8 +452,8 @@ }, $notifs ) ); - $res = $this->markRead( $eventIds ); - if ( $res ) { + $updated = $this->markRead( $eventIds ); + if ( $updated ) { // Delete records from echo_target_page /** * Keep the 'echo_target_page' records so they can be used for moderation. @@ -462,7 +464,7 @@ } } - return $res; + return $updated; } /** diff --git a/includes/gateway/UserNotificationGateway.php b/includes/gateway/UserNotificationGateway.php index d33ef45..99b2ddc 100644 --- a/includes/gateway/UserNotificationGateway.php +++ b/includes/gateway/UserNotificationGateway.php @@ -35,11 +35,12 @@ /** * Mark notifications as read * @param $eventIDs array -* @return bool +* @return bool Returns true when data has been updated in DB, false on +* failure, or when there was nothing to update */ public function markRead( array $eventIDs ) { if ( !$eventIDs ) { - return; + return false; } $dbw = $this->dbFactory->getEchoDb( DB_MASTER ); @@ -59,11 +60,12 @@ /** * Mark notifications as unread * @param $eventIDs array -* @return bool +* @return bool Returns true when data has been updated in DB, false on +* failure, or when there was nothing to update */ public function markUnRead( array $eventIDs ) { if ( !$eventIDs ) { - return; + return false; } $dbw = $this->dbFactory->getEchoDb( DB_MASTER ); diff --git a/tests/phpunit/gateway/UserNotificationGatewayTest.php b/tests/phpunit/gateway/UserNotificationGatewayTest.php index 49a7bc6..b88d609 100644 --- a/tests/phpunit/gateway/UserNotificationGatewayTest.php +++ b/tests
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Update WMF's address
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/372824 ) Change subject: Update WMF's address .. Update WMF's address Bug: T173684 Change-Id: Id3fb356722a63626359fe487da9807ed39b27b6f --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified Jforrester: Looks good to me, but someone else must approve diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 8b9d9b7..52eb48c 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -17299,7 +17299,7 @@ 'default' => true, ], 'wmgEchoEmailFooterAddress' => [ - 'default' => 'Wikimedia Foundation, 149 New Montgomery St., 6th Fl., San Francisco, CA 94105, USA', + 'default' => 'Wikimedia Foundation, 1 Montgomery Street, Suite 1600, San Francisco, CA 94104, USA', ], 'wmgEchoSiteNotificationIconUrl' => [ 'default' => false, -- To view, visit https://gerrit.wikimedia.org/r/372824 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id3fb356722a63626359fe487da9807ed39b27b6f Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Urbanecm Gerrit-Reviewer: Catrope Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: WindowManager: Remove `overflow: hidden` to enhance styling ...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/380419 ) Change subject: WindowManager: Remove `overflow: hidden` to enhance styling flexibility .. WindowManager: Remove `overflow: hidden` to enhance styling flexibility Removing `overflow: hidden` from window frame as overflowing content is taken care of in window body and it's limiting styling flexibility on properties like `border-radius` and `box-shadow` used in quick alerts or simple dialogs. Bug: T176584 Change-Id: Ie1413808266e4d0beee7bc0ed63db48f2102e40a --- M src/styles/WindowManager.less 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/styles/WindowManager.less b/src/styles/WindowManager.less index 1163487..a100a50 100644 --- a/src/styles/WindowManager.less +++ b/src/styles/WindowManager.less @@ -23,7 +23,6 @@ right: 0; left: 0; margin: auto; - overflow: hidden; max-width: 100%; max-height: 100%; } -- To view, visit https://gerrit.wikimedia.org/r/380419 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie1413808266e4d0beee7bc0ed63db48f2102e40a Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Fix border on narrow bottom toolbars
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381802 ) Change subject: WikimediaUI theme: Fix border on narrow bottom toolbars .. WikimediaUI theme: Fix border on narrow bottom toolbars Fixing narrow bottom toolbars' overflow border. Change-Id: I58ac419d93a98aafe69e2de99e841a1c41039221 --- M src/themes/wikimediaui/tools.less 1 file changed, 19 insertions(+), 10 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/themes/wikimediaui/tools.less b/src/themes/wikimediaui/tools.less index cc3eb5b..980a941 100644 --- a/src/themes/wikimediaui/tools.less +++ b/src/themes/wikimediaui/tools.less @@ -16,21 +16,30 @@ } .oo-ui-toolbar-bar { - border: 0; background-color: transparent; + border: 0; box-shadow: none; } } - &-narrow .oo-ui-toolbar-bar:after { - content: ''; - display: block; - position: absolute; - top: @size-tool; - left: 0; - width: 100%; - height: 0; - border-bottom: @border-toolbar; + &-narrow { + &-bar:after { + content: ''; + display: block; + position: absolute; + top: @size-tool; + left: 0; + width: 100%; + height: 0; + } + + &.oo-ui-toolbar-position-top .oo-ui-toolbar-bar:after { + border-bottom: @border-toolbar; + } + + &.oo-ui-toolbar-position-bottom .oo-ui-toolbar-bar:after { + border-top: @border-toolbar; + } } &-actions { -- To view, visit https://gerrit.wikimedia.org/r/381802 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I58ac419d93a98aafe69e2de99e841a1c41039221 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: RCFilters: Respect hideNonDamaging pref on RC and WL
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381790 ) Change subject: RCFilters: Respect hideNonDamaging pref on RC and WL .. RCFilters: Respect hideNonDamaging pref on RC and WL Also stop hidding them when Structured Filters is enabled. Bug: T172757 Change-Id: I587bff03dd48a389932d8defcdfeb357d4497d1a --- M includes/Hooks.php M includes/Hooks/PreferencesHookHandler.php 2 files changed, 27 insertions(+), 17 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Hooks.php b/includes/Hooks.php index 04b7169..196b2dd 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -122,6 +122,14 @@ $logFilter = $changeTypeGroup->getFilter( 'hidelog' ); if ( self::isModelEnabled( 'damaging' ) ) { + if ( $clsp instanceof SpecialRecentChanges ) { + $damagingDefault = $clsp->getUser()->getOption( 'oresRCHideNonDamaging' ); + } elseif ( $clsp instanceof SpecialWatchlist ) { + $damagingDefault = $clsp->getUser()->getOption( 'oresWatchlistHideNonDamaging' ); + } else { + $damagingDefault = false; + } + $damagingLevels = $stats->getThresholds( 'damaging' ); $filters = []; if ( isset( $damagingLevels[ 'likelygood' ] ) ) { @@ -232,15 +240,11 @@ ); } - $clsp->registerFilterGroup( $newDamagingGroup ); - } + if ( $damagingDefault ) { + $newDamagingGroup->setDefault( self::getDamagingLevelPreference( $clsp->getUser() ) ); + } - if ( $clsp instanceof SpecialRecentChanges ) { - $damagingDefault = $clsp->getUser()->getOption( 'oresRCHideNonDamaging' ); - } elseif ( $clsp instanceof SpecialWatchlist ) { - $damagingDefault = $clsp->getUser()->getOption( 'oresWatchlistHideNonDamaging' ); - } else { - $damagingDefault = false; + $clsp->registerFilterGroup( $newDamagingGroup ); } // I don't think we need to register a conflict here, since @@ -675,6 +679,20 @@ } /** +* Internal helper to get damaging level preference +* with backward compatibility for old level names +* @param User $user +* @return string 'maybebad', 'likelybad', or 'verylikelybad' +*/ + public static function getDamagingLevelPreference( User $user ) { + $pref = $user->getOption( 'oresDamagingPref' ); + if ( isset( self::$damagingPrefMap[ $pref ] ) ) { + $pref = self::$damagingPrefMap[ $pref ]; + } + return $pref; + } + + /** * Internal helper to get threshold * @param string $type * @param User $user @@ -683,10 +701,7 @@ */ public static function getThreshold( $type, User $user ) { if ( $type === 'damaging' ) { - $pref = $user->getOption( 'oresDamagingPref' ); - if ( isset( self::$damagingPrefMap[ $pref ] ) ) { - $pref = self::$damagingPrefMap[ $pref ]; - } + $pref = self::getDamagingLevelPreference( $user ); $thresholds = self::getDamagingThresholds(); if ( isset( $thresholds[ $pref ] ) ) { return $thresholds[ $pref ]; diff --git a/includes/Hooks/PreferencesHookHandler.php b/includes/Hooks/PreferencesHookHandler.php index 6b9250d..44a538b 100644 --- a/includes/Hooks/PreferencesHookHandler.php +++ b/includes/Hooks/PreferencesHookHandler.php @@ -81,16 +81,11 @@ $context->setUser( $user ); $context->setRequest( new DerivativeRequest( $context->getRequest(), [] ) ); $rcFiltersEnabled = Hooks::isRCStructuredUiEnabled( $context ); - $wlFiltersEnabled = Hooks::isWLStructuredUiEnabled( $context ); // HACK: Note that this only hides the preferences on the preferences page, // it does not cause them to behave as if they're set to their default value, // because this hook only runs on the preferences page. if ( $rcFiltersEnabled ) { - $wgHiddenPrefs[] = 'oresRCHideNonDamaging'; $wgHiddenPrefs
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix PHPDoc Documentation
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381890 ) Change subject: Fix PHPDoc Documentation .. Fix PHPDoc Documentation Documentation is throwing linter errors and needs to be fixed. Bug: T173475 Change-Id: Ic120b6a7a1f29ea90a939c4348202c09d47c38f5 --- M includes/DataOutputFormatter.php M includes/DiscussionParser.php M includes/EchoDbFactory.php M includes/gateway/UserNotificationGateway.php M includes/mapper/NotificationMapper.php 5 files changed, 26 insertions(+), 18 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/DataOutputFormatter.php b/includes/DataOutputFormatter.php index 58eec3a..9265396 100644 --- a/includes/DataOutputFormatter.php +++ b/includes/DataOutputFormatter.php @@ -191,8 +191,8 @@ /** * Helper function for converting UTC timezone to a user's timezone * -* @param User -* @param string +* @param User $user +* @param string $ts * @param int $format output format * * @return string diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php index 11d5e7f..3bc4826 100644 --- a/includes/DiscussionParser.php +++ b/includes/DiscussionParser.php @@ -644,8 +644,8 @@ /** * Given a line number and a text, find the first and last line of the section the line number is in. * If there are subsections, the last line index will be the line before the beginning of the first subsection. -* @param $offset line number -* @param $lines +* @param int $offset line number +* @param array $lines * @return array tuple [$firstLine, $lastLine] */ static function getSectionSpan( $offset, $lines ) { diff --git a/includes/EchoDbFactory.php b/includes/EchoDbFactory.php index 1201263..be2a59a 100644 --- a/includes/EchoDbFactory.php +++ b/includes/EchoDbFactory.php @@ -71,8 +71,8 @@ /** * Get the database connection for Echo -* @param $db int Index of the connection to get -* @param $groups mixed Query groups. +* @param int $db Index of the connection to get +* @param mixed $groups Query groups. * @return IDatabase */ public function getEchoDb( $db, $groups = [] ) { @@ -80,7 +80,7 @@ } /** -* @param $db int Index of the connection to get +* @param int $db Index of the connection to get * @param array $groups Query groups * @return bool|IDatabase false if no shared db is configured */ @@ -99,9 +99,9 @@ * objects * * @deprecated Use newFromDefault() instead to create a db factory -* @param $db int Index of the connection to get -* @param $groups mixed Query groups. -* @param $wiki string|bool The wiki ID, or false for the current wiki +* @param int $db Index of the connection to get +* @param mixed $groups Query groups. +* @param string|bool $wiki The wiki ID, or false for the current wiki * @return IDatabase */ public static function getDB( $db, $groups = [], $wiki = false ) { diff --git a/includes/gateway/UserNotificationGateway.php b/includes/gateway/UserNotificationGateway.php index 28261a7..b376d7f 100644 --- a/includes/gateway/UserNotificationGateway.php +++ b/includes/gateway/UserNotificationGateway.php @@ -18,14 +18,22 @@ protected $user; /** -* The tables for this gateway +* The tables for this gateway. +* +* @var string */ protected static $eventTable = 'echo_event'; + + /** +* The tables for this gateway. +* +* @var string +*/ protected static $notificationTable = 'echo_notification'; /** -* @param User -* @param MWEchoDbFactory +* @param User $user +* @param MWEchoDbFactory $dbFactory */ public function __construct( User $user, MWEchoDbFactory $dbFactory ) { $this->user = $user; @@ -34,7 +42,7 @@ /** * Mark notifications as read -* @param $eventIDs array +* @param array $eventIDs * @return bool */ public function markRead( array $eventIDs ) { @@ -58,7 +66,7 @@ /** * Mark notifications as unread -* @param $eventIDs array +* @param array $eventIDs * @return bool */ public function markUnRead( array $eventIDs ) { @@ -141,7 +149,7 @@ * IMPORTANT: should only call this function if the number of unread notification * is reasonable, for example, unread notification count is less than the max * display defined in MWEchoNotifUser::MAX_BADGE_COUNT -* @param string +* @param
[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: Stop using wgNamespace and wgTitle globals
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381892 ) Change subject: Stop using wgNamespace and wgTitle globals .. Stop using wgNamespace and wgTitle globals it's still using globals and I still don't like it but this avoids the deprecation notices. Bug: T177259 Change-Id: I5f11a9b6db980e86b2b867f747f6243de6e0d5b4 --- M Collection.hooks.php 1 file changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection refs/changes/92/381892/1 diff --git a/Collection.hooks.php b/Collection.hooks.php index abd8ac6..3bfb514 100644 --- a/Collection.hooks.php +++ b/Collection.hooks.php @@ -293,6 +293,7 @@ $query = [ 'bookcmd' => 'add_category', 'cattitle' => $title->getText() ]; $onclick = "collectionCall('AddCategory', ['addcategory', wgTitle]); return false;"; } else { + $collectionArgsJs = "mw.config.get('wgNamespaceNumber'), mw.config.get('wgTitle'), " . Xml::encodeJsVar( $oldid ); if ( $ajaxHint == 'addarticle' || ( $ajaxHint == '' && CollectionSession::findArticle( $ptext, $oldid ) == - 1 ) ) { $id = 'coll-add_article'; @@ -300,16 +301,14 @@ $captionMsg = 'coll-add_this_page'; $tooltipMsg = 'coll-add_page_tooltip'; $query = [ 'bookcmd' => 'add_article', 'arttitle' => $ptext, 'oldid' => $oldid ]; - $onclick = "collectionCall('AddArticle', ['removearticle', wgNamespaceNumber, wgTitle, " . - Xml::encodeJsVar( $oldid ) . "]); return false;"; + $onclick = "collectionCall('AddArticle', ['removearticle'," . $collectionArgsJs . "]); return false;"; } else { $id = 'coll-remove_article'; $icon = 'silk-remove.png'; $captionMsg = 'coll-remove_this_page'; $tooltipMsg = 'coll-remove_page_tooltip'; $query = [ 'bookcmd' => 'remove_article', 'arttitle' => $ptext, 'oldid' => $oldid ]; - $onclick = "collectionCall('RemoveArticle', ['addarticle', wgNamespaceNumber, wgTitle, " . - Xml::encodeJsVar( $oldid ) . "]); return false;"; + $onclick = "collectionCall('RemoveArticle', ['addarticle', " . $collectionArgsJs . "]); return false;"; } } -- To view, visit https://gerrit.wikimedia.org/r/381892 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5f11a9b6db980e86b2b867f747f6243de6e0d5b4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection Gerrit-Branch: master Gerrit-Owner: Jdlrobson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: toolschecker: Remove uwsgi-python check from grid webservice...
Madhuvishy has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381891 ) Change subject: toolschecker: Remove uwsgi-python check from grid webservice test .. toolschecker: Remove uwsgi-python check from grid webservice test There's no python app in toolschecker-ge-ws which causes this portion of the test to fail Bug: T177103 Change-Id: I727291934c6218ae26f03944067ea932a5f8f3ed --- M modules/toollabs/files/toolschecker.py 1 file changed, 0 insertions(+), 35 deletions(-) Approvals: Madhuvishy: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/files/toolschecker.py b/modules/toollabs/files/toolschecker.py index 448eb0d..a589953 100644 --- a/modules/toollabs/files/toolschecker.py +++ b/modules/toollabs/files/toolschecker.py @@ -453,41 +453,6 @@ break time.sleep(1) -if not success: -return False - -# So far so good -- now, test wsgi -success = False -subprocess.check_call([ -'sudo', -'-u', 'tools.toolschecker-ge-ws', -'-i', -'/usr/bin/webservice', 'uwsgi-python', 'start' -]) - -for i in range(0, 10): -request = requests.get(url) -if request.status_code == 200: -success = True -break -time.sleep(1) - -subprocess.check_call([ -'sudo', -'-u', 'tools.toolschecker-ge-ws', -'-i', -'/usr/bin/webservice', 'uwsgi-python', 'stop' -]) - -# Make sure it really stopped -success = success and False -for i in range(0, 10): -request = requests.get(url) -if request.status_code != 200: -success = True -break -time.sleep(1) - return success -- To view, visit https://gerrit.wikimedia.org/r/381891 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I727291934c6218ae26f03944067ea932a5f8f3ed Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy Gerrit-Reviewer: Madhuvishy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: toolschecker: Remove uwsgi-python check from grid webservice...
Madhuvishy has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381891 ) Change subject: toolschecker: Remove uwsgi-python check from grid webservice test .. toolschecker: Remove uwsgi-python check from grid webservice test There's no python app in toolschecker-ge-ws which causes this portion of the test to fail Bug: T177103 Change-Id: I727291934c6218ae26f03944067ea932a5f8f3ed --- M modules/toollabs/files/toolschecker.py 1 file changed, 0 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/91/381891/1 diff --git a/modules/toollabs/files/toolschecker.py b/modules/toollabs/files/toolschecker.py index 448eb0d..a589953 100644 --- a/modules/toollabs/files/toolschecker.py +++ b/modules/toollabs/files/toolschecker.py @@ -453,41 +453,6 @@ break time.sleep(1) -if not success: -return False - -# So far so good -- now, test wsgi -success = False -subprocess.check_call([ -'sudo', -'-u', 'tools.toolschecker-ge-ws', -'-i', -'/usr/bin/webservice', 'uwsgi-python', 'start' -]) - -for i in range(0, 10): -request = requests.get(url) -if request.status_code == 200: -success = True -break -time.sleep(1) - -subprocess.check_call([ -'sudo', -'-u', 'tools.toolschecker-ge-ws', -'-i', -'/usr/bin/webservice', 'uwsgi-python', 'stop' -]) - -# Make sure it really stopped -success = success and False -for i in range(0, 10): -request = requests.get(url) -if request.status_code != 200: -success = True -break -time.sleep(1) - return success -- To view, visit https://gerrit.wikimedia.org/r/381891 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I727291934c6218ae26f03944067ea932a5f8f3ed Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Align PopupToolGroup header styles
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381801 ) Change subject: WikimediaUI theme: Align PopupToolGroup header styles .. WikimediaUI theme: Align PopupToolGroup header styles Aligning PopupToolGroup header styles to other widgets like MenuSectionOptionWidget and add it to demos. Change-Id: Ia122bca49953c1045c1c1457ea300255f611bc77 --- M demos/pages/toolbars.js M src/themes/wikimediaui/tools.less 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/demos/pages/toolbars.js b/demos/pages/toolbars.js index 4110768..34b46bc 100644 --- a/demos/pages/toolbars.js +++ b/demos/pages/toolbars.js @@ -171,6 +171,7 @@ toolbars[ 1 ].setup( [ { type: 'menu', + header: 'Popup-/MenuToolGroup header', icon: 'image', include: [ { group: 'menuTools' } ] }, diff --git a/src/themes/wikimediaui/tools.less b/src/themes/wikimediaui/tools.less index 261513e..cc3eb5b 100644 --- a/src/themes/wikimediaui/tools.less +++ b/src/themes/wikimediaui/tools.less @@ -332,9 +332,10 @@ } &-header { - line-height: 2.6; - margin: 0 0.6em; + color: @color-base--subtle; + padding: 0 @padding-horizontal-base; font-weight: bold; + line-height: @size-base; // Doesn't work with `padding` in header, due to clippable logic } .oo-ui-toolGroup-tools { -- To view, visit https://gerrit.wikimedia.org/r/381801 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia122bca49953c1045c1c1457ea300255f611bc77 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix PHPDoc Documentation
Dbarratt has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381890 ) Change subject: Fix PHPDoc Documentation .. Fix PHPDoc Documentation Documentation is throwing linter errors and needs to be fixed. Bug: T173475 Change-Id: Ic120b6a7a1f29ea90a939c4348202c09d47c38f5 --- M includes/DataOutputFormatter.php M includes/DiscussionParser.php M includes/EchoDbFactory.php M includes/gateway/UserNotificationGateway.php M includes/mapper/NotificationMapper.php 5 files changed, 26 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/90/381890/1 diff --git a/includes/DataOutputFormatter.php b/includes/DataOutputFormatter.php index 58eec3a..9265396 100644 --- a/includes/DataOutputFormatter.php +++ b/includes/DataOutputFormatter.php @@ -191,8 +191,8 @@ /** * Helper function for converting UTC timezone to a user's timezone * -* @param User -* @param string +* @param User $user +* @param string $ts * @param int $format output format * * @return string diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php index 11d5e7f..3bc4826 100644 --- a/includes/DiscussionParser.php +++ b/includes/DiscussionParser.php @@ -644,8 +644,8 @@ /** * Given a line number and a text, find the first and last line of the section the line number is in. * If there are subsections, the last line index will be the line before the beginning of the first subsection. -* @param $offset line number -* @param $lines +* @param int $offset line number +* @param array $lines * @return array tuple [$firstLine, $lastLine] */ static function getSectionSpan( $offset, $lines ) { diff --git a/includes/EchoDbFactory.php b/includes/EchoDbFactory.php index 1201263..be2a59a 100644 --- a/includes/EchoDbFactory.php +++ b/includes/EchoDbFactory.php @@ -71,8 +71,8 @@ /** * Get the database connection for Echo -* @param $db int Index of the connection to get -* @param $groups mixed Query groups. +* @param int $db Index of the connection to get +* @param mixed $groups Query groups. * @return IDatabase */ public function getEchoDb( $db, $groups = [] ) { @@ -80,7 +80,7 @@ } /** -* @param $db int Index of the connection to get +* @param int $db Index of the connection to get * @param array $groups Query groups * @return bool|IDatabase false if no shared db is configured */ @@ -99,9 +99,9 @@ * objects * * @deprecated Use newFromDefault() instead to create a db factory -* @param $db int Index of the connection to get -* @param $groups mixed Query groups. -* @param $wiki string|bool The wiki ID, or false for the current wiki +* @param int $db Index of the connection to get +* @param mixed $groups Query groups. +* @param string|bool $wiki The wiki ID, or false for the current wiki * @return IDatabase */ public static function getDB( $db, $groups = [], $wiki = false ) { diff --git a/includes/gateway/UserNotificationGateway.php b/includes/gateway/UserNotificationGateway.php index 28261a7..b376d7f 100644 --- a/includes/gateway/UserNotificationGateway.php +++ b/includes/gateway/UserNotificationGateway.php @@ -18,14 +18,22 @@ protected $user; /** -* The tables for this gateway +* The tables for this gateway. +* +* @var string */ protected static $eventTable = 'echo_event'; + + /** +* The tables for this gateway. +* +* @var string +*/ protected static $notificationTable = 'echo_notification'; /** -* @param User -* @param MWEchoDbFactory +* @param User $user +* @param MWEchoDbFactory $dbFactory */ public function __construct( User $user, MWEchoDbFactory $dbFactory ) { $this->user = $user; @@ -34,7 +42,7 @@ /** * Mark notifications as read -* @param $eventIDs array +* @param array $eventIDs * @return bool */ public function markRead( array $eventIDs ) { @@ -58,7 +66,7 @@ /** * Mark notifications as unread -* @param $eventIDs array +* @param array $eventIDs * @return bool */ public function markUnRead( array $eventIDs ) { @@ -141,7 +149,7 @@ * IMPORTANT: should only call this function if the number of unread notification * is reasonable, for example, unread notification count is less than the max * display defined in MWEchoNotifUser::MAX_BADGE_COUNT -* @param string +
[MediaWiki-commits] [Gerrit] operations/puppet[production]: toolschecker: Fix sudo options typo in more places
Madhuvishy has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381889 ) Change subject: toolschecker: Fix sudo options typo in more places .. toolschecker: Fix sudo options typo in more places Bug: T177103 Change-Id: Ibe05102d131084e179af059d05de76c8736b1683 --- M modules/toollabs/files/toolschecker.py 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Madhuvishy: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/files/toolschecker.py b/modules/toollabs/files/toolschecker.py index 6de8ace..448eb0d 100644 --- a/modules/toollabs/files/toolschecker.py +++ b/modules/toollabs/files/toolschecker.py @@ -439,7 +439,7 @@ subprocess.check_call([ 'sudo', -'u', 'tools.toolschecker-ge-ws', +'-u', 'tools.toolschecker-ge-ws', '-i', '/usr/bin/webservice', 'stop' ]) @@ -460,7 +460,7 @@ success = False subprocess.check_call([ 'sudo', -'u', 'tools.toolschecker-ge-ws', +'-u', 'tools.toolschecker-ge-ws', '-i', '/usr/bin/webservice', 'uwsgi-python', 'start' ]) @@ -474,7 +474,7 @@ subprocess.check_call([ 'sudo', -'u', 'tools.toolschecker-ge-ws', +'-u', 'tools.toolschecker-ge-ws', '-i', '/usr/bin/webservice', 'uwsgi-python', 'stop' ]) -- To view, visit https://gerrit.wikimedia.org/r/381889 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibe05102d131084e179af059d05de76c8736b1683 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy Gerrit-Reviewer: Madhuvishy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: toolschecker: Fix sudo options typo in more places
Madhuvishy has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381889 ) Change subject: toolschecker: Fix sudo options typo in more places .. toolschecker: Fix sudo options typo in more places Bug: T177103 Change-Id: Ibe05102d131084e179af059d05de76c8736b1683 --- M modules/toollabs/files/toolschecker.py 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/89/381889/1 diff --git a/modules/toollabs/files/toolschecker.py b/modules/toollabs/files/toolschecker.py index 6de8ace..448eb0d 100644 --- a/modules/toollabs/files/toolschecker.py +++ b/modules/toollabs/files/toolschecker.py @@ -439,7 +439,7 @@ subprocess.check_call([ 'sudo', -'u', 'tools.toolschecker-ge-ws', +'-u', 'tools.toolschecker-ge-ws', '-i', '/usr/bin/webservice', 'stop' ]) @@ -460,7 +460,7 @@ success = False subprocess.check_call([ 'sudo', -'u', 'tools.toolschecker-ge-ws', +'-u', 'tools.toolschecker-ge-ws', '-i', '/usr/bin/webservice', 'uwsgi-python', 'start' ]) @@ -474,7 +474,7 @@ subprocess.check_call([ 'sudo', -'u', 'tools.toolschecker-ge-ws', +'-u', 'tools.toolschecker-ge-ws', '-i', '/usr/bin/webservice', 'uwsgi-python', 'stop' ]) -- To view, visit https://gerrit.wikimedia.org/r/381889 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe05102d131084e179af059d05de76c8736b1683 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.31.0-wmf.1]: Always use trackingName for tracking
Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381888 ) Change subject: Always use trackingName for tracking .. Always use trackingName for tracking Change-Id: Ifc7d3275277628b310f5c017c43a76f5a7c25ea7 (cherry picked from commit ff896e0be66a918c7141e3c6da04173206012d52) --- M modules/ve-mw/init/ve.init.mw.ArticleTarget.js 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/88/381888/1 diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js index 53225ed..3bf99de 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js @@ -1157,7 +1157,7 @@ this.loading = dataPromise || mw.libs.ve.targetLoader.requestPageData( this.getDefaultMode(), this.pageName, { section: this.section, oldId: this.requestedRevId, - targetName: this.constructor.static.name + targetName: this.constructor.static.trackingName } ); this.loading .done( this.loadSuccess.bind( this ) ) @@ -2188,7 +2188,7 @@ dataPromise = mw.libs.ve.targetLoader.requestPageData( 'source', this.pageName, { section: this.section, oldId: this.requestedRevId, - targetName: this.constructor.static.name + targetName: this.constructor.static.trackingName } ).then( function ( response ) { return response; }, function () { @@ -2258,7 +2258,7 @@ } else { dataPromise = mw.libs.ve.targetLoader.requestParsoidData( this.pageName, { oldId: this.revid, - targetName: this.constructor.static.name, + targetName: this.constructor.static.trackingName, modified: this.edited, wikitext: this.getDocToSave() } ); -- To view, visit https://gerrit.wikimedia.org/r/381888 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc7d3275277628b310f5c017c43a76f5a7c25ea7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: wmf/1.31.0-wmf.1 Gerrit-Owner: Jforrester Gerrit-Reviewer: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: toolschecker: Fix sudo options in webservice start command
Madhuvishy has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381887 ) Change subject: toolschecker: Fix sudo options in webservice start command .. toolschecker: Fix sudo options in webservice start command Bug: T177103 Change-Id: I41c1a451e1c8f779250131b4563cb7b65999b1ce --- M modules/toollabs/files/toolschecker.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Madhuvishy: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/files/toolschecker.py b/modules/toollabs/files/toolschecker.py index a002871..6de8ace 100644 --- a/modules/toollabs/files/toolschecker.py +++ b/modules/toollabs/files/toolschecker.py @@ -425,7 +425,7 @@ url = "https://tools.wmflabs.org/toolschecker-ge-ws/"; subprocess.check_call([ 'sudo', -'u', 'tools.toolschecker-ge-ws', +'-u', 'tools.toolschecker-ge-ws', '-i', '/usr/bin/webservice', 'start' ]) -- To view, visit https://gerrit.wikimedia.org/r/381887 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I41c1a451e1c8f779250131b4563cb7b65999b1ce Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy Gerrit-Reviewer: Madhuvishy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: toolschecker: Fix sudo options in webservice start command
Madhuvishy has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381887 ) Change subject: toolschecker: Fix sudo options in webservice start command .. toolschecker: Fix sudo options in webservice start command Bug: T177103 Change-Id: I41c1a451e1c8f779250131b4563cb7b65999b1ce --- M modules/toollabs/files/toolschecker.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/87/381887/1 diff --git a/modules/toollabs/files/toolschecker.py b/modules/toollabs/files/toolschecker.py index a002871..6de8ace 100644 --- a/modules/toollabs/files/toolschecker.py +++ b/modules/toollabs/files/toolschecker.py @@ -425,7 +425,7 @@ url = "https://tools.wmflabs.org/toolschecker-ge-ws/"; subprocess.check_call([ 'sudo', -'u', 'tools.toolschecker-ge-ws', +'-u', 'tools.toolschecker-ge-ws', '-i', '/usr/bin/webservice', 'start' ]) -- To view, visit https://gerrit.wikimedia.org/r/381887 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41c1a451e1c8f779250131b4563cb7b65999b1ce Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Improve no-JavaScript error message.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381740 ) Change subject: Improve no-JavaScript error message. .. Improve no-JavaScript error message. does not cover all cases, so use div+CSS instead. Also expanded the message to list the possible reasons. Change-Id: Id3f46071865b9944b8b30880ab9cf7c5d275da16 --- M extension.json M i18n/en.json A modules/ui/styles/mw.cx.ui.Header.skin.less M specials/SpecialContentTranslation.php M specials/SpecialContentTranslationStats.php 5 files changed, 11 insertions(+), 5 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 551e3f5..c080489 100644 --- a/extension.json +++ b/extension.json @@ -1483,6 +1483,9 @@ ] }, "mw.cx.ui.Header.skin": { + "styles": [ + "ui/styles/mw.cx.ui.Header.skin.less" + ], "skinStyles": { "vector": [ "ui/styles/mw.cx.ui.Header.vector.less" diff --git a/i18n/en.json b/i18n/en.json index e1d6e44..50c81b7 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -17,7 +17,7 @@ }, "cx": "Translate page", "cx-dashboard-header": "Translations", - "cx-javascript": "This tool does not work without JavaScript.", + "cx-javascript": "This tool does not work without JavaScript. JavaScript is disabled, failed to work, or this browser is unsupported.", "cx-specialpage-enable-betafeature": "[[mw:ContentTranslation|Content Translation]] is a tool to quickly translate pages into your language. [$1 Try it now!]", "cx-license-agreement": "By clicking the \"$1\" button, you agree to the [//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and you irrevocably agree to release your contributions with the translation tool under the [https://creativecommons.org/licenses/by-sa/3.0/ CC BY-SA 3.0 License] and the [//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License GFDL] with the understanding that a hyperlink or URL is sufficient for CC BY-SA 3.0 attribution.", "cx-error-server-connection": "Error: Could not connect to the server.", diff --git a/modules/ui/styles/mw.cx.ui.Header.skin.less b/modules/ui/styles/mw.cx.ui.Header.skin.less new file mode 100644 index 000..7e293ee --- /dev/null +++ b/modules/ui/styles/mw.cx.ui.Header.skin.less @@ -0,0 +1,3 @@ +.client-js .cx-nojs { + display: none; +} diff --git a/specials/SpecialContentTranslation.php b/specials/SpecialContentTranslation.php index 1741ffa..bdca9a5 100644 --- a/specials/SpecialContentTranslation.php +++ b/specials/SpecialContentTranslation.php @@ -195,8 +195,8 @@ $out->addHTML( $out->headElement( $skin ) ); $out->addHTML( Html::element( - 'noscript', - [], + 'div', + [ 'class' => 'cx-nojs errorbox' ], $this->msg( 'cx-javascript' )->text() ) ); $out->addHtml( MWDebug::getDebugHTML( $this->getContext() ) ); diff --git a/specials/SpecialContentTranslationStats.php b/specials/SpecialContentTranslationStats.php index 67a3ea0..3cce89a 100644 --- a/specials/SpecialContentTranslationStats.php +++ b/specials/SpecialContentTranslationStats.php @@ -57,8 +57,8 @@ $skin->getPersonalToolsList() ); $out->addHTML( $out->headElement( $skin ) ); $out->addHTML( Html::element( - 'noscript', - [], + 'div', + [ 'class' => 'cx-nojs errorbox' ], $this->msg( 'cx-javascript' )->text() ) ); $out->addHtml( MWDebug::getDebugHTML( $this->getContext() ) ); -- To view, visit https://gerrit.wikimedia.org/r/381740 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id3f46071865b9944b8b30880ab9cf7c5d275da16 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Catrope Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Petar.petkovic Gerrit-Reviewer: Santhosh Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Update PHP_CodeSniffer to 3.1.0 from 3.0.2
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/380310 ) Change subject: Update PHP_CodeSniffer to 3.1.0 from 3.0.2 .. Update PHP_CodeSniffer to 3.1.0 from 3.0.2 See https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.1.0 https://github.com/squizlabs/PHP_CodeSniffer/compare/3.0.2...3.1.0 And bump PHPUnit while we're at it. Change-Id: I2d56b4e46b326e3768c09d731581efe944aa6063 --- M MediaWiki/Tests/files/Commenting/comment_single_line.php M MediaWiki/Tests/files/Commenting/comment_single_line.php.expect M MediaWiki/Tests/files/Commenting/comment_single_line.php.fixed M composer.json 4 files changed, 6 insertions(+), 12 deletions(-) Approvals: Umherirrender: Looks good to me, but someone else must approve Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/MediaWiki/Tests/files/Commenting/comment_single_line.php b/MediaWiki/Tests/files/Commenting/comment_single_line.php index 148b56a..0fcc7fc 100644 --- a/MediaWiki/Tests/files/Commenting/comment_single_line.php +++ b/MediaWiki/Tests/files/Commenting/comment_single_line.php @@ -4,8 +4,6 @@ * @return void */ function wfFailedExamples() { - /*** This should fail */ - /*** This should fail */ /* This also should fail **/ } @@ -16,6 +14,7 @@ /* Correct inline comment */ /** This is valid */ /** @var This is valid */ + /*** This is also valid */ } /* diff --git a/MediaWiki/Tests/files/Commenting/comment_single_line.php.expect b/MediaWiki/Tests/files/Commenting/comment_single_line.php.expect index 66d8b68..268ae20 100644 --- a/MediaWiki/Tests/files/Commenting/comment_single_line.php.expect +++ b/MediaWiki/Tests/files/Commenting/comment_single_line.php.expect @@ -1,8 +1,4 @@ - 7 | WARNING | [x] Invalid start of a single line comment - | | (MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentStart) - 8 | WARNING | [x] Invalid start of a single line comment - | | (MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentStart) - 9 | WARNING | [x] Invalid end of a single line comment + 7 | WARNING | [x] Invalid end of a single line comment | | (MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentEnd) -PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY +PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY diff --git a/MediaWiki/Tests/files/Commenting/comment_single_line.php.fixed b/MediaWiki/Tests/files/Commenting/comment_single_line.php.fixed index 573db1e..404131d 100644 --- a/MediaWiki/Tests/files/Commenting/comment_single_line.php.fixed +++ b/MediaWiki/Tests/files/Commenting/comment_single_line.php.fixed @@ -4,8 +4,6 @@ * @return void */ function wfFailedExamples() { - /* This should fail */ - /* This should fail */ /* This also should fail */ } @@ -16,6 +14,7 @@ /* Correct inline comment */ /** This is valid */ /** @var This is valid */ + /*** This is also valid */ } /* diff --git a/composer.json b/composer.json index 5fb2223..30b456f 100644 --- a/composer.json +++ b/composer.json @@ -6,12 +6,12 @@ "license": "GPL-2.0+", "require": { "php": ">= 5.5.9", - "squizlabs/php_codesniffer": "3.0.2" + "squizlabs/php_codesniffer": "3.1.0" }, "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", "jakub-onderka/php-console-highlighter": "0.3.2", - "phpunit/phpunit": "~4.1" + "phpunit/phpunit": "~4.8" }, "scripts": { "test": [ -- To view, visit https://gerrit.wikimedia.org/r/380310 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d56b4e46b326e3768c09d731581efe944aa6063 Gerrit-PatchSet: 10 Gerrit-Project: mediawiki/tools/codesniffer Gerrit-Branch: master Gerrit-Owner: Paladox Gerrit-Reviewer: Addshore Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: Reedy Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: WIP: Render book in one master template
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381886 ) Change subject: WIP: Render book in one master template .. WIP: Render book in one master template This replaces all the templates with one single template. I'd argue this improves the readability of what is happening here while also exposing some problems with the current approach. It also makes it easy for us to write unit tests. TODO: * the getters for template function should be refactored. The call to $headingCounter->incrementAndGetTopLevel() adds additional complexity that hurts readability and passing $metadata by reference makes it difficult to change the order of rendering. * It feels like getContributorHtml could be powered via template data * Some of the getters probably can be moved into the renderBook method Change-Id: I85b3cd938e3dbd0e5528027d67941ec4ed2c29be --- M includes/BookRenderer.php A templates/book.mustache D templates/images.mustache D templates/license.mustache D templates/toc.mustache 5 files changed, 58 insertions(+), 55 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection refs/changes/86/381886/1 diff --git a/includes/BookRenderer.php b/includes/BookRenderer.php index 0bc4bfc..c2ccc20 100644 --- a/includes/BookRenderer.php +++ b/includes/BookRenderer.php @@ -96,12 +96,15 @@ } } - $final = $this->renderCoverAndToc( $collection, $metadata ) - . $final - . $this->renderContributors( $metadata, $headingCounter->incrementAndGetTopLevel() ) - . $this->renderImageInfos( $metadata, $headingCounter->incrementAndGetTopLevel() ) - . $this->renderLicense( $metadata, $headingCounter->incrementAndGetTopLevel() ); - return $final; + $data = $this->getCoverAndTocData( $collection, $metadata ) + + $this->getImageInfosData( $metadata ) + + $this->getLicenseData( $metadata ) + [ + 'bookhtml' => $final, + 'imagesSectionNumber' => $headingCounter->incrementAndGetTopLevel(), + 'licenseSectionNumber' => $headingCounter->incrementAndGetTopLevel(), + 'contributorshtml' => $this->getContributorHtml( $metadata, $headingCounter->incrementAndGetTopLevel() ), + ]; + return $this->templateParser->processTemplate( 'book', $data ); } /** @@ -114,9 +117,9 @@ * - level: heading level or -2 for chapter, -1 for article * - anchor: id of the document node which the outline item refers to * - number: a hierarchical section number (something like "1.2.3") -* @return string HTML to prepend to the book. +* @return object template data to render book */ - private function renderCoverAndToc( $collection, &$metadata ) { + private function getCoverAndTocData( $collection, &$metadata ) { $hasChapters = (bool)array_filter( $collection['items'], function ( $item ) { return $item['type'] === 'chapter'; } ); @@ -194,12 +197,12 @@ } $metadata['outline'] = $outline; - return $this->templateParser->processTemplate( 'toc', $this->fixTemplateData( [ + return $this->fixTemplateData( [ 'title' => $collection['title'], 'subtitle' => $collection['subtitle'], 'toctitle' => wfMessage( 'coll-toc-title' )->text(), 'tocitems' => $this->getNestedOutline( $outline ), - ] ) ); + ] ); } /** @@ -208,7 +211,7 @@ * @param string $sectionNumber The section number for the contributors section, if any. * @return string HTML to append to the book. */ - private function renderContributors( $metadata, $sectionNumber = null ) { + private function getContributorHtml( $metadata, $sectionNumber = null ) { $list = array_map( function ( $name ) { return Html::element( 'li', [], $name ); }, array_keys( $metadata['contributors'] ) ); @@ -228,7 +231,7 @@ * @param string $sectionNumber The section number for the images section, if any. * @return string HTML to append to the book. */ - private function renderImageInfos( $metadata, $sectionNumber = null ) { + private function getImageInfosData( $metadata, $sectionNumber = null ) { if ( !$metadata['images'] ) { return ''; } @@ -242,11 +245,10 @@ foreach ( $metadata['images'] as $image ) {
[MediaWiki-commits] [Gerrit] operations/puppet[production]: toolschecker: Fix labsdb1005 test to use a current DB
Madhuvishy has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381885 ) Change subject: toolschecker: Fix labsdb1005 test to use a current DB .. toolschecker: Fix labsdb1005 test to use a current DB Bug: T177103 Change-Id: I1711dc7136531f2d9bfbca0577df2a7d3f1be544 --- M modules/toollabs/files/toolschecker.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Madhuvishy: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/files/toolschecker.py b/modules/toollabs/files/toolschecker.py index 77e0004..a002871 100644 --- a/modules/toollabs/files/toolschecker.py +++ b/modules/toollabs/files/toolschecker.py @@ -156,7 +156,7 @@ read_default_file=os.path.expanduser('~/replica.my.cnf') ) cur = connection.cursor() -cur.execute('select * from toolserverdb_p.wiki limit 1') +cur.execute('select * from toollabs_p.tools limit 1') result = cur.fetchone() if result: return True -- To view, visit https://gerrit.wikimedia.org/r/381885 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1711dc7136531f2d9bfbca0577df2a7d3f1be544 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy Gerrit-Reviewer: Coren Gerrit-Reviewer: Madhuvishy Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Volans Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: toolschecker: Fix labsdb1005 test to use a current DB
Madhuvishy has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381885 ) Change subject: toolschecker: Fix labsdb1005 test to use a current DB .. toolschecker: Fix labsdb1005 test to use a current DB Bug: T177103 Change-Id: I1711dc7136531f2d9bfbca0577df2a7d3f1be544 --- M modules/toollabs/files/toolschecker.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/85/381885/1 diff --git a/modules/toollabs/files/toolschecker.py b/modules/toollabs/files/toolschecker.py index 77e0004..a002871 100644 --- a/modules/toollabs/files/toolschecker.py +++ b/modules/toollabs/files/toolschecker.py @@ -156,7 +156,7 @@ read_default_file=os.path.expanduser('~/replica.my.cnf') ) cur = connection.cursor() -cur.execute('select * from toolserverdb_p.wiki limit 1') +cur.execute('select * from toollabs_p.tools limit 1') result = cur.fetchone() if result: return True -- To view, visit https://gerrit.wikimedia.org/r/381885 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1711dc7136531f2d9bfbca0577df2a7d3f1be544 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: Show banners about unavailability of PDF rendering on error ...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381804 ) Change subject: Show banners about unavailability of PDF rendering on error page .. Show banners about unavailability of PDF rendering on error page The `saved_book` template has a hardcoded links to render book action When OCG writers become disabled all links will lead to an error page and we want to inform users about PDF rendering unavailibility presenting them information banners. Bug: T175996 Change-Id: I1f269e58893eda9065b40509fdac67ec6b97db20 --- M Collection.body.php 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: jenkins-bot: Verified Jdlrobson: Looks good to me, approved diff --git a/Collection.body.php b/Collection.body.php index 00b3255..fc6574a 100644 --- a/Collection.body.php +++ b/Collection.body.php @@ -1147,7 +1147,6 @@ break; case 'failed': $out->setPageTitle( $this->msg( 'coll-rendering_failed_title' ) ); - $statusText = $result->get( 'status', 'status' ); if ( $statusText ) { $status = $this->msg( 'coll-rendering_failed_status', $statusText )->text(); @@ -1353,10 +1352,13 @@ if ( !$result->isError() ) { return true; } - $this->getOutput()->showErrorPage( - 'coll-request_failed_title', - 'coll-request_failed_msg' - ); + $output = $this->getOutput(); + MessageBoxHelper::addModuleStyles( $output ); + $output->prepareErrorPage( $output->msg( 'coll-request_failed_title' ) ); + $output->addHTML( MessageBoxHelper::renderWarningBoxes() ); + $output->addWikiMsgArray( 'coll-request_failed_msg', [] ); + $output->returnToMain(); + return false; } -- To view, visit https://gerrit.wikimedia.org/r/381804 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f269e58893eda9065b40509fdac67ec6b97db20 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Collection Gerrit-Branch: master Gerrit-Owner: Pmiazga Gerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: restbase-ng: Collect type=Table (not ColumnFamily)
Eevans has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381884 ) Change subject: restbase-ng: Collect type=Table (not ColumnFamily) .. restbase-ng: Collect type=Table (not ColumnFamily) The setup of the restbase-ng environment didn't take Cassandra 3.x metric naming convention into account (probably since we were focused on Prometheus). As we are now interested in sampling via Graphite *and* Prometheus (for a short while; for verification purposes), actually collect the Cassandra 3.x-compatible metrics. Bug: T169936 Change-Id: Iffb3be0393010a4b395ca03fb4367ff94be241a1 --- M hieradata/role/common/restbase/production_ng.yaml 1 file changed, 21 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/84/381884/1 diff --git a/hieradata/role/common/restbase/production_ng.yaml b/hieradata/role/common/restbase/production_ng.yaml index 1df012e..93f61b8 100644 --- a/hieradata/role/common/restbase/production_ng.yaml +++ b/hieradata/role/common/restbase/production_ng.yaml @@ -26,25 +26,25 @@ - restbase2012.codfw.wmnet profile::cassandra::metrics_whitelist: - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.CoordinatorReadLatency\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.CoordinatorScanLatency\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.EstimatedColumnCountHistogram\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.EstimatedRowCount\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.EstimatedRowSizeHistogram\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.LiveDiskSpaceUsed\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.LiveSSTableCount\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.LiveScannedHistogram\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.MaxRowSize\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.MeanRowSize\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.MinRowSize\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.PendingCompactions\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.PendingFlushes\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.RangeLatency\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.ReadLatency\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.SSTablesPerReadHistogram\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.TombstoneScannedHistogram\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.TotalDiskSpaceUsed\..*$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.WriteLatency\..*$ + - .*\.metrics\.Table\..*\.meta\.CoordinatorReadLatency\..*$ + - .*\.metrics\.Table\..*\.meta\.CoordinatorScanLatency\..*$ + - .*\.metrics\.Table\..*\.meta\.EstimatedColumnCountHistogram\..*$ + - .*\.metrics\.Table\..*\.meta\.EstimatedRowCount\..*$ + - .*\.metrics\.Table\..*\.meta\.EstimatedRowSizeHistogram\..*$ + - .*\.metrics\.Table\..*\.meta\.LiveDiskSpaceUsed\..*$ + - .*\.metrics\.Table\..*\.meta\.LiveSSTableCount\..*$ + - .*\.metrics\.Table\..*\.meta\.LiveScannedHistogram\..*$ + - .*\.metrics\.Table\..*\.meta\.MaxRowSize\..*$ + - .*\.metrics\.Table\..*\.meta\.MeanRowSize\..*$ + - .*\.metrics\.Table\..*\.meta\.MinRowSize\..*$ + - .*\.metrics\.Table\..*\.meta\.PendingCompactions\..*$ + - .*\.metrics\.Table\..*\.meta\.PendingFlushes\..*$ + - .*\.metrics\.Table\..*\.meta\.RangeLatency\..*$ + - .*\.metrics\.Table\..*\.meta\.ReadLatency\..*$ + - .*\.metrics\.Table\..*\.meta\.SSTablesPerReadHistogram\..*$ + - .*\.metrics\.Table\..*\.meta\.TombstoneScannedHistogram\..*$ + - .*\.metrics\.Table\..*\.meta\.TotalDiskSpaceUsed\..*$ + - .*\.metrics\.Table\..*\.meta\.WriteLatency\..*$ profile::cassandra::metrics_blacklist: - .*\.15MinuteRate$ - .*\.5MinuteRate$ @@ -54,10 +54,10 @@ - .*\.meanRate$ - .*\.min$ - .*\.stddev$ - - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\..*$ + - .*\.metrics\.Table\..*\.meta\..*$ - .*\.metrics\.Keyspace\..*$ - .*\.metrics\.Client\..*$ - - .*\.metrics\.Table\..*$ + - .*\.metrics\.ColumnFamily\..*$ ## Instances profile::cassandra::instances: "restbase1008.eqiad.wmnet": -- To view, visit https://gerrit.wikimedia.org/r/381884 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iffb3be0393010a4b395ca03fb4367ff94be241a1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Eevans ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Refactor analysis config builder to make it reusable
Smalyshev has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381883 ) Change subject: Refactor analysis config builder to make it reusable .. Refactor analysis config builder to make it reusable Now, the same AnalysisConfigBuilder class can build configs for any language. For BC reasons, ctor still accepts language code and this code will be used if buildConfig() is called without arguments. However, most other functions require language explicitly be passed to them and do not depend on default language. Also, AnalysisConfigBuilder object is added to CirrusSearchAnalysisConfig hook. Change-Id: I76070a82e8ebe2afea491bd34cd5221aa53f53e0 --- M docs/hooks.txt M includes/Maintenance/AnalysisConfigBuilder.php M includes/Maintenance/SuggesterAnalysisConfigBuilder.php M includes/Query/FullTextSimpleMatchQueryBuilder.php M maintenance/updateOneSearchIndexConfig.php M maintenance/updateSuggesterIndex.php M tests/unit/Maintenance/AnalysisConfigBuilderTest.php 7 files changed, 84 insertions(+), 90 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/83/381883/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index e306548..0da7f7e 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -11,6 +11,7 @@ 'CirrusSearchAnalysisConfig': Allows to hook into the configuration for analysis &$config - multi-dimensional configuration array for analysis of various languages and fields + $builder - AnalysisConfigBuilder object handling the building (since 1.31) 'CirrusSearchMappingConfig': Allows configuration of the mapping of fields &$config - multi-dimensional configuration array that contains Elasticsearch document configuration. diff --git a/includes/Maintenance/AnalysisConfigBuilder.php b/includes/Maintenance/AnalysisConfigBuilder.php index 9698d14..5e69a36 100644 --- a/includes/Maintenance/AnalysisConfigBuilder.php +++ b/includes/Maintenance/AnalysisConfigBuilder.php @@ -41,24 +41,9 @@ const KEYWORD_IGNORE_ABOVE = 5000; /** -* @var string Language code we're building analysis for -*/ - private $language; - - /** * @var boolean is the icu plugin available? */ private $icu; - - /** -* @var boolean true if icu folding is requested and available -*/ - protected $icuFolding; - - /** -* @var boolean true if the icu tokenizer is requested and available -*/ - protected $icuTokenizer; /** * @var array Similarity algo (tf/idf, bm25, etc) configuration @@ -69,6 +54,15 @@ * @var SearchConfig cirrus config */ protected $config; + /** +* @var string[] +*/ + private $plugins; + + /** +* @var string +*/ + protected $defaultLanguage; /** * @param string $langCode The language code to build config for @@ -76,7 +70,8 @@ * @param SearchConfig $config */ public function __construct( $langCode, array $plugins, SearchConfig $config = null ) { - $this->language = $langCode; + $this->defaultLanguage = $langCode; + $this->plugins = $plugins; foreach ( $this->elasticsearchLanguageAnalyzersFromPlugins as $pluginSpec => $extra ) { $pluginsPresent = 1; $pluginList = explode( ',', $pluginSpec ); @@ -102,17 +97,15 @@ ); $this->config = $config; - $this->icuFolding = $this->shouldActivateIcuFolding( $plugins ); - $this->icuTokenizer = $this->shouldActivateIcuTokenization(); } /** * Determine if ascii folding should be used -* @param string[] $plugins list of installed elasticsearch plugins +* @param string $language Config language * @return bool true if icu folding should be enabled */ - private function shouldActivateIcuFolding( array $plugins ) { - if ( !$this->icu || !in_array( 'extra', $plugins ) ) { + public function shouldActivateIcuFolding( $language ) { + if ( !$this->icu || !in_array( 'extra', $this->plugins ) ) { // ICU folding requires the icu plugin and the extra plugin return false; } @@ -130,8 +123,8 @@ case 'no': return false; case 'default': - if ( isset( $this->languagesWithIcuFolding[$this->language] ) ) { - return $this->languagesWithIcuFolding[$this->language]; + if ( isset( $this->languagesWithIcuFolding[$language] ) ) { + return $this->languagesWithIcuFolding[$language]; } default:
[MediaWiki-commits] [Gerrit] mediawiki...GlobalUserPage[master]: Set canonical URL of remote pages to central page
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381882 ) Change subject: Set canonical URL of remote pages to central page .. Set canonical URL of remote pages to central page This matches what we do for foreign file pages where there is no local content. Bug: T177159 Change-Id: I5801c7e15ee5dd1751d0b48acddf444e63944c2e --- M includes/GlobalUserPage.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUserPage refs/changes/82/381882/1 diff --git a/includes/GlobalUserPage.php b/includes/GlobalUserPage.php index c45e0e2..f097edd 100644 --- a/includes/GlobalUserPage.php +++ b/includes/GlobalUserPage.php @@ -87,11 +87,14 @@ $out->addHTML( $parsedOutput['text'] ); $out->addModuleStyles( 'ext.GlobalUserPage' ); + // Set canonical URL to point to the source + $sourceURL = $this->mPage->getSourceURL(); + $out->setCanonicalUrl( $sourceURL ); $footerKey = $this->config->get( 'GlobalUserPageFooterKey' ); if ( $footerKey ) { $out->addHTML( '' . "\n" . $out->msg( $footerKey ) - ->params( $this->getUsername(), $this->mPage->getSourceURL() )->parse() . + ->params( $this->getUsername(), $sourceURL )->parse() . "\n" ); } -- To view, visit https://gerrit.wikimedia.org/r/381882 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5801c7e15ee5dd1751d0b48acddf444e63944c2e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalUserPage Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits