[MediaWiki-commits] [Gerrit] Optimize Cog sprite SVG - change (mediawiki...UniversalLanguageSelector)
Pginer has uploaded a new change for review. https://gerrit.wikimedia.org/r/94324 Change subject: Optimize Cog sprite SVG .. Optimize Cog sprite SVG Reducing the size of the SVG by: - Simplifying the shape (two anchor points removed) - Removal of XML attributes not needed (namespace declarations not used, attributes with the default value, etc.) Change-Id: I3dc810313d1bd9ebd5933a92ee90210cbf6f4fb4 --- M resources/images/cog-sprite.svg 1 file changed, 3 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/24/94324/1 diff --git a/resources/images/cog-sprite.svg b/resources/images/cog-sprite.svg index dacda0e..242be14 100644 --- a/resources/images/cog-sprite.svg +++ b/resources/images/cog-sprite.svg @@ -1,29 +1,3 @@ - - - -http://purl.org/dc/elements/1.1/"; - xmlns:cc="http://creativecommons.org/ns#"; - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; - xmlns:svg="http://www.w3.org/2000/svg"; - xmlns="http://www.w3.org/2000/svg"; - version="1.1" - width="14" - height="32" - viewBox="0 0 14 32" - id="Layer_1" - xml:space="preserve">image/svg+xmlhttp://purl.org/dc/dcmitype/StillImage"; /> - - - - \ No newline at end of file + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> +http://www.w3.org/2000/svg"; width="14px" height="32px"> \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/94324 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3dc810313d1bd9ebd5933a92ee90210cbf6f4fb4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Pginer ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add back thm1/2 to dhcp - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: add back thm1/2 to dhcp .. add back thm1/2 to dhcp removed in 2fd232a2e8e1920cdaafc86920cf89eab5fffc26 but we don't want to decomm them just yet Change-Id: I3da21b22da61fcce220cddcb03428971fc5a0578 --- M files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 b/files/dhcpd/linux-host-entries.ttyS1-115200 index e047b05..531574a 100644 --- a/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -4420,6 +4420,16 @@ fixed-address tin.eqiad.wmnet; } +host tmh1 { + hardware ethernet d4:be:d9:af:68:a0; + fixed-address tmh1.pmtpa.wmnet; +} + +host tmh2 { + hardware ethernet d4:be:d9:af:68:6a; + fixed-address tmh2.pmtpa.wmnet; +} + host tmh1001 { hardware ethernet 18:03:73:f1:4f:82; fixed-address tmh1001.eqiad.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/94323 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3da21b22da61fcce220cddcb03428971fc5a0578 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn Gerrit-Reviewer: ArielGlenn Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add back thm1/2 to dhcp - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/94323 Change subject: add back thm1/2 to dhcp .. add back thm1/2 to dhcp removed in 2fd232a2e8e1920cdaafc86920cf89eab5fffc26 but we don't want to decomm them just yet Change-Id: I3da21b22da61fcce220cddcb03428971fc5a0578 --- M files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/23/94323/1 diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 b/files/dhcpd/linux-host-entries.ttyS1-115200 index e047b05..531574a 100644 --- a/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -4420,6 +4420,16 @@ fixed-address tin.eqiad.wmnet; } +host tmh1 { + hardware ethernet d4:be:d9:af:68:a0; + fixed-address tmh1.pmtpa.wmnet; +} + +host tmh2 { + hardware ethernet d4:be:d9:af:68:6a; + fixed-address tmh2.pmtpa.wmnet; +} + host tmh1001 { hardware ethernet 18:03:73:f1:4f:82; fixed-address tmh1001.eqiad.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/94323 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3da21b22da61fcce220cddcb03428971fc5a0578 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix typo in logmsg-git-hook - change (operations/mediawiki-config)
Ori.livneh has submitted this change and it was merged. Change subject: Fix typo in logmsg-git-hook .. Fix typo in logmsg-git-hook Change-Id: I027abe3635182bd2879eaa6ae76c070dbfa4ee9b --- M logmsg-git-hook 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/logmsg-git-hook b/logmsg-git-hook index 6cef390..a658471 100755 --- a/logmsg-git-hook +++ b/logmsg-git-hook @@ -41,6 +41,6 @@ [[ -r "/var/log/logmsg" ]] && ! grep -q "${CHANGE}" /var/log/logmsg || exit echo "${CHANGE}" >> /var/log/logmsg || exit - dologmsg "!log ${USER} updated ${REPO_ROOT} to {{Gerrit|${CHANGE:0:10}}: ${SUBJECT}" + dologmsg "!log ${USER} updated ${REPO_ROOT} to {{Gerrit|${CHANGE:0:10}}}: ${SUBJECT}" } &>/dev/null -- To view, visit https://gerrit.wikimedia.org/r/94322 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I027abe3635182bd2879eaa6ae76c070dbfa4ee9b Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix typo in logmsg-git-hook - change (operations/mediawiki-config)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/94322 Change subject: Fix typo in logmsg-git-hook .. Fix typo in logmsg-git-hook Change-Id: I027abe3635182bd2879eaa6ae76c070dbfa4ee9b --- M logmsg-git-hook 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/22/94322/1 diff --git a/logmsg-git-hook b/logmsg-git-hook index 6cef390..a658471 100755 --- a/logmsg-git-hook +++ b/logmsg-git-hook @@ -41,6 +41,6 @@ [[ -r "/var/log/logmsg" ]] && ! grep -q "${CHANGE}" /var/log/logmsg || exit echo "${CHANGE}" >> /var/log/logmsg || exit - dologmsg "!log ${USER} updated ${REPO_ROOT} to {{Gerrit|${CHANGE:0:10}}: ${SUBJECT}" + dologmsg "!log ${USER} updated ${REPO_ROOT} to {{Gerrit|${CHANGE:0:10}}}: ${SUBJECT}" } &>/dev/null -- To view, visit https://gerrit.wikimedia.org/r/94322 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I027abe3635182bd2879eaa6ae76c070dbfa4ee9b Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] logmsg-git-hook: wrap Change-Ids in {{Gerrit|...}} - change (operations/mediawiki-config)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/94321 Change subject: logmsg-git-hook: wrap Change-Ids in {{Gerrit|...}} .. logmsg-git-hook: wrap Change-Ids in {{Gerrit|...}} Per suggestion from Greg. Follows I998135726 & I3691bbf3a. Change-Id: I8e3d1c4d77e1e0b49829f2d5ab823201e6e2ef6a --- M logmsg-git-hook 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/21/94321/1 diff --git a/logmsg-git-hook b/logmsg-git-hook index 11dfa11..6cef390 100755 --- a/logmsg-git-hook +++ b/logmsg-git-hook @@ -41,6 +41,6 @@ [[ -r "/var/log/logmsg" ]] && ! grep -q "${CHANGE}" /var/log/logmsg || exit echo "${CHANGE}" >> /var/log/logmsg || exit - dologmsg "!log ${USER} updated ${REPO_ROOT} to ${CHANGE:0:10}: ${SUBJECT}" + dologmsg "!log ${USER} updated ${REPO_ROOT} to {{Gerrit|${CHANGE:0:10}}: ${SUBJECT}" } &>/dev/null -- To view, visit https://gerrit.wikimedia.org/r/94321 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e3d1c4d77e1e0b49829f2d5ab823201e6e2ef6a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] logmsg-git-hook: wrap Change-Ids in {{Gerrit|...}} - change (operations/mediawiki-config)
Ori.livneh has submitted this change and it was merged. Change subject: logmsg-git-hook: wrap Change-Ids in {{Gerrit|...}} .. logmsg-git-hook: wrap Change-Ids in {{Gerrit|...}} Per suggestion from Greg. Follows I998135726 & I3691bbf3a. Change-Id: I8e3d1c4d77e1e0b49829f2d5ab823201e6e2ef6a --- M logmsg-git-hook 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/logmsg-git-hook b/logmsg-git-hook index 11dfa11..6cef390 100755 --- a/logmsg-git-hook +++ b/logmsg-git-hook @@ -41,6 +41,6 @@ [[ -r "/var/log/logmsg" ]] && ! grep -q "${CHANGE}" /var/log/logmsg || exit echo "${CHANGE}" >> /var/log/logmsg || exit - dologmsg "!log ${USER} updated ${REPO_ROOT} to ${CHANGE:0:10}: ${SUBJECT}" + dologmsg "!log ${USER} updated ${REPO_ROOT} to {{Gerrit|${CHANGE:0:10}}: ${SUBJECT}" } &>/dev/null -- To view, visit https://gerrit.wikimedia.org/r/94321 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e3d1c4d77e1e0b49829f2d5ab823201e6e2ef6a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove '--first-parent' arg from rev-list invocation in logm... - change (operations/mediawiki-config)
Ori.livneh has submitted this change and it was merged. Change subject: Remove '--first-parent' arg from rev-list invocation in logmsg-git-hook .. Remove '--first-parent' arg from rev-list invocation in logmsg-git-hook Follows I998135726. Change-Id: I3691bbf3aecb296dce972f0646e80d0525db5166 --- M logmsg-git-hook 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/logmsg-git-hook b/logmsg-git-hook index f70be39..11dfa11 100755 --- a/logmsg-git-hook +++ b/logmsg-git-hook @@ -30,7 +30,7 @@ # local branch and upstream. Then work backwards if necessary to identify the # latest nonmerge commit, so we can get a Change-Id. COMMON="$( git show-branch --merge-base @{upstream} )" || exit - COMMIT="$( git rev-list -1 --no-merges --first-parent --remotes=origin ${COMMON} )" || exit + COMMIT="$( git rev-list -1 --no-merges --remotes=origin ${COMMON} )" || exit SUBJECT="$( git log -1 --format=%s ${COMMIT} )" || exit CHANGE="$( git log -1 --format=%B ${COMMIT} | grep -Po '(?<=Change-Id: ).{10}' )" || exit -- To view, visit https://gerrit.wikimedia.org/r/94320 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3691bbf3aecb296dce972f0646e80d0525db5166 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove '--first-parent' arg from rev-list invocation in logm... - change (operations/mediawiki-config)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/94320 Change subject: Remove '--first-parent' arg from rev-list invocation in logmsg-git-hook .. Remove '--first-parent' arg from rev-list invocation in logmsg-git-hook Follows I998135726. Change-Id: I3691bbf3aecb296dce972f0646e80d0525db5166 --- M logmsg-git-hook 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/20/94320/1 diff --git a/logmsg-git-hook b/logmsg-git-hook index f70be39..11dfa11 100755 --- a/logmsg-git-hook +++ b/logmsg-git-hook @@ -30,7 +30,7 @@ # local branch and upstream. Then work backwards if necessary to identify the # latest nonmerge commit, so we can get a Change-Id. COMMON="$( git show-branch --merge-base @{upstream} )" || exit - COMMIT="$( git rev-list -1 --no-merges --first-parent --remotes=origin ${COMMON} )" || exit + COMMIT="$( git rev-list -1 --no-merges --remotes=origin ${COMMON} )" || exit SUBJECT="$( git log -1 --format=%s ${COMMIT} )" || exit CHANGE="$( git log -1 --format=%B ${COMMIT} | grep -Po '(?<=Change-Id: ).{10}' )" || exit -- To view, visit https://gerrit.wikimedia.org/r/94320 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3691bbf3aecb296dce972f0646e80d0525db5166 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a githook for logging repo modification on tin - change (operations/mediawiki-config)
Ori.livneh has submitted this change and it was merged. Change subject: Add a githook for logging repo modification on tin .. Add a githook for logging repo modification on tin The SAL would be a lot more useful if it contained information about what went out with each deployment. Although there is a convention around document deployment payloads in log messages, it is not consistently followed. So: automate. This patch adds a script, 'logmsg-git-hook'. When invoked with '--install', it configures itself as a handler for post-commit, post-merge, and post-rewrite git hooks for /a/common & its php-* subdirs. When invoked as a githook, it !logs the Change-Id of the latest non-merge commit shared between the local branch and upstream. These criteria are meant to ensure that we don't !log security patches by mistake. Change-Id: I9981357261f607dbddaea247dbe8439af81d4fc9 --- A logmsg-git-hook 1 file changed, 46 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/logmsg-git-hook b/logmsg-git-hook new file mode 100755 index 000..f70be39 --- /dev/null +++ b/logmsg-git-hook @@ -0,0 +1,46 @@ +#!/bin/bash + +# Script to log repository modification on deployment hosts, so we have some +# notion of what each sync and scap in the log pushed out. + +# If invoked with "--install", configure the hook for /a/common and its php-* +# subdirectories. +[[ "$1" == --install ]] && { +. /usr/local/lib/mw-deployment-vars.sh + +SCRIPT="$( readlink -f $0 )" +for HOOK in 'post-commit' 'post-merge' 'post-rewrite'; do +ln -fs $SCRIPT $MW_COMMON_SOURCE/.git/hooks/$HOOK +find $MW_COMMON_SOURCE -maxdepth 3 -path '*/php-*/.git/hooks' -execdir ln -fs $SCRIPT hooks/$HOOK \; +done + +echo "Ok." +exit +} + +{ + + # Exit unconditionally if the NOLOGMSG environment variable is set. + # Security engineers should set this variable in their ~/.profile. + [[ "$NOLOGMSG" ]] && exit; + + REPO_ROOT="$( git rev-parse --show-toplevel )" || exit + + # Exclude security patches by determining the latest common commit between the + # local branch and upstream. Then work backwards if necessary to identify the + # latest nonmerge commit, so we can get a Change-Id. + COMMON="$( git show-branch --merge-base @{upstream} )" || exit + COMMIT="$( git rev-list -1 --no-merges --first-parent --remotes=origin ${COMMON} )" || exit + + SUBJECT="$( git log -1 --format=%s ${COMMIT} )" || exit + CHANGE="$( git log -1 --format=%B ${COMMIT} | grep -Po '(?<=Change-Id: ).{10}' )" || exit + + # If the Change-Id has already been logged, no change has occurred that + # should be publicly visible. Perhaps someone is committing a security fix. + # If it hasn't been logged, add it to the log file. + [[ -r "/var/log/logmsg" ]] && ! grep -q "${CHANGE}" /var/log/logmsg || exit + echo "${CHANGE}" >> /var/log/logmsg || exit + + dologmsg "!log ${USER} updated ${REPO_ROOT} to ${CHANGE:0:10}: ${SUBJECT}" + +} &>/dev/null -- To view, visit https://gerrit.wikimedia.org/r/94319 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9981357261f607dbddaea247dbe8439af81d4fc9 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a githook for logging repo modification on tin - change (operations/mediawiki-config)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/94319 Change subject: Add a githook for logging repo modification on tin .. Add a githook for logging repo modification on tin The SAL would be a lot more useful if it contained information about what went out with each deployment. Although there is a convention around document deployment payloads in log messages, it is not consistently followed. So: automate. This patch adds a script, 'logmsg-git-hook'. When invoked with '--install', it configures itself as a handler for post-commit, post-merge, and post-rewrite git hooks for /a/common & its php-* subdirs. When invoked as a githook, it !logs the Change-Id of the latest non-merge commit shared between the local branch and upstream. These criteria are meant to ensure that we don't !log security patches by mistake. Change-Id: I9981357261f607dbddaea247dbe8439af81d4fc9 --- A logmsg-git-hook 1 file changed, 46 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/19/94319/1 diff --git a/logmsg-git-hook b/logmsg-git-hook new file mode 100755 index 000..f70be39 --- /dev/null +++ b/logmsg-git-hook @@ -0,0 +1,46 @@ +#!/bin/bash + +# Script to log repository modification on deployment hosts, so we have some +# notion of what each sync and scap in the log pushed out. + +# If invoked with "--install", configure the hook for /a/common and its php-* +# subdirectories. +[[ "$1" == --install ]] && { +. /usr/local/lib/mw-deployment-vars.sh + +SCRIPT="$( readlink -f $0 )" +for HOOK in 'post-commit' 'post-merge' 'post-rewrite'; do +ln -fs $SCRIPT $MW_COMMON_SOURCE/.git/hooks/$HOOK +find $MW_COMMON_SOURCE -maxdepth 3 -path '*/php-*/.git/hooks' -execdir ln -fs $SCRIPT hooks/$HOOK \; +done + +echo "Ok." +exit +} + +{ + + # Exit unconditionally if the NOLOGMSG environment variable is set. + # Security engineers should set this variable in their ~/.profile. + [[ "$NOLOGMSG" ]] && exit; + + REPO_ROOT="$( git rev-parse --show-toplevel )" || exit + + # Exclude security patches by determining the latest common commit between the + # local branch and upstream. Then work backwards if necessary to identify the + # latest nonmerge commit, so we can get a Change-Id. + COMMON="$( git show-branch --merge-base @{upstream} )" || exit + COMMIT="$( git rev-list -1 --no-merges --first-parent --remotes=origin ${COMMON} )" || exit + + SUBJECT="$( git log -1 --format=%s ${COMMIT} )" || exit + CHANGE="$( git log -1 --format=%B ${COMMIT} | grep -Po '(?<=Change-Id: ).{10}' )" || exit + + # If the Change-Id has already been logged, no change has occurred that + # should be publicly visible. Perhaps someone is committing a security fix. + # If it hasn't been logged, add it to the log file. + [[ -r "/var/log/logmsg" ]] && ! grep -q "${CHANGE}" /var/log/logmsg || exit + echo "${CHANGE}" >> /var/log/logmsg || exit + + dologmsg "!log ${USER} updated ${REPO_ROOT} to ${CHANGE:0:10}: ${SUBJECT}" + +} &>/dev/null -- To view, visit https://gerrit.wikimedia.org/r/94319 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9981357261f607dbddaea247dbe8439af81d4fc9 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix the IndexTest - change (mediawiki...Flow)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/94318 Change subject: Fix the IndexTest .. Fix the IndexTest Change-Id: I442fcf6ca1ae7dac701855dd3c389f299bdf9d53 --- M includes/Data/ObjectManager.php M tests/IndexTest.php 2 files changed, 33 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/18/94318/1 diff --git a/includes/Data/ObjectManager.php b/includes/Data/ObjectManager.php index e217311..9d1faec 100644 --- a/includes/Data/ObjectManager.php +++ b/includes/Data/ObjectManager.php @@ -959,13 +959,6 @@ } protected function cacheKey( array $attributes ) { - global $wgFlowDefaultWikiDb; // meh - if ( $wgFlowDefaultWikiDb === false ) { - $db = wfWikiId(); - } else { - $db = $wgFlowDefaultWikiDb; - } - foreach( $attributes as $key => $attr ) { if ( $attr instanceof \Flow\Model\UUID ) { $attributes[$key] = $attr->getHex(); @@ -975,7 +968,19 @@ } } - return wfForeignMemcKey( $db, '', $this->prefix, implode( ':', $attributes ) ); + return wfForeignMemcKey( self::cachedDbId(), '', $this->prefix, implode( ':', $attributes ) ); + } + + /** +* @return string The id of the database being cached +*/ + static public function cachedDbId() { + global $wgFlowDefaultWikiDb; + if ( $wgFlowDefaultWikiDb === false ) { + return wfWikiId(); + } else { + return $wgFlowDefaultWikiDb; + } } } diff --git a/tests/IndexTest.php b/tests/IndexTest.php index 44c603a..17c1495 100644 --- a/tests/IndexTest.php +++ b/tests/IndexTest.php @@ -6,15 +6,18 @@ public function testShallow() { $bag = new \HashBagOStuff; - $cache = new \Flow\Data\BufferedCache( $bag ); + $cache = new Data\BufferedCache( $bag ); + + // As we are only testing the cached result, storage should never be called + // not sure how to test that $storage = $this->getMock( 'Flow\\Data\\ObjectStorage' ); - $unique = new \Flow\Data\UniqueIndex( + $unique = new Data\UniqueFeatureIndex( $cache, $storage, 'unique', array( 'id' ) ); - $secondary = new \Flow\Data\SecondaryIndex( + $secondary = new Data\TopKIndex( $cache, $storage, 'secondary', array( 'name' ), // keys indexed in this array array( @@ -23,12 +26,13 @@ ) ); - $bag->set( 'flow:unique:1', array( array( 'id' => 1, 'name' => 'foo', 'other' => 'ppp' ) ) ); - $bag->set( 'flow:unique:2', array( array( 'id' => 2, 'name' => 'foo', 'other' => 'qqq' ) ) ); - $bag->set( 'flow:unique:3', array( array( 'id' => 3, 'name' => 'baz', 'other' => 'lll' ) ) ); + $db = Data\FeatureIndex::cachedDbId(); + $bag->set( "$db:unique:1", array( array( 'id' => 1, 'name' => 'foo', 'other' => 'ppp' ) ) ); + $bag->set( "$db:unique:2", array( array( 'id' => 2, 'name' => 'foo', 'other' => 'qqq' ) ) ); + $bag->set( "$db:unique:3", array( array( 'id' => 3, 'name' => 'baz', 'other' => 'lll' ) ) ); - $bag->set( 'flow:secondary:foo', array( array( 'id' => 1 ), array( 'id' => 2 ) ) ); - $bag->set( 'flow:secondary:baz', array( array( 'id' => 3 ) ) ); + $bag->set( "$db:secondary:foo", array( array( 'id' => 1 ), array( 'id' => 2 ) ) ); + $bag->set( "$db:secondary:baz", array( array( 'id' => 3 ) ) ); $expect = array( array( 'id' => 1, 'name' => 'foo', 'other' => 'ppp', ), @@ -47,12 +51,12 @@ $cache = new \Flow\Data\BufferedCache( $bag ); $storage = $this->getMock( 'Flow\\Data\\ObjectStorage' ); - $unique = new \Flow\Data\UniqueIndex( + $unique = new \Flow\Data\UniqueFeatureIndex( $cache, $storage, 'unique', array( 'id', 'ot' ) ); - $secondary = new \Flow\Data\SecondaryIndex( + $secondary = new \Flow\Data\TopKIndex( $cache, $storage, 'secondary', array( 'name' ), // keys indexed in this array array( @@ -63,15 +67,16 @@ // remember: unique index still stores an array of results to be consistent with other indexes
[MediaWiki-commits] [Gerrit] Set up this.url for ParsoidCacheRequest too - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Set up this.url for ParsoidCacheRequest too .. Set up this.url for ParsoidCacheRequest too This is used to report cache misses, which is currently less than informative by always returning 'undefined'. Change-Id: Ibfef3e332009858987f35029c56203fdeecb7e0d --- M js/lib/mediawiki.ApiRequest.js 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/mediawiki.ApiRequest.js b/js/lib/mediawiki.ApiRequest.js index 8ac266b..c013211 100644 --- a/js/lib/mediawiki.ApiRequest.js +++ b/js/lib/mediawiki.ApiRequest.js @@ -547,6 +547,7 @@ var url = env.conf.parsoid.parsoidCacheURI + env.conf.wiki.iwp + '/' + encodeURIComponent(title.replace(/ /g, '_')) + '?' + qs.stringify( apiargs ); + this.url = url; //console.warn('Cache request:', url); -- To view, visit https://gerrit.wikimedia.org/r/94315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibfef3e332009858987f35029c56203fdeecb7e0d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: GWicke Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Re-parse selser DOM to avoid confusing failures without caching - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Re-parse selser DOM to avoid confusing failures without caching .. Re-parse selser DOM to avoid confusing failures without caching Change-Id: I269a9686be5d0fcf22dcefbc0025b945b309c9ca --- M js/lib/mediawiki.SelectiveSerializer.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/mediawiki.SelectiveSerializer.js b/js/lib/mediawiki.SelectiveSerializer.js index 062a4d0..ac4b472 100644 --- a/js/lib/mediawiki.SelectiveSerializer.js +++ b/js/lib/mediawiki.SelectiveSerializer.js @@ -137,7 +137,7 @@ // Parse the wikitext src to the original DOM, and pass that on to // doSerializeDOM parserPipeline.once( 'document', function ( origDoc ) { - var body = origDoc.body; + var body = DU.parseHTML( DU.serializeNode(origDoc) ).body; self.env.page.dom = body; //console.log('calling doSerializeDOM'); //console.log(body.outerHTML); -- To view, visit https://gerrit.wikimedia.org/r/94259 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I269a9686be5d0fcf22dcefbc0025b945b309c9ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: GWicke Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add date/time functions (some of these) - change (mediawiki...Foxway)
jenkins-bot has submitted this change and it was merged. Change subject: add date/time functions (some of these) .. add date/time functions (some of these) * define FOXWAY_DOUBLE_ARROW_WAS_USED (in compiler) * allows define constants as function (in runtime) Time: 474 ms, Memory: 24.50Mb OK (478 tests, 484 assertions) Change-Id: Id584dae5c7458a2c88becbae2d880fecc39160b5 --- M Settings.php M includes/Compiler.php M includes/Runtime.php M includes/constants.php A includes/functions/datetime.php A tests/phpunit/includes/RuntimeFunctionsDatetimeTest.php R tests/phpunit/includes/RuntimeFunctionsPcreTest.php M tests/phpunit/includes/RuntimeTest.php 8 files changed, 169 insertions(+), 2 deletions(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/Settings.php b/Settings.php index 9d5b44c..887de27 100644 --- a/Settings.php +++ b/Settings.php @@ -44,6 +44,7 @@ include __DIR__ . '/includes/functions/math.php', // Math Functions @see http://www.php.net/manual/en/ref.math.php include __DIR__ . '/includes/functions/var.php', // Variable handling Functions @see http://www.php.net/manual/en/ref.var.php include __DIR__ . '/includes/functions/pcre.php', // PCRE Functions @see http://www.php.net/manual/en/ref.pcre.php + include __DIR__ . '/includes/functions/datetime.php', // Date/Time Functions @see http://www.php.net/manual/en/ref.datetime.php Foxway\Runtime::$functions ); diff --git a/includes/Compiler.php b/includes/Compiler.php index fa1edc0..360cdb8 100644 --- a/includes/Compiler.php +++ b/includes/Compiler.php @@ -27,6 +27,7 @@ define( 'FOXWAY_EQUAL_HAVE_OPERATOR', 1 << 21 ); define( 'FOXWAY_ALLOW_ONLY_VARIABLES', 1 << 22 ); define( 'FOXWAY_ALLOW_SKIP_PARAMS', 1 << 23 ); // used in operator T_LIST +define( 'FOXWAY_DOUBLE_ARROW_WAS_USED', 1 << 24 ); define( 'FOXWAY_CLEAR_FLAG_FOR_SHIFT_BEFORE_PARENTHESES', FOXWAY_EXPECT_PARENTHESES_WITH_LIST_PARAMS ); //define( 'FOXWAY_CLEAR_FLAG_FOR_SHIFT_AFTER_PARENTHESES', FOXWAY_EXPECT_PARENTHESES_WITH_LIST_PARAMS ); @@ -467,6 +468,7 @@ array_unshift( $needParams, array(FOXWAY_STACK_COMMAND=>$id, FOXWAY_STACK_RESULT=>&$lastValue[FOXWAY_STACK_RESULT], FOXWAY_STACK_PARAM=>&$lastValue, FOXWAY_STACK_TOKEN_LINE=>$tokenLine) ); if ( $id == T_DOUBLE_ARROW ) { if( $parentFlags & FOXWAY_ALLOW_DOUBLE_ARROW == 0 ) { throw new ExceptionFoxway($id, FOXWAY_PHP_SYNTAX_ERROR_UNEXPECTED, $tokenLine); } + $parentFlags = ( $parentFlags & ~FOXWAY_ALLOW_DOUBLE_ARROW ) | FOXWAY_DOUBLE_ARROW_WAS_USED; // Mark double arrow was used } elseif ( $id == '=' ) { if ( $lastValue[FOXWAY_STACK_COMMAND] == T_VARIABLE ) { array_pop( $values ); // remove T_VARIABLE from $values @@ -685,6 +687,7 @@ $stack = array(); } $needOperator = false; + if( $parentFlags & FOXWAY_DOUBLE_ARROW_WAS_USED ) { $parentFlags = ( $parentFlags & ~FOXWAY_DOUBLE_ARROW_WAS_USED ) | FOXWAY_ALLOW_DOUBLE_ARROW; } break; default: // ';' $needOperator = false; diff --git a/includes/Runtime.php b/includes/Runtime.php index f7c7b5a..cf66c8e 100644 --- a/includes/Runtime.php +++ b/includes/Runtime.php @@ -405,7 +405,8 @@ } }else{ // This is constant if( isset(self::$constants[$name]) ) { - $value[FOXWAY_STACK_RESULT] = is_callable(self::$constants[$name]) ? self::$constants[$name]() :self::$constants[$name]; + $function = &self::$constants[$name]; + $value[FOXWAY_STACK_RESULT] = is_callable($function) ? $function() : $function; }else{ $value[FOXWAY_STACK_RESULT] = $name; // @todo send notice undefined constant diff --git a/includes/constants.php b/includes/constants.php index c903ae6..d643bec 100644 --- a/i
[MediaWiki-commits] [Gerrit] add date/time functions (some of these) - change (mediawiki...Foxway)
Pastakhov has uploaded a new change for review. https://gerrit.wikimedia.org/r/94317 Change subject: add date/time functions (some of these) .. add date/time functions (some of these) * define FOXWAY_DOUBLE_ARROW_WAS_USED (in compiler) * allows define constants as function (in runtime) Time: 474 ms, Memory: 24.50Mb OK (478 tests, 484 assertions) Change-Id: Id584dae5c7458a2c88becbae2d880fecc39160b5 --- M Settings.php M includes/Compiler.php M includes/Runtime.php M includes/constants.php A includes/functions/datetime.php A tests/phpunit/includes/RuntimeFunctionsDatetimeTest.php R tests/phpunit/includes/RuntimeFunctionsPcreTest.php M tests/phpunit/includes/RuntimeTest.php 8 files changed, 169 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Foxway refs/changes/17/94317/1 diff --git a/Settings.php b/Settings.php index 9d5b44c..887de27 100644 --- a/Settings.php +++ b/Settings.php @@ -44,6 +44,7 @@ include __DIR__ . '/includes/functions/math.php', // Math Functions @see http://www.php.net/manual/en/ref.math.php include __DIR__ . '/includes/functions/var.php', // Variable handling Functions @see http://www.php.net/manual/en/ref.var.php include __DIR__ . '/includes/functions/pcre.php', // PCRE Functions @see http://www.php.net/manual/en/ref.pcre.php + include __DIR__ . '/includes/functions/datetime.php', // Date/Time Functions @see http://www.php.net/manual/en/ref.datetime.php Foxway\Runtime::$functions ); diff --git a/includes/Compiler.php b/includes/Compiler.php index fa1edc0..360cdb8 100644 --- a/includes/Compiler.php +++ b/includes/Compiler.php @@ -27,6 +27,7 @@ define( 'FOXWAY_EQUAL_HAVE_OPERATOR', 1 << 21 ); define( 'FOXWAY_ALLOW_ONLY_VARIABLES', 1 << 22 ); define( 'FOXWAY_ALLOW_SKIP_PARAMS', 1 << 23 ); // used in operator T_LIST +define( 'FOXWAY_DOUBLE_ARROW_WAS_USED', 1 << 24 ); define( 'FOXWAY_CLEAR_FLAG_FOR_SHIFT_BEFORE_PARENTHESES', FOXWAY_EXPECT_PARENTHESES_WITH_LIST_PARAMS ); //define( 'FOXWAY_CLEAR_FLAG_FOR_SHIFT_AFTER_PARENTHESES', FOXWAY_EXPECT_PARENTHESES_WITH_LIST_PARAMS ); @@ -467,6 +468,7 @@ array_unshift( $needParams, array(FOXWAY_STACK_COMMAND=>$id, FOXWAY_STACK_RESULT=>&$lastValue[FOXWAY_STACK_RESULT], FOXWAY_STACK_PARAM=>&$lastValue, FOXWAY_STACK_TOKEN_LINE=>$tokenLine) ); if ( $id == T_DOUBLE_ARROW ) { if( $parentFlags & FOXWAY_ALLOW_DOUBLE_ARROW == 0 ) { throw new ExceptionFoxway($id, FOXWAY_PHP_SYNTAX_ERROR_UNEXPECTED, $tokenLine); } + $parentFlags = ( $parentFlags & ~FOXWAY_ALLOW_DOUBLE_ARROW ) | FOXWAY_DOUBLE_ARROW_WAS_USED; // Mark double arrow was used } elseif ( $id == '=' ) { if ( $lastValue[FOXWAY_STACK_COMMAND] == T_VARIABLE ) { array_pop( $values ); // remove T_VARIABLE from $values @@ -685,6 +687,7 @@ $stack = array(); } $needOperator = false; + if( $parentFlags & FOXWAY_DOUBLE_ARROW_WAS_USED ) { $parentFlags = ( $parentFlags & ~FOXWAY_DOUBLE_ARROW_WAS_USED ) | FOXWAY_ALLOW_DOUBLE_ARROW; } break; default: // ';' $needOperator = false; diff --git a/includes/Runtime.php b/includes/Runtime.php index f7c7b5a..cf66c8e 100644 --- a/includes/Runtime.php +++ b/includes/Runtime.php @@ -405,7 +405,8 @@ } }else{ // This is constant if( isset(self::$constants[$name]) ) { - $value[FOXWAY_STACK_RESULT] = is_callable(self::$constants[$name]) ? self::$constants[$name]() :self::$constants[$name]; + $function = &self::$constants[$name]; + $value[FOXWAY_STACK_RESULT] = is_callable($function) ? $function() : $function; }else{ $value[FOXWAY_STACK_RESULT] = $name; // @todo send notice undefined constant diff --git a/includes/constants.php b/includes
[MediaWiki-commits] [Gerrit] Allow ParserLimitReportFormat to change $value - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Allow ParserLimitReportFormat to change $value .. Allow ParserLimitReportFormat to change $value It's likely that an extension might want to reformat the value (e.g. by passing it through Language::formatSize()), but otherwise use the default behavior for the key. Make $value a reference parameter so they don't have to reimplement all the logic for laying out the row. Change-Id: I7799616a602d90e1b8d3f0ece35811ca387bade7 --- M docs/hooks.txt M includes/EditPage.php M includes/parser/Parser.php 3 files changed, 5 insertions(+), 4 deletions(-) Approvals: Tim Starling: Looks good to me, approved jenkins-bot: Verified diff --git a/docs/hooks.txt b/docs/hooks.txt index 96a72df..7bd725a 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1847,7 +1847,7 @@ get the label, and "$key-value" or "$key-value-text"/"$key-value-html" to format the value. $key: Key for the limit report item (string) -$value: Value of the limit report item +&$value: Value of the limit report item &$report: String onto which to append the data $isHTML: If true, $report is an HTML table with two columns; if false, it's text intended for display in a monospaced font. @@ -1855,7 +1855,8 @@ 'ParserLimitReportPrepare': Called at the end of Parser:parse() when the parser will include comments about size of the text parsed. Hooks should use -$output->setLimitReportData() to populate data. +$output->setLimitReportData() to populate data. Functions for this hook should +not use $wgLang; do that in ParserLimitReportFormat instead. $parser: Parser object $output: ParserOutput object diff --git a/includes/EditPage.php b/includes/EditPage.php index 530e267..68691c5 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2937,7 +2937,7 @@ foreach ( $output->getLimitReportData() as $key => $value ) { if ( wfRunHooks( 'ParserLimitReportFormat', - array( $key, $value, &$limitReport, true, true ) + array( $key, &$value, &$limitReport, true, true ) ) ) { $keyMsg = wfMessage( $key ); $valueMsg = wfMessage( array( "$key-value-html", "$key-value" ) ); diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 848a1a0..2df3160 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -541,7 +541,7 @@ } foreach ( $this->mOutput->getLimitReportData() as $key => $value ) { if ( wfRunHooks( 'ParserLimitReportFormat', - array( $key, $value, &$limitReport, false, false ) + array( $key, &$value, &$limitReport, false, false ) ) ) { $keyMsg = wfMessage( $key )->inLanguage( 'en' )->useDatabase( false ); $valueMsg = wfMessage( array( "$key-value-text", "$key-value" ) ) -- To view, visit https://gerrit.wikimedia.org/r/80412 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7799616a602d90e1b8d3f0ece35811ca387bade7 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie Gerrit-Reviewer: Daniel Friesen Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Work around HHVM bug with stdin/stdout in proc_open() - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Work around HHVM bug with stdin/stdout in proc_open() .. Work around HHVM bug with stdin/stdout in proc_open() Bug: 56597 Change-Id: I06122d82fce4567be110ca25010c244dd9269c57 --- M includes/GlobalFunctions.php 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Tim Starling: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 93a2b02..1eb5c3e 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2855,6 +2855,15 @@ if ( $useLogPipe ) { $desc[3] = array( 'pipe', 'w' ); } + + # TODO/FIXME: This is a bad hack to workaround an HHVM bug that prevents + # proc_open() from opening stdin/stdout, so use /dev/null *for now* + # See bug 56597 / https://github.com/facebook/hhvm/issues/1247 for more info + if ( wfIsHHVM() ) { + $desc[0] = array( 'file', '/dev/null', 'r' ); + $desc[2] = array( 'file', '/dev/null', 'w' ); + } + $pipes = null; $proc = proc_open( $cmd, $desc, $pipes ); if ( !$proc ) { -- To view, visit https://gerrit.wikimedia.org/r/94065 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I06122d82fce4567be110ca25010c244dd9269c57 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Chad Gerrit-Reviewer: Chad Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] filebackend: improved "adviseStat" performance - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: filebackend: improved "adviseStat" performance .. filebackend: improved "adviseStat" performance * Use the normal page size instead of limiting it way down to the cache size. Track the stat information in the pages and load into into the stat cache as entries are accessed. This should also be less prone to evictions causing HEAD requests (or memcached hits). * Also bumped CACHE_CHEAP_SIZE up to 500. * Fix a few doc bits Change-Id: I8d44a072e7bcc56c83d8d9c8c9ac9864530bccf8 --- M includes/filebackend/FileBackendStore.php M includes/filebackend/SwiftFileBackend.php 2 files changed, 54 insertions(+), 45 deletions(-) Approvals: Tim Starling: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php index 29089c9..10c8dc3 100644 --- a/includes/filebackend/FileBackendStore.php +++ b/includes/filebackend/FileBackendStore.php @@ -52,7 +52,7 @@ protected $maxFileSize = 4294967296; // integer bytes (4GiB) const CACHE_TTL = 10; // integer; TTL in seconds for process cache entries - const CACHE_CHEAP_SIZE = 300; // integer; max entries in "cheap cache" + const CACHE_CHEAP_SIZE = 500; // integer; max entries in "cheap cache" const CACHE_EXPENSIVE_SIZE = 5; // integer; max entries in "expensive cache" /** diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index fc598db..ec2e2c0 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -931,10 +931,10 @@ * * @param string $fullCont Resolved container name * @param string $dir Resolved storage directory with no trailing slash -* @param string|null $after Storage path of file to list items after +* @param string|null $after Resolved container relative path to list items after * @param integer $limit Max number of items to list * @param array $params Parameters for getDirectoryList() -* @return Array List of resolved paths of directories directly under $dir +* @return Array List of container relative resolved paths of directories directly under $dir * @throws FileBackendError */ public function getDirListPageInternal( $fullCont, $dir, &$after, $limit, array $params ) { @@ -1006,14 +1006,14 @@ * * @param string $fullCont Resolved container name * @param string $dir Resolved storage directory with no trailing slash -* @param string|null $after Storage path of file to list items after +* @param string|null $after Resolved container relative path of file to list items after * @param integer $limit Max number of items to list * @param array $params Parameters for getDirectoryList() -* @return Array List of resolved paths of files under $dir +* @return Array List of resolved container relative paths of files under $dir * @throws FileBackendError */ public function getFileListPageInternal( $fullCont, $dir, &$after, $limit, array $params ) { - $files = array(); + $files = array(); // list of (path, stat array or null) entries if ( $after === INF ) { return $files; // nothing more } @@ -1022,38 +1022,33 @@ try { $container = $this->getContainer( $fullCont ); $prefix = ( $dir == '' ) ? null : "{$dir}/"; + $objects = array(); // list of unfiltered names or CF_Object items // Non-recursive: only list files right under $dir - if ( !empty( $params['topOnly'] ) ) { // files and dirs + if ( !empty( $params['topOnly'] ) ) { if ( !empty( $params['adviseStat'] ) ) { - $limit = min( $limit, self::CACHE_CHEAP_SIZE ); // Note: get_objects() does not include directories - $objects = $this->loadObjectListing( $params, $dir, - $container->get_objects( $limit, $after, $prefix, null, '/' ) ); - $files = $objects; + $objects = $container->get_objects( $limit, $after, $prefix, null, '/' ); } else { + // Note: list_objects() includes directories here $objects = $container->list_objects( $limit, $after, $prefix, null, '/' ); - foreach ( $objects as $objec
[MediaWiki-commits] [Gerrit] nostalgiawiki gets Cirrus - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: nostalgiawiki gets Cirrus .. nostalgiawiki gets Cirrus Change-Id: I70534e64e174a036ddbff753e2f0df6b1c224bd6 --- M cirrus.dblist 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/cirrus.dblist b/cirrus.dblist index 775effa..6bdad35 100644 --- a/cirrus.dblist +++ b/cirrus.dblist @@ -78,6 +78,7 @@ ndswikiquote ngwiki nlwikinews +nostalgiawiki nzwikimedia pa_uswikimedia piwiktionary -- To view, visit https://gerrit.wikimedia.org/r/94316 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I70534e64e174a036ddbff753e2f0df6b1c224bd6 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad Gerrit-Reviewer: Chad Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] nostalgiawiki gets Cirrus - change (operations/mediawiki-config)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/94316 Change subject: nostalgiawiki gets Cirrus .. nostalgiawiki gets Cirrus Change-Id: I70534e64e174a036ddbff753e2f0df6b1c224bd6 --- M cirrus.dblist 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/16/94316/1 diff --git a/cirrus.dblist b/cirrus.dblist index 775effa..6bdad35 100644 --- a/cirrus.dblist +++ b/cirrus.dblist @@ -78,6 +78,7 @@ ndswikiquote ngwiki nlwikinews +nostalgiawiki nzwikimedia pa_uswikimedia piwiktionary -- To view, visit https://gerrit.wikimedia.org/r/94316 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I70534e64e174a036ddbff753e2f0df6b1c224bd6 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set up this.url for ParsoidCacheRequest too - change (mediawiki...Parsoid)
GWicke has uploaded a new change for review. https://gerrit.wikimedia.org/r/94315 Change subject: Set up this.url for ParsoidCacheRequest too .. Set up this.url for ParsoidCacheRequest too This is used to report cache misses, which is currently less than informative by always returning 'undefined'. Change-Id: Ibfef3e332009858987f35029c56203fdeecb7e0d --- M js/lib/mediawiki.ApiRequest.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/15/94315/1 diff --git a/js/lib/mediawiki.ApiRequest.js b/js/lib/mediawiki.ApiRequest.js index 8ac266b..c013211 100644 --- a/js/lib/mediawiki.ApiRequest.js +++ b/js/lib/mediawiki.ApiRequest.js @@ -547,6 +547,7 @@ var url = env.conf.parsoid.parsoidCacheURI + env.conf.wiki.iwp + '/' + encodeURIComponent(title.replace(/ /g, '_')) + '?' + qs.stringify( apiargs ); + this.url = url; //console.warn('Cache request:', url); -- To view, visit https://gerrit.wikimedia.org/r/94315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibfef3e332009858987f35029c56203fdeecb7e0d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: GWicke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (Bug 56663) Add PageAnnotationImportSystemTest - change (mediawiki...SemanticMediaWiki)
jenkins-bot has submitted this change and it was merged. Change subject: (Bug 56663) Add PageAnnotationImportSystemTest .. (Bug 56663) Add PageAnnotationImportSystemTest Load a XML file to simulate a Special:Import in order to verify necessary components are integrated and working Foo-1-19-7.xml contains an export from MW 1.19.7 Change-Id: Ie790be6879b818fda0992a97175d8b955d85e546 --- M SemanticMediaWiki.hooks.php M tests/phpunit/README.md R tests/phpunit/integration/FunctionHookDBIntegrationTest.php R tests/phpunit/integration/ParserFunctionIntegrationTest.php R tests/phpunit/system/ResourcesTest.php R tests/phpunit/system/SplAutoloadRegisterTest.php A tests/phpunit/system/import/Foo-1-19-7.xml A tests/phpunit/system/import/PageAnnotationImportSystemTest.php 8 files changed, 297 insertions(+), 1 deletion(-) Approvals: Mwjames: Looks good to me, approved jenkins-bot: Verified diff --git a/SemanticMediaWiki.hooks.php b/SemanticMediaWiki.hooks.php index 768e231..0860243 100644 --- a/SemanticMediaWiki.hooks.php +++ b/SemanticMediaWiki.hooks.php @@ -271,7 +271,7 @@ * @return boolean */ public static function registerUnitTests( array &$files ) { - $directoryIterator = new RecursiveDirectoryIterator( __DIR__ . '/tests/phpunit/includes/' ); + $directoryIterator = new RecursiveDirectoryIterator( __DIR__ . '/tests/phpunit/' ); /** * @var SplFileInfo $fileInfo diff --git a/tests/phpunit/README.md b/tests/phpunit/README.md index 26d47f0..217da08 100644 --- a/tests/phpunit/README.md +++ b/tests/phpunit/README.md @@ -1,5 +1,16 @@ [PHPUnit][phpunit] provides the necessary environment to execute the in the subsequent directories provided unit tests together with the following base elements. Information about how to work with PHPunit can be found at [smw.org][smw] and [mediawiki.org][mw]. +### TestTypes + + Unit test +Testing technical specifications of a unit, module, or class. + + Integration test +An approach where multiple components are combined together to verify the interplay between those modules. + + System test +The system (and its individual modules) is treated as "black-box" in order to observe its behaviour as a whole rather than its units. + ### TestCases SemanticMediaWikiTestCase SemanticMediaWikiTestCase derives directly from PHPUnit_Framework_TestCase and adds some convenient functions and a assertSemanticData() method. diff --git a/tests/phpunit/includes/hooks/FunctionHookDBIntegrationTest.php b/tests/phpunit/integration/FunctionHookDBIntegrationTest.php similarity index 100% rename from tests/phpunit/includes/hooks/FunctionHookDBIntegrationTest.php rename to tests/phpunit/integration/FunctionHookDBIntegrationTest.php diff --git a/tests/phpunit/includes/parserhooks/ParserFunctionIntegrationTest.php b/tests/phpunit/integration/ParserFunctionIntegrationTest.php similarity index 100% rename from tests/phpunit/includes/parserhooks/ParserFunctionIntegrationTest.php rename to tests/phpunit/integration/ParserFunctionIntegrationTest.php diff --git a/tests/phpunit/includes/resources/ResourcesTest.php b/tests/phpunit/system/ResourcesTest.php similarity index 100% rename from tests/phpunit/includes/resources/ResourcesTest.php rename to tests/phpunit/system/ResourcesTest.php diff --git a/tests/phpunit/includes/SplAutoloadRegisterTest.php b/tests/phpunit/system/SplAutoloadRegisterTest.php similarity index 100% rename from tests/phpunit/includes/SplAutoloadRegisterTest.php rename to tests/phpunit/system/SplAutoloadRegisterTest.php diff --git a/tests/phpunit/system/import/Foo-1-19-7.xml b/tests/phpunit/system/import/Foo-1-19-7.xml new file mode 100644 index 000..9e9ccf6 --- /dev/null +++ b/tests/phpunit/system/import/Foo-1-19-7.xml @@ -0,0 +1,112 @@ +http://www.mediawiki.org/xml/export-0.6/"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.6/ http://www.mediawiki.org/xml/export-0.6.xsd"; version="0.6" xml:lang="en-gb"> + +MW-19 +http://localhost:8080/mw-19/index.php/Main_Page +MediaWiki 1.19.7 +first-letter + + Media + Special + + Talk + User + User talk + MW-19 + MW-19 talk + File + File talk + MediaWiki + MediaWiki talk + Template + Template talk + Help + Help talk + Category + Category talk + Property + Property talk + Concept + Concept talk + Foo + Foo talk + + + +Foo-1-19-7 +0 +158 + kyhp4t0b6nu2rvzftnzcxnbrxxwfa9d + + 399 + 2013-11-07T23:09:16Z + +127.0.0.1 + + [[Quux::garply]], {{#subobject:|Qeey=bam}}, {{#show: Foo-1-19-7|?Foo}}, {{#ask: [[Modification date::+]]|?Modification date}} + +{{FooTemplate|Foo=bar}}, {{FooSubobject|Qeey=bam
[MediaWiki-commits] [Gerrit] Clean up the release notes and reorder them a bit. - change (mediawiki/core)
MarkAHershberger has uploaded a new change for review. https://gerrit.wikimedia.org/r/94314 Change subject: Clean up the release notes and reorder them a bit. .. Clean up the release notes and reorder them a bit. Change-Id: Ib2c0af9a23cd7c1441a5b2bf0568b1b3762e7d1e --- M RELEASE-NOTES-1.22 1 file changed, 119 insertions(+), 117 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/14/94314/1 diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index f87267d..9023721 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -8,65 +8,9 @@ MediaWiki 1.22 is an alpha-quality branch and is not recommended for use in production. -=== Configuration changes in 1.22 === -* $wgRedirectScript was removed. It was unused. -* Removed $wgLocalMessageCacheSerialized, it is now always true. -* $wgVectorUseIconWatch is now enabled by default. -* $wgCascadingRestrictionLevels was added. -* ftps, ssh, sftp, xmpp, sip, sips, tel, sms, bitcoin, magnet, urn, and geo - have been whitelisted inside of $wgUrlProtocols. -* $wgDocType and $wgDTD have been removed and are no longer used for the DOCTYPE. -* $wgHtml5 is no longer used by core. Setting it to false will no longer disable HTML5. - It is still set to true for extension compatibility but doing so in extensions is deprecated. -* $wgXhtmlDefaultNamespace is no longer used by core. Setting it will no longer change the - xmlns used by MediaWiki. Reliance on this variable by extensions is deprecated. -* $wgHandheldStyle was removed. -* $wgHandheldForIPhone was removed. -* $wgJsMimeType is no longer used by core. Most usage has been removed since - HTML output is now exclusively HTML5. -* $wgDBOracleDRCP added. True enables persistent connection with DRCP on Oracle. -* $wgLogAutopatrol added to allow disabling logging of autopatrol edits in the logging table. - default for $wgLogAutopatrol is true. -* The 'edit' right no longer allows for editing a user's own CSS and JS. -* New rights 'editmyusercss', 'editmyuserjs', 'viewmywatchlist', - 'editmywatchlist', 'viewmyprivateinfo', 'editmyprivateinfo', and - 'editmyoptions' restrict actions that were formerly allowed by default. They - have been added to the default for $wgGroupPermissions['*']. -* The 'editprotected' right no longer allows bypassing of all page protection - restrictions. Any group using it for this purpose will now need to have all - the individual rights listed in $wgRestrictionTypes for the same effect. -* The 'protect' and 'autoconfirmed' rights are no longer used for the default - page protection levels. The rights 'editprotected' and 'editsemiprotected' - are now used for this purpose instead. -* (bug 40866) wgOldChangeTagsIndex removed. -* $wgNoFollowDomainExceptions now only matches entire domains. For example, - an entry for 'bar.com' will still match 'foo.bar.com' but not 'foobar.com'. -* $wgCopyUploadTimeout and $wgCopyUploadAsyncTimeout added to change the timeout times for - fetching the file during upload by url. -* New key added to $wgGalleryOptions - $wgGalleryOptions['mode'] to set - default gallery mode. -* New hook 'GalleryGetModes' to allow extensions to make new gallery modes. -* The checkbox for staying in HTTPS displayed on the login form when $wgSecureLogin is - enabled has been removed. Instead, whether the user stays in HTTPS will be determined - based on the user's preferences, and whether they came from HTTPS or not. -* $wgRC2UDPAddress, $wgRC2UDPInterwikiPrefix, $wgRC2UDPOmitBots, $wgRC2UDPPort, - and $wgRC2UDPPrefix configuration options have been deprecated in favor of a - $wgRCFeeds configuration array. $wgRCFeeds makes both the format and - destination of recent change notifications customizable, and allows for - multiple destinations to be specified. -* (bug 53862) portal-url, currentevents-url and helppage have been removed from the - default Sidebar. -* The 'vector-simplesearch' preference is now enabled by default. Previously - it was only enabled if the Vector extension was installed. -* The precise format of metric datagrams produced by the UDP profiler and stats counter - may now be specified as $wgUDPProfilerFormatString and $wgStatsFormatString, - respectively. -* (bug 54597) $wgBlockOpenProxies, $wgProxyPorts, $wgProxyScriptPath, and - $wgProxyMemcExpiry have been removed, along with the open proxy scanner - script they were added for. -* Default value of $wgMaxShellMemory has been tripled (it's now 300 MB). - === New features in 1.22 === +* You can now install extensions using Composer. + See https://www.mediawiki.org/wiki/Composer * (bug 44525) mediawiki.jqueryMsg can now parse (whitelisted) HTML elements and attributes. * (bug 33454) Language::sprintfDate now has a timezone parameter, and supports the "eIOPTZ" formatting characters. @@ -99,13 +43,6 @@ another portlet will work as expected. * (bug 6747) {{ROOTP
[MediaWiki-commits] [Gerrit] Only set cookie header on API requests when one was passed in - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Only set cookie header on API requests when one was passed in .. Only set cookie header on API requests when one was passed in We don't send Vary: Cookie headers ourselves, but it seems to be well possible that our Varnish config (by using various MW defaults) varies on cookies by default. That would explain the cache misses on selser that we are seeing in production. Change-Id: Id28070fce871c51b80a9c443cf4bdd790e903449 --- M js/lib/mediawiki.ApiRequest.js 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, but someone else must approve GWicke: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/mediawiki.ApiRequest.js b/js/lib/mediawiki.ApiRequest.js index 8ac266b..676e0c5 100644 --- a/js/lib/mediawiki.ApiRequest.js +++ b/js/lib/mediawiki.ApiRequest.js @@ -560,12 +560,16 @@ timeout: 60 * 1000, // 60 seconds: less than 100s VE timeout so we still finish headers: { 'User-Agent': userAgent, - 'Cookie': env.cookie, 'Connection': 'close', 'x-parsoid-request': 'cache' } }; + if (env.cookie) { + // Forward the cookie if set + this.requestOptions.headers.Cookie = env.cookie; + } + if (!options.evenIfNotCached) { // Request a reply only from cache. this.requestOptions.headers['Cache-control'] = 'only-if-cached'; -- To view, visit https://gerrit.wikimedia.org/r/94308 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id28070fce871c51b80a9c443cf4bdd790e903449 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: GWicke Gerrit-Reviewer: Arlolra Gerrit-Reviewer: Catrope Gerrit-Reviewer: GWicke Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] FormatJson: Remove whitespace from empty arrays and objects - change (mediawiki/core)
MarkAHershberger has submitted this change and it was merged. Change subject: FormatJson: Remove whitespace from empty arrays and objects .. FormatJson: Remove whitespace from empty arrays and objects As noted in c370ad21d7f8, the pretty output can differ between Zend PHP and HHVM. This change adds some post-processing to make the output consistent across implementations and with JavaScript JSON.stringify() and Python json.dumps(); all whitespace between the opening and closing brackets/braces is removed. Change-Id: I490e0ff1fac3d6c3fb44ab127e432872c0301a9d (cherry picked from commit b6a5bb484d90c6705bd1b010efcc2c1c18be1f34) --- M includes/json/FormatJson.php M tests/phpunit/includes/json/FormatJsonTest.php 2 files changed, 27 insertions(+), 7 deletions(-) Approvals: Krinkle: Looks good to me, but someone else must approve MarkAHershberger: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php index bc2fff1..d611651 100644 --- a/includes/json/FormatJson.php +++ b/includes/json/FormatJson.php @@ -56,6 +56,17 @@ const ALL_OK = 3; /** +* Regex that matches whitespace inside empty arrays and objects. +* +* This doesn't affect regular strings inside the JSON because those can't +* have a real line break (\n) in them, at this point they are already escaped +* as the string "\n" which this doesn't match. +* +* @private +*/ + const WS_CLEANUP_REGEX = '/(?<=[\[{])\n\s*+(?=[\]}])/'; + + /** * Characters problematic in JavaScript. * * @note These are listed in ECMA-262 (5.1 Ed.), §7.3 Line Terminators along with U+000A (LF) @@ -129,6 +140,12 @@ $json = json_encode( $value, $options ); if ( $json === false ) { return false; + } + + if ( $pretty ) { + // Remove whitespace inside empty arrays/objects; different JSON encoders + // vary on this, and we want our output to be consistent across implementations. + $json = preg_replace( self::WS_CLEANUP_REGEX, '', $json ); } if ( $escaping & self::UTF8_OK ) { $json = str_replace( self::$badChars, self::$badCharsEscaped, $json ); @@ -213,6 +230,7 @@ $buf .= substr( $json, $i, $skip ); } } - return str_replace( "\x01", '\"', preg_replace( '/ +$/m', '', $buf ) ); + $buf = preg_replace( self::WS_CLEANUP_REGEX, '', $buf ); + return str_replace( "\x01", '\"', $buf ); } } diff --git a/tests/phpunit/includes/json/FormatJsonTest.php b/tests/phpunit/includes/json/FormatJsonTest.php index eb024ab..149be05 100644 --- a/tests/phpunit/includes/json/FormatJsonTest.php +++ b/tests/phpunit/includes/json/FormatJsonTest.php @@ -12,28 +12,30 @@ 123, 456, ), + // Nested json works without problems '"7":["8",{"9":"10"}]', + // Whitespace clean up doesn't touch strings that look alike + "{\n\t\"emptyObject\": {\n\t},\n\t\"emptyArray\": [ ]\n}", ), ); // 4 space indent, no trailing whitespace, no trailing linefeed $json = '{ -"emptyObject": { -}, -"emptyArray": [ -], +"emptyObject": {}, +"emptyArray": [], "string": "foobar", "filledArray": [ [ 123, 456 ], -"\"7\":[\"8\",{\"9\":\"10\"}]" +"\"7\":[\"8\",{\"9\":\"10\"}]", +"{\n\t\"emptyObject\": {\n\t},\n\t\"emptyArray\": [ ]\n}" ] }'; $json = str_replace( "\r", '', $json ); // Windows compat - $this->assertSame( $json, str_replace("\n\n", "\n", FormatJson::encode( $obj, true ) )); + $this->assertSame( $json, FormatJson::encode( $obj, true ) ); } public static function provideEncodeDefault() { -- To view, visit https://gerrit.wikimedia.org/r/92489 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I490e0ff1fac3d6c3fb44ab127e432872c0301a9d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_22 Gerrit-Owner: PleaseStand Gerrit-Reviewer: Krinkle Gerrit-Reviewer: MarkAHershberger Gerrit-Reviewer: PleaseStand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listin
[MediaWiki-commits] [Gerrit] redact exception traces and abstract getTrace - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: redact exception traces and abstract getTrace .. redact exception traces and abstract getTrace * Partially reverts I0a9e92448 (rationale: http://www.gossamer-threads.com/lists/wiki/wikitech/401558) - wfDebugLog()'d exceptions are always unredacted - Other backtraces are redacted by replacing all argument values with class / type names. * Adds a pair of static methods to MWExceptionHandler: - MWExceptionHandler::getRedactedTrace equivalent to Exception::getTrace, but replaces each argument value in the trace with its class or type name. - MWExceptionHandler::getRedactedTraceAsString equivalent to Exception::getTraceAsString, but with argument values likewise redacted. * The rename of 'formatRedactedTrace' to 'getRedactedTraceAsString' is justified on two grounds: - 'formatRedactedTrace' didn't actually take a trace object (it took an exception). - 'getRedactedTraceAsString' maintains the symmetry with Exception::getTraceAsString. Conflicts: includes/Exception.php Change-Id: I3d570a6385f96a606e1af53c50faa03b9ebacd38 --- M RELEASE-NOTES-1.22 M includes/DefaultSettings.php M includes/Exception.php A tests/phpunit/includes/MWExceptionHandlerTest.php 4 files changed, 131 insertions(+), 88 deletions(-) Approvals: MarkAHershberger: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index 1ee9ecb..37e0271 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -227,8 +227,6 @@ * Add deferrable update support for callback/closure. * Add TitleMove hook before page renames. * Revision deletion backend code is moved out of SpecialRevisiondelete -* Add a variable (wgRedactedFunctionArguments) to redact the values sent as certain function - parameters from exception stack traces. * Added {{REVISIONSIZE}} variable to get the current size of a revision. * Add support for the LESS stylesheet language to ResourceLoader. LESS is a stylesheet language that compiles into CSS. ResourceLoader file modules may diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 01e515e..19cc84c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4925,37 +4925,6 @@ $wgShowExceptionDetails = false; /** - * Array of functions which need parameters redacted from stack traces shown to - * clients and logged. Keys are in the format '[class::]function', and the - * values should be either an integer or an array of integers. These are the - * indexes of the parameters which need to be kept secret. - * @since 1.22 - */ -$wgRedactedFunctionArguments = array( - 'AuthPlugin::setPassword' => 1, - 'AuthPlugin::authenticate' => 1, - 'AuthPlugin::addUser' => 1, - - 'DatabaseBase::__construct' => 2, - 'DatabaseBase::open' => 2, - - 'SpecialChangeEmail::attemptChange' => 1, - 'SpecialChangePassword::attemptReset' => 0, - - 'User::setPassword' => 0, - 'User::setInternalPassword' => 0, - 'User::checkPassword' => 0, - 'User::setNewpassword' => 0, - 'User::comparePasswords' => array( 0, 1 ), - 'User::checkTemporaryPassword' => 0, - 'User::setToken' => 0, - 'User::crypt' => 0, - 'User::oldCrypt' => 0, - 'User::getPasswordValidity' => 0, - 'User::isValidPassword' => 0, -); - -/** * If true, show a backtrace for database errors */ $wgShowDBErrorBacktrace = false; diff --git a/includes/Exception.php b/includes/Exception.php index 72d4b97..6f511b7 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -136,7 +136,7 @@ if ( $wgShowExceptionDetails ) { return '' . nl2br( htmlspecialchars( $this->getMessage() ) ) . - 'Backtrace:' . nl2br( htmlspecialchars( MWExceptionHandler::formatRedactedTrace( $this ) ) ) . + 'Backtrace:' . nl2br( htmlspecialchars( MWExceptionHandler::getRedactedTraceAsString( $this ) ) ) . "\n"; } else { return "" . @@ -161,7 +161,7 @@ if ( $wgShowExceptionDetails ) { return $this->getMessage() . - "\nBacktrace:\n" . MWExceptionHandler::formatRedactedTrace( $this ) . "\n"; + "\nBacktrace:\n" . MWExceptionHandler::getRedactedTraceAsString( $this ) . "\n"; } else { return "Set \$wgShowExceptionDetails = true; " . "in LocalSettings.php to show detailed debugging information.\n"; @@ -611,8 +611,10 @@ $message = "MediaWiki internal error.\n\n"; if ( $wgShowExceptionDetails ) { -
[MediaWiki-commits] [Gerrit] MWException: Cleanup exception message output - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: MWException: Cleanup exception message output .. MWException: Cleanup exception message output Change I0a9e9244 lost the message when handling a non-MWException exception, and for a long time MWException's getHTML and getText have been missing the actual file and line where the exception was thrown. We may as well use MWExceptionHandler::getLogMessage to fix all of these, resulting in a more standardized exception output. Change-Id: I8a9b4831c9c586bafe0a54516ff779cdfb008984 --- M includes/Exception.php 1 file changed, 3 insertions(+), 4 deletions(-) Approvals: MarkAHershberger: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Exception.php b/includes/Exception.php index 6f511b7..5bad88c 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -135,7 +135,7 @@ global $wgShowExceptionDetails; if ( $wgShowExceptionDetails ) { - return '' . nl2br( htmlspecialchars( $this->getMessage() ) ) . + return '' . nl2br( htmlspecialchars( MWExceptionHandler::getLogMessage( $this ) ) ) . 'Backtrace:' . nl2br( htmlspecialchars( MWExceptionHandler::getRedactedTraceAsString( $this ) ) ) . "\n"; } else { @@ -160,7 +160,7 @@ global $wgShowExceptionDetails; if ( $wgShowExceptionDetails ) { - return $this->getMessage() . + return MWExceptionHandler::getLogMessage( $this ) . "\nBacktrace:\n" . MWExceptionHandler::getRedactedTraceAsString( $this ) . "\n"; } else { return "Set \$wgShowExceptionDetails = true; " . @@ -633,8 +633,7 @@ $message = "Unexpected non-MediaWiki exception encountered, of type \"" . get_class( $e ) . "\""; if ( $wgShowExceptionDetails ) { - $message .= "\nexception '" . get_class( $e ) . "' in " . - $e->getFile() . ":" . $e->getLine() . "\nStack trace:\n" . + $message .= "\n" . MWExceptionHandler::getLogMessage( $e ) . "\nBacktrace:\n" . self::getRedactedTraceAsString( $e ) . "\n"; } -- To view, visit https://gerrit.wikimedia.org/r/93704 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8a9b4831c9c586bafe0a54516ff779cdfb008984 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_22 Gerrit-Owner: Hashar Gerrit-Reviewer: Anomie Gerrit-Reviewer: MarkAHershberger Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't enable RC to UDP feeds for labs - change (operations/mediawiki-config)
Chad has submitted this change and it was merged. Change subject: Don't enable RC to UDP feeds for labs .. Don't enable RC to UDP feeds for labs May be useful one day, but it's using production config right now. This was accidental as a result of Ifc2d2969. Bug: 56758 Change-Id: I62b9c29b0f93f0031937ea9cb1cf6f2fcc922680 --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 5e51168..3e1ba82 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -310,6 +310,10 @@ 'wmgBug54847' => array( 'default' => false, ), + + 'wmgUseRC2UDP' => array( + 'default' => false, + ), ); } # wmflLabsSettings() -- To view, visit https://gerrit.wikimedia.org/r/94313 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I62b9c29b0f93f0031937ea9cb1cf6f2fcc922680 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad Gerrit-Reviewer: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] UploadStash::removeFileNoAuth shouldn't need auth - change (mediawiki/core)
MarkAHershberger has submitted this change and it was merged. Change subject: UploadStash::removeFileNoAuth shouldn't need auth .. UploadStash::removeFileNoAuth shouldn't need auth UploadStash::getFile has a "noAuth" parameter, which should be set true when this is called from UploadStash::removeFileNoAuth. Callers should already be doing their own auth checking, or calling UploadStash::removeFile. Bug: 56298 Change-Id: Ic70c4e2bc6df5cb9b139a3631766f8ff0ec4ef02 (cherry picked from commit d4b250ad380b024620b724c9f9485e79ea712798) --- M includes/upload/UploadStash.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: MarkAHershberger: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index ebeb9c1..7db6c64 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -358,7 +358,7 @@ wfDebug( __METHOD__ . " clearing row $key\n" ); // Ensure we have the UploadStashFile loaded for this key - $this->getFile( $key ); + $this->getFile( $key, true ); $dbw = $this->repo->getMasterDb(); -- To view, visit https://gerrit.wikimedia.org/r/92545 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic70c4e2bc6df5cb9b139a3631766f8ff0ec4ef02 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_22 Gerrit-Owner: Reedy Gerrit-Reviewer: Anomie Gerrit-Reviewer: MarkAHershberger Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't enable RC to UDP feeds for labs - change (operations/mediawiki-config)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/94313 Change subject: Don't enable RC to UDP feeds for labs .. Don't enable RC to UDP feeds for labs May be useful one day, but it's using production config right now. Change-Id: I62b9c29b0f93f0031937ea9cb1cf6f2fcc922680 --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/13/94313/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 5e51168..3e1ba82 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -310,6 +310,10 @@ 'wmgBug54847' => array( 'default' => false, ), + + 'wmgUseRC2UDP' => array( + 'default' => false, + ), ); } # wmflLabsSettings() -- To view, visit https://gerrit.wikimedia.org/r/94313 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I62b9c29b0f93f0031937ea9cb1cf6f2fcc922680 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] MySQL method to find out view + fix fatal in tests - change (mediawiki/core)
MarkAHershberger has submitted this change and it was merged. Change subject: MySQL method to find out view + fix fatal in tests .. MySQL method to find out view + fix fatal in tests We were missing a method to list out views defined in a database. This patch adds in MysqlBase::isView() and MysqlBse::listViews(). Since listViews() cache its result in DatabaseBase::$allViews, we also introduce a final DatabaseBase::clearViewsCache() to let us clear the per process cache. Finally, fixed fatal error when duplicating VIEWs in MySQL. Conflicts: RELEASE-NOTES-1.22 bug: 43571 Change-Id: I8650baa4b721fe69ea3e1d557dd76745c0c7754e (cherry picked from commit e9d53667f43230e84302d0a6653ea7e78a7841ce) --- M CREDITS M RELEASE-NOTES-1.22 M includes/db/Database.php M includes/db/DatabaseMysqlBase.php M tests/phpunit/MediaWikiTestCase.php M tests/phpunit/includes/db/DatabaseMysqlBaseTest.php 6 files changed, 184 insertions(+), 0 deletions(-) Approvals: MarkAHershberger: Looks good to me, approved jenkins-bot: Verified diff --git a/CREDITS b/CREDITS index 7927c3d..54aca71 100644 --- a/CREDITS +++ b/CREDITS @@ -22,6 +22,7 @@ * church of emacs * Daniel Friesen * Daniel Kinzler +* Daniel Renfro * Danny B. * David McCabe * Derk-Jan Hartman diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index 8aa2fb4..1eba236 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -260,6 +260,11 @@ * A hidden, empty input field was added to the edit form, and any edit that fills it in will be rejected. This prevents against the simplest form of spambots. Previously in the "SimpleAntiSpam" extension by Ryan Schmidt. +* populateRevisionLength.php maintenance script updated to also populate + archive.ar_len field. +* (bug 43571) DatabaseMySQLBase learned to list views, optionally filtered by a + prefix. Also fixed PHPUnit test suite when using a MySQL backend containing + views. === Bug fixes in 1.22 === * Disable Special:PasswordReset when $wgEnableEmail is false. Previously one diff --git a/includes/db/Database.php b/includes/db/Database.php index 42f8482..1064560 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -287,6 +287,12 @@ */ protected $fileHandle = null; + /** +* @since 1.22 +* @var Process cache of VIEWs names in the database +*/ + protected $allViews = null; + # -- # Accessors # -- @@ -3361,6 +3367,40 @@ } /** +* Reset the views process cache set by listViews() +* @since 1.22 +*/ + final public function clearViewsCache() { + $this->allViews = null; + } + + /** +* Lists all the VIEWs in the database +* +* For caching purposes the list of all views should be stored in +* $this->allViews. The process cache can be cleared with clearViewsCache() +* +* @param string $prefix Only show VIEWs with this prefix, eg. unit_test_ +* @param string $fnameName of calling function +* @throws MWException +* @since 1.22 +*/ + public function listViews( $prefix = null, $fname = __METHOD__ ) { + throw new MWException( 'DatabaseBase::listViews is not implemented in descendant class' ); + } + + /** +* Differentiates between a TABLE and a VIEW +* +* @param $name string: Name of the database-structure to test. +* @throws MWException +* @since 1.22 +*/ + public function isView( $name ) { + throw new MWException( 'DatabaseBase::isView is not implemented in descendant class' ); + } + + /** * Convert a timestamp in one of the formats accepted by wfTimestamp() * to the format used for inserting into timestamp fields in this DBMS. * diff --git a/includes/db/DatabaseMysqlBase.php b/includes/db/DatabaseMysqlBase.php index 49579b6..26c9d24 100644 --- a/includes/db/DatabaseMysqlBase.php +++ b/includes/db/DatabaseMysqlBase.php @@ -996,6 +996,55 @@ return $status; } + /** +* Lists VIEWs in the database +* +* @param string $prefix Only show VIEWs with this prefix, eg. +* unit_test_, or $wgDBprefix. Default: null, would return all views. +* @param string $fnameName of calling function +* @return array +* @since 1.22 +*/ + public function listViews( $prefix = null, $fname = __METHOD__ ) { + + if ( !isset( $this->allViews ) ) { + + // The name of the column containing the name of the VIEW + $propertyName = 'Tables_in_' . $this->mDBname; + + //
[MediaWiki-commits] [Gerrit] Add tags to wikitext detection regex - change (mediawiki...VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/94311 Change subject: Add tags to wikitext detection regex .. Add tags to wikitext detection regex Bug: 56755 Change-Id: Ib7279401601147420441e77e4796b94fe91ac956 --- M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/11/94311/1 diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index 1f95677..5f9f50a 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -729,7 +729,7 @@ } text = ve.ce.getDomText( node.$element[0] ); - if ( text.match( /\[\[|\{\{|''|https://gerrit.wikimedia.org/r/94311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7279401601147420441e77e4796b94fe91ac956 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make it possible to install extensions using Composer - change (mediawiki/core)
MarkAHershberger has uploaded a new change for review. https://gerrit.wikimedia.org/r/94310 Change subject: Make it possible to install extensions using Composer .. Make it possible to install extensions using Composer With this change it is possible for users to create a composer.json file in which they list the extensions they want to have installed and then install them via Composer. They can copy composer-example.json to get started. Before this change there was an actual composer.json file tracked by git, so people would get a change tracked by git if they modified it. Surprisingly this is all that is needed to get extension installation to work, for the extensions that already support it. Kudos to hashar and others that already did the other required work. With this change core no longer pretends to be a component that is installable via composer. This never worked, and core will need to be modified in several ways before this can work. In other words, no working functionality is lost, and quite a lot is gained. Example usage: * Copy composer-example.json to composer.json. * Run "composer require diff/diff 0.9" * Hit Special:Version and be happy Change-Id: Ib125bea00cd29a800c22f260e87dfe3327a0b618 (cherry picked from commit d6e69d774d613e3097d7b1640540b62ec89d2685) --- M RELEASE-NOTES-1.22 A composer-example.json D composer.json 3 files changed, 13 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/10/94310/1 diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index 1ee9ecb..f87267d 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -419,6 +419,8 @@ * (bug 46751) Made Buryat (Russia) (буряад) (bxr) fallback to Russian. === Other changes in 1.22 === +* You can now install extensions using Composer. + See https://www.mediawiki.org/wiki/Composer * BREAKING CHANGE: Implementation of MediaWiki's JS and JSON value encoding has changed: ** MediaWiki no longer supports PHP installations in which the native JSON diff --git a/composer-example.json b/composer-example.json new file mode 100644 index 000..6c4d37f --- /dev/null +++ b/composer-example.json @@ -0,0 +1,11 @@ +{ + "require": { + "php": ">=5.3.2" + }, + "suggest": { + "ext-fileinfo": "*", + "ext-mbstring": "*", + "ext-wikidiff2": "*", + "ext-apc": "*" + } +} diff --git a/composer.json b/composer.json deleted file mode 100644 index ded3365..000 --- a/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "mediawiki/core", - "description": "Free software wiki application developed by the Wikimedia Foundation and others", - "keywords": ["mediawiki", "wiki"], - "homepage": "https://www.mediawiki.org/";, - "authors": [ - { - "name": "MediaWiki Community", - "homepage": "https://www.mediawiki.org/wiki/Special:Version/Credits"; - } - ], - "license": "GPL-2.0", - "support": { - "issues": "https://bugzilla.wikimedia.org/";, - "irc": "irc://irc.freenode.net/mediawiki", - "wiki": "https://www.mediawiki.org/"; - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "*" - }, - "suggest": { - "ext-fileinfo": "*", - "ext-mbstring": "*", - "ext-wikidiff2": "*", - "ext-apc": "*" - } -} -- To view, visit https://gerrit.wikimedia.org/r/94310 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib125bea00cd29a800c22f260e87dfe3327a0b618 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_20 Gerrit-Owner: MarkAHershberger Gerrit-Reviewer: Jeroen De Dauw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add APISandbox Role - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Add APISandbox Role .. Add APISandbox Role Simply enables the APISandbox extension, does nothing else. Reading the huge wall of text generated by /w/api.php is for chumps. Change-Id: Ica747215f1c35908548735a303c193b397ab634e --- M puppet/manifests/roles.pp 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp index 6966c9e..d253dcc 100644 --- a/puppet/manifests/roles.pp +++ b/puppet/manifests/roles.pp @@ -648,3 +648,11 @@ }, } } + +# == Class: role::apisandbox +# This role simply sets up the ApiSandbox extension +class role::apisandbox { +include role::mediawiki + +@mediawiki::extension { 'ApiSandbox': } +} -- To view, visit https://gerrit.wikimedia.org/r/94306 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica747215f1c35908548735a303c193b397ab634e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Yuvipanda Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding an aggregation / pivoting script for squid logs - change (wikimedia...tools)
Mwalker has submitted this change and it was merged. Change subject: Adding an aggregation / pivoting script for squid logs .. Adding an aggregation / pivoting script for squid logs Change-Id: I06ef49629b427b220eb77bef08b5ad79f3d8672d --- A SquidRipper/aggByTime.py 1 file changed, 99 insertions(+), 0 deletions(-) Approvals: Mwalker: Looks good to me, approved diff --git a/SquidRipper/aggByTime.py b/SquidRipper/aggByTime.py new file mode 100644 index 000..af7e886 --- /dev/null +++ b/SquidRipper/aggByTime.py @@ -0,0 +1,99 @@ +#!/usr/bin/python + +from optparse import OptionParser +import sys +from dateutil.parser import parse as dateParse +from datetime import datetime + +def main(): +# === Extract options === +parser = OptionParser(usage="usage: %prog [options] ...") +parser.add_option( +'-p', '--pivot', dest='pivot', action='store_true', default=False, +help='store the data until the end of the stream and then pivot it into groupByCol groups (SIGNIFICANT MEMORY USAGE)' # noqa +) +parser.add_option('-s', dest='sep', default='|', help='groupByCol separator when pivoting') +parser.add_option('-m', '--multplier', dest='multiplier', default=100) +(options, args) = parser.parse_args() + +if len(args) < 3: +parser.print_usage() +exit() + +pivot = options.pivot +colNameSep = options.sep +multiplier = int(options.multiplier) +timeCol = int(args[0]) +interval = int(args[1]) +groupCols = [] +for i in range(2, len(args)): +groupCols.append(int(args[i])) + +# Data is a complex data structure; with the following layout: +# Timestamp (start of interval) +# -- {(col1 val, col2 val, col3 val...)} +# -- -- Count +data = {} + +# Similarly, if we're pivoting we'll keep track of unique columns through time +# (col1 val, col2 val, col3 val...) +uniqueCols = set() + +lineCount = 0 +for line in sys.stdin: +parts = line.strip().split(' ') + +# Find the agg time +ctime = int(dateParse(parts[timeCol]).strftime('%s')) # Yes, this is horribly inefficient; meh +ctime = (ctime / interval) * interval + +colVals = [] +for i in groupCols: +colVals.append(parts[i]) +colVals = tuple(colVals) + +if not ctime in data: +data[ctime] = {} +if not colVals in data[ctime]: +data[ctime][colVals] = 1 +else: +data[ctime][colVals] += 1 + +if not pivot: +lineCount = (lineCount + 1) % 1000 +if lineCount == 0: +# Flush the buffers if possible +for ptime in sorted(data.keys()): +if ptime + (2 * interval) < ctime: +for dataline in data[ptime]: +sys.stdout.write("%s\t%s\t%s\n" % ( + datetime.fromtimestamp(ptime).strftime('%y-%m-%dT%H:%M:%S'), +colNameSep.join(dataline), +data[ptime][dataline] * multiplier +)) +del data[ptime] +else: +uniqueCols.add(colVals) + +# And here we are at the end... +if pivot: +# Must create the BIG table now +outline = ['time'] +for cols in uniqueCols: +outline.append(colNameSep.join(cols)) +sys.stdout.write("\t".join(outline)) +sys.stdout.write("\n") + +for ptime in sorted(data.keys()): +outline = [datetime.fromtimestamp(ptime).strftime('%y-%m-%dT%H:%M:%S')] +for cols in uniqueCols: +if cols in data[ptime]: +outline.append(str(data[ptime][cols] * multiplier)) +else: +outline.append('0') +sys.stdout.write("\t".join(outline)) +sys.stdout.write("\n") + + +if __name__ == "__main__": +main() -- To view, visit https://gerrit.wikimedia.org/r/94309 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I06ef49629b427b220eb77bef08b5ad79f3d8672d Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/tools Gerrit-Branch: master Gerrit-Owner: Mwalker Gerrit-Reviewer: Mwalker Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding an aggregation / pivoting script for squid logs - change (wikimedia...tools)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/94309 Change subject: Adding an aggregation / pivoting script for squid logs .. Adding an aggregation / pivoting script for squid logs Change-Id: I06ef49629b427b220eb77bef08b5ad79f3d8672d --- A SquidRipper/aggByTime.py 1 file changed, 99 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools refs/changes/09/94309/1 diff --git a/SquidRipper/aggByTime.py b/SquidRipper/aggByTime.py new file mode 100644 index 000..af7e886 --- /dev/null +++ b/SquidRipper/aggByTime.py @@ -0,0 +1,99 @@ +#!/usr/bin/python + +from optparse import OptionParser +import sys +from dateutil.parser import parse as dateParse +from datetime import datetime + +def main(): +# === Extract options === +parser = OptionParser(usage="usage: %prog [options] ...") +parser.add_option( +'-p', '--pivot', dest='pivot', action='store_true', default=False, +help='store the data until the end of the stream and then pivot it into groupByCol groups (SIGNIFICANT MEMORY USAGE)' # noqa +) +parser.add_option('-s', dest='sep', default='|', help='groupByCol separator when pivoting') +parser.add_option('-m', '--multplier', dest='multiplier', default=100) +(options, args) = parser.parse_args() + +if len(args) < 3: +parser.print_usage() +exit() + +pivot = options.pivot +colNameSep = options.sep +multiplier = int(options.multiplier) +timeCol = int(args[0]) +interval = int(args[1]) +groupCols = [] +for i in range(2, len(args)): +groupCols.append(int(args[i])) + +# Data is a complex data structure; with the following layout: +# Timestamp (start of interval) +# -- {(col1 val, col2 val, col3 val...)} +# -- -- Count +data = {} + +# Similarly, if we're pivoting we'll keep track of unique columns through time +# (col1 val, col2 val, col3 val...) +uniqueCols = set() + +lineCount = 0 +for line in sys.stdin: +parts = line.strip().split(' ') + +# Find the agg time +ctime = int(dateParse(parts[timeCol]).strftime('%s')) # Yes, this is horribly inefficient; meh +ctime = (ctime / interval) * interval + +colVals = [] +for i in groupCols: +colVals.append(parts[i]) +colVals = tuple(colVals) + +if not ctime in data: +data[ctime] = {} +if not colVals in data[ctime]: +data[ctime][colVals] = 1 +else: +data[ctime][colVals] += 1 + +if not pivot: +lineCount = (lineCount + 1) % 1000 +if lineCount == 0: +# Flush the buffers if possible +for ptime in sorted(data.keys()): +if ptime + (2 * interval) < ctime: +for dataline in data[ptime]: +sys.stdout.write("%s\t%s\t%s\n" % ( + datetime.fromtimestamp(ptime).strftime('%y-%m-%dT%H:%M:%S'), +colNameSep.join(dataline), +data[ptime][dataline] * multiplier +)) +del data[ptime] +else: +uniqueCols.add(colVals) + +# And here we are at the end... +if pivot: +# Must create the BIG table now +outline = ['time'] +for cols in uniqueCols: +outline.append(colNameSep.join(cols)) +sys.stdout.write("\t".join(outline)) +sys.stdout.write("\n") + +for ptime in sorted(data.keys()): +outline = [datetime.fromtimestamp(ptime).strftime('%y-%m-%dT%H:%M:%S')] +for cols in uniqueCols: +if cols in data[ptime]: +outline.append(str(data[ptime][cols] * multiplier)) +else: +outline.append('0') +sys.stdout.write("\t".join(outline)) +sys.stdout.write("\n") + + +if __name__ == "__main__": +main() -- To view, visit https://gerrit.wikimedia.org/r/94309 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I06ef49629b427b220eb77bef08b5ad79f3d8672d Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/tools Gerrit-Branch: master Gerrit-Owner: Mwalker ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 56126) Inconsistent replying behavior - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 56126) Inconsistent replying behavior .. (bug 56126) Inconsistent replying behavior Added flow-creator on top of the reply text box; added container div (similar to topic reply form); fixed some of the JS & CSS code to now target the container Bug: 56126 Change-Id: Idb190445a664900bc20bbaf4e8fda9d9b5655a11 --- M modules/discussion/styles/post.less M modules/discussion/ui.js M templates/post.html.php 3 files changed, 38 insertions(+), 20 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/discussion/styles/post.less b/modules/discussion/styles/post.less index ce4379f..2e23517 100644 --- a/modules/discussion/styles/post.less +++ b/modules/discussion/styles/post.less @@ -211,8 +211,14 @@ background-repeat: no-repeat; } - .flow-reply-form { + .flow-post-reply-container { padding-left: 22px; + + .flow-creator { + font-weight: bold; + color: @post-title-color; + padding-bottom: 22px; + } } .flow-reply-form, diff --git a/modules/discussion/ui.js b/modules/discussion/ui.js index 65869a1..748d514 100644 --- a/modules/discussion/ui.js +++ b/modules/discussion/ui.js @@ -39,7 +39,7 @@ // Reply form is meant to be visible for non-JS users // when JS is available, hide until button is clicked - $container.find( '.flow-reply-form' ) + $container.find( '.flow-post-reply-container' ) .hide(); $container.find( '.flow-reply-link' ) @@ -47,7 +47,7 @@ .click( function ( e ) { e.preventDefault(); - var $form, + var $formContainer, $viewport = $('main, html'); /** @@ -57,30 +57,28 @@ */ function adjustReplyTarget( $btn, $targetForm ) { var replyTo = $btn.closest( '.flow-post-container' ).data( 'post-id' ); - var replyDefaultText = $btn.closest( '.flow-post' ) - .siblings( 'form.flow-reply-form' ) - .find( 'input[name="placeholder"]' ).val(); + var replyDefaultText = $btn.closest( '.flow-post-container' ) + .find( 'form.flow-reply-form input[name="placeholder"]' ).val(); $targetForm.find( 'input[name="topic[replyTo]"]' ).val( replyTo ); $targetForm.find( 'textarea' ).attr( 'placeholder', replyDefaultText ); } - if ( $(this).is( '.flow-post-container .flow-post-container *' ) ) { + if ( $( this ).is( '.flow-post-container .flow-post-container *' ) ) { // We're in a tangent - $form = $( this ).parents( '.flow-post-container' ).last().children( 'form.flow-reply-form' ); - adjustReplyTarget( $( this ), $form ); + $formContainer = $( this ).parents( '.flow-post-container' ).last().find( '.flow-post-reply-container:first' ); + adjustReplyTarget( $( this ), $formContainer ); $( this ).closest( '.flow-topic-container' ).find( '.flow-topic-reply-container' ).hide(); } else if ( $(this).is( '.flow-topic-comments .flow-reply-link' ) ) { // We're in the topic title - $form = $( this ).closest( '.flow-topic-container').find( '.flow-topic-reply-form'); + $formContainer = $( this ).closest( '.flow-topic-container' ); } else { // Not in a tangent - $form = $( this ).closest( '.flow-post' ).siblings( 'form.flow-reply-form' ); - adjustReplyTarget( $( this ), $form ); + $formContainer = $( this ).closest( '.flow-post-container' ).find( '.flow-post-reply-container:last' ); + adjustReplyTarget( $( this ), $formContainer ); + $( this ).closest( '.flow
[MediaWiki-commits] [Gerrit] Move autosetuprebase to where it will actually do something ... - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Move autosetuprebase to where it will actually do something useful .. Move autosetuprebase to where it will actually do something useful Change-Id: Ie608974b10217ffb716349562805acdac2705232 --- M multiversion/checkoutMediaWiki 1 file changed, 7 insertions(+), 6 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/multiversion/checkoutMediaWiki b/multiversion/checkoutMediaWiki index 3ec4d1b..ec679fe 100755 --- a/multiversion/checkoutMediaWiki +++ b/multiversion/checkoutMediaWiki @@ -53,6 +53,13 @@ print "Error changing directory\n"; exit( 1 ); } + + passthru( 'git config branch.autosetuprebase always', $ret ); + if ( $ret ) { + # Don't exit, this isn't a show-stopper + print "Error running setting autosetuprebase\n"; + } + passthru( 'git checkout ' . escapeshellarg( "wmf/$gitVersion" ), $ret ); if ( $ret ) { print "Error checking out branch\n"; @@ -62,12 +69,6 @@ if ( $ret ) { print "Error updating submodules\n"; exit( 1 ); - } - - passthru( 'git config branch.autosetuprebase always', $ret ); - if ( $ret ) { - # Don't exit, this isn't a show-stopper - print "Error running setting autosetuprebase\n"; } passthru( 'git config alias.up "pull --ff-only"', $ret ); -- To view, visit https://gerrit.wikimedia.org/r/94301 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie608974b10217ffb716349562805acdac2705232 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad 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] Update static-current symlinks to 1.23wmf3 - change (operations/mediawiki-config)
Ori.livneh has submitted this change and it was merged. Change subject: Update static-current symlinks to 1.23wmf3 .. Update static-current symlinks to 1.23wmf3 These should have been updated to 1.23wmf3 by updateBitsBranchPointers, but they were updated to 1.23wmf2 instead. Reason TBD; just fixing for now. Change-Id: I5a970d209cec773d00f99bc42cd42b57fc20c707 --- M docroot/bits/static-current/extensions M docroot/bits/static-current/resources M docroot/bits/static-current/skins 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/docroot/bits/static-current/extensions b/docroot/bits/static-current/extensions index a50a95a..452f2aa 12 --- a/docroot/bits/static-current/extensions +++ b/docroot/bits/static-current/extensions @@ -1 +1 @@ -/usr/local/apache/common-local/php-1.23wmf2/extensions \ No newline at end of file +/usr/local/apache/common-local/php-1.23wmf3/extensions \ No newline at end of file diff --git a/docroot/bits/static-current/resources b/docroot/bits/static-current/resources index da40e1a..fb50da5 12 --- a/docroot/bits/static-current/resources +++ b/docroot/bits/static-current/resources @@ -1 +1 @@ -/usr/local/apache/common-local/php-1.23wmf2/resources \ No newline at end of file +/usr/local/apache/common-local/php-1.23wmf3/resources \ No newline at end of file diff --git a/docroot/bits/static-current/skins b/docroot/bits/static-current/skins index ca85527..e6f2faa 12 --- a/docroot/bits/static-current/skins +++ b/docroot/bits/static-current/skins @@ -1 +1 @@ -/usr/local/apache/common-local/php-1.23wmf2/skins \ No newline at end of file +/usr/local/apache/common-local/php-1.23wmf3/skins \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/94277 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5a970d209cec773d00f99bc42cd42b57fc20c707 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only set cookie header on API requests when one was passed in - change (mediawiki...Parsoid)
GWicke has uploaded a new change for review. https://gerrit.wikimedia.org/r/94308 Change subject: Only set cookie header on API requests when one was passed in .. Only set cookie header on API requests when one was passed in We don't send Vary: Cookie headers ourselves, but it seems to be well possible that our Varnish config (by using various MW defaults) varies on cookies by default. That would explain the cache misses on selser that we are seeing in production. Change-Id: Id28070fce871c51b80a9c443cf4bdd790e903449 --- M js/lib/mediawiki.ApiRequest.js 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/08/94308/1 diff --git a/js/lib/mediawiki.ApiRequest.js b/js/lib/mediawiki.ApiRequest.js index 8ac266b..676e0c5 100644 --- a/js/lib/mediawiki.ApiRequest.js +++ b/js/lib/mediawiki.ApiRequest.js @@ -560,12 +560,16 @@ timeout: 60 * 1000, // 60 seconds: less than 100s VE timeout so we still finish headers: { 'User-Agent': userAgent, - 'Cookie': env.cookie, 'Connection': 'close', 'x-parsoid-request': 'cache' } }; + if (env.cookie) { + // Forward the cookie if set + this.requestOptions.headers.Cookie = env.cookie; + } + if (!options.evenIfNotCached) { // Request a reply only from cache. this.requestOptions.headers['Cache-control'] = 'only-if-cached'; -- To view, visit https://gerrit.wikimedia.org/r/94308 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id28070fce871c51b80a9c443cf4bdd790e903449 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: GWicke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update editing table to include new schema - change (analytics/limn-mobile-data)
JGonera has submitted this change and it was merged. Change subject: Update editing table to include new schema .. Update editing table to include new schema Change-Id: Ib7b4bb50c4eea0f4b12e30ea5c980040cd41dea6 --- M mobile/config.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: JGonera: Verified; Looks good to me, approved diff --git a/mobile/config.yaml b/mobile/config.yaml index 1cfb5ee..7494aff 100644 --- a/mobile/config.yaml +++ b/mobile/config.yaml @@ -11,7 +11,7 @@ db: commonswiki tables: upload_attempts: (SELECT id, uuid, clientIp, isTruncated, clientValidated, timestamp, webHost, wiki, event_appversion, event_device, event_filename, 0 as event_multiple, event_platform, event_result, event_source, event_username FROM MobileAppUploadAttempts_5257716 UNION SELECT * FROM MobileAppUploadAttempts_5334329) as MobileAppUploadAttempts -edits_web: MobileWebEditing_5644223 +edits_web: (SELECT *, null FROM MobileWebEditing_5644223 UNION SELECT * FROM MobileWebEditing_6077315) as MobileWebEdits login_attempts: MobileAppLoginAttempts_5257721 share_attempts: MobileAppShareAttempts_5346170 upload_web: (SELECT * FROM MobileWebUploads_5281063 UNION SELECT * FROM MobileWebUploads_5383883) AS MobileWebUploads -- To view, visit https://gerrit.wikimedia.org/r/92592 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib7b4bb50c4eea0f4b12e30ea5c980040cd41dea6 Gerrit-PatchSet: 2 Gerrit-Project: analytics/limn-mobile-data Gerrit-Branch: master Gerrit-Owner: Jdlrobson Gerrit-Reviewer: JGonera ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Story 1261: Limn graph - Active Mobile Edits - change (analytics/limn-mobile-data)
JGonera has submitted this change and it was merged. Change subject: Story 1261: Limn graph - Active Mobile Edits .. Story 1261: Limn graph - Active Mobile Edits Change-Id: If74760046bc78e9312c4e7584aa145345524bab8 --- M dashboards/reportcard.json A datasources/edits-monthly-active-editors.json A graphs/edits-monthly-active-editors.json M mobile/config.yaml A mobile/edits-monthly-active-editors.sql 5 files changed, 156 insertions(+), 1 deletion(-) Approvals: JGonera: Verified; Looks good to me, approved diff --git a/dashboards/reportcard.json b/dashboards/reportcard.json index 481d0b1..1562134 100644 --- a/dashboards/reportcard.json +++ b/dashboards/reportcard.json @@ -8,7 +8,8 @@ "graph_ids": [ "edits-monthly-unique-editors", "edits-monthly-successful", -"edits-monthly-5plus-editors" +"edits-monthly-5plus-editors", +"edits-monthly-active-editors" ] }, { diff --git a/datasources/edits-monthly-active-editors.json b/datasources/edits-monthly-active-editors.json new file mode 100644 index 000..7411e00 --- /dev/null +++ b/datasources/edits-monthly-active-editors.json @@ -0,0 +1,18 @@ +{ +"name": "Active editors (per month)", +"url": "http://stat1001.wikimedia.org/limn-public-data/mobile/datafiles/edits-monthly-active-editors.csv";, +"format": "csv", +"shortName": "edits-monthly-active-editors", +"type": "timeseries", +"id": "edits-monthly-active-editors", +"columns": [ +{ +"type": "date", +"label": "Month" +}, +{ +"type": "int", +"label": "Active editors" +} +] +} diff --git a/graphs/edits-monthly-active-editors.json b/graphs/edits-monthly-active-editors.json new file mode 100644 index 000..144ed95 --- /dev/null +++ b/graphs/edits-monthly-active-editors.json @@ -0,0 +1,113 @@ +{ + "graph_version": "0.6.0", + "name": "Users who edited 5 or more times on mobile during month", + "slug": "edits-monthly-active-editors", + "root": { +"nodeType": "canvas", +"minWidth": 750, +"minHeight": 500, +"height": 500, +"width": "auto", +"x": { + "padding": 0.001 +}, +"children": [ + { +"disabled": false, +"nodeType": "axis", +"options": { + "tickFormat": "MMM YY", + "dimension": "x", + "orient": "bottom" +} + }, + { +"disabled": false, +"nodeType": "axis", +"options": { + "tickFormat": "MMM YY", + "dimension": "y", + "orient": "left" +} + }, + { +"disabled": false, +"nodeType": "grid", +"options": { + "ticks": 10, + "dimension": "x" +} + }, + { +"disabled": false, +"nodeType": "grid", +"options": { + "ticks": 10, + "dimension": "y" +} + }, + { +"disabled": false, +"nodeType": "zoom-brush", +"options": { + "allowY": true, + "allowX": true +} + }, + { +"nodeType": "callout", +"target": "latest", +"disabled": false, +"steps": [ + "1y", + "1M" +], +"metricRef": 0, +"options": { + "deltaPercent": true, + "dateFormat": "MMM ", + "colorDelta": true +} + }, + { +"disabled": false, +"nodeType": "legend", +"options": { + "valueFormat": ",.2s", + "dateFormat": "MMM " +}, +"label": "Aug 2012" + }, + { +"disabled": false, +"nodeType": "bar-group", +"options": { + "palette": "wmf_projects", + "scale": "log", + "stack" : { +"enabled": true + }, + "dateFormat": "MMM " +}, +"children": [ + { +"disabled": false, +"index": 0, +"metric": { + "source_id": "edits-monthly-active-editors", + "type": "int", + "source_col": 1 +}, +"nodeType": "bar", +"options": { + "label": "Main namespace", + "noLegend": false, + "dateFormat": "MMM " +} + } +] + } +] + }, + "id": "edits-monthly-active-editors" +} diff --git a/mobile/config.yaml b/mobile/config.yaml index bd54324..1cfb5ee 100644 --- a/mobile/config.yaml +++ b/mobile/config.yaml @@ -59,6 +59,8 @@ title: Percentage of files with a category added deleted-uploads: title: Uploads deleted (per month) +edits-monthly-active-editors: +
[MediaWiki-commits] [Gerrit] fix pdf servers in dsh groups - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/94307 Change subject: fix pdf servers in dsh groups .. fix pdf servers in dsh groups there are pdf1-3. pdf1 was in ALL, the others were not. and actually they are "misc" as well (or "very misc":) Change-Id: I1a8e0b70e4d33b95876c8c79a76f393273962c39 --- M files/dsh/group/ALL M files/dsh/group/misc_pmtpa 2 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/07/94307/1 diff --git a/files/dsh/group/ALL b/files/dsh/group/ALL index 621e86a..27a9019 100644 --- a/files/dsh/group/ALL +++ b/files/dsh/group/ALL @@ -5,6 +5,8 @@ hume mchenry pdf1 +pdf2 +pdf3 sanger terbium lvs1 diff --git a/files/dsh/group/misc_pmtpa b/files/dsh/group/misc_pmtpa index 06e4c94..7da7be2 100644 --- a/files/dsh/group/misc_pmtpa +++ b/files/dsh/group/misc_pmtpa @@ -21,6 +21,9 @@ mchenry mexia pappas +pdf1 +pdf2 +pdf3 professor rose sanger -- To view, visit https://gerrit.wikimedia.org/r/94307 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a8e0b70e4d33b95876c8c79a76f393273962c39 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Speed up thumbnail purging a bit for stash script - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Speed up thumbnail purging a bit for stash script .. Speed up thumbnail purging a bit for stash script Change-Id: Ie0f3d5aa505a5c1554d7932d38ba376811590df1 --- M maintenance/cleanupUploadStash.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/cleanupUploadStash.php b/maintenance/cleanupUploadStash.php index bc43c67..2300694 100644 --- a/maintenance/cleanupUploadStash.php +++ b/maintenance/cleanupUploadStash.php @@ -94,7 +94,7 @@ // Delete all the corresponding thumbnails... $dir = $tempRepo->getZonePath( 'thumb' ); - $iterator = $tempRepo->getBackend()->getFileList( array( 'dir' => $dir ) ); + $iterator = $tempRepo->getBackend()->getFileList( array( 'dir' => $dir, 'adviseStat' => 1 ) ); $this->output( "Deleting old thumbnails...\n" ); $i = 0; foreach ( $iterator as $file ) { -- To view, visit https://gerrit.wikimedia.org/r/94305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie0f3d5aa505a5c1554d7932d38ba376811590df1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Chad Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add APISandbox Rolee - change (mediawiki/vagrant)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/94306 Change subject: Add APISandbox Rolee .. Add APISandbox Rolee Simply enables the APISandbox extension, does nothing else. Reading the huge wall of text generated by /w/api.php is for chumps. Change-Id: Ica747215f1c35908548735a303c193b397ab634e --- M puppet/manifests/roles.pp 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/06/94306/1 diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp index 6966c9e..d253dcc 100644 --- a/puppet/manifests/roles.pp +++ b/puppet/manifests/roles.pp @@ -648,3 +648,11 @@ }, } } + +# == Class: role::apisandbox +# This role simply sets up the ApiSandbox extension +class role::apisandbox { +include role::mediawiki + +@mediawiki::extension { 'ApiSandbox': } +} -- To view, visit https://gerrit.wikimedia.org/r/94306 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica747215f1c35908548735a303c193b397ab634e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Speed up thumbnail purging a bit for stash script - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/94305 Change subject: Speed up thumbnail purging a bit for stash script .. Speed up thumbnail purging a bit for stash script Change-Id: Ie0f3d5aa505a5c1554d7932d38ba376811590df1 --- M maintenance/cleanupUploadStash.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/05/94305/1 diff --git a/maintenance/cleanupUploadStash.php b/maintenance/cleanupUploadStash.php index bc43c67..2300694 100644 --- a/maintenance/cleanupUploadStash.php +++ b/maintenance/cleanupUploadStash.php @@ -94,7 +94,7 @@ // Delete all the corresponding thumbnails... $dir = $tempRepo->getZonePath( 'thumb' ); - $iterator = $tempRepo->getBackend()->getFileList( array( 'dir' => $dir ) ); + $iterator = $tempRepo->getBackend()->getFileList( array( 'dir' => $dir, 'adviseStat' => 1 ) ); $this->output( "Deleting old thumbnails...\n" ); $i = 0; foreach ( $iterator as $file ) { -- To view, visit https://gerrit.wikimedia.org/r/94305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0f3d5aa505a5c1554d7932d38ba376811590df1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] text and target for 'Terms of use' link changed - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: text and target for 'Terms of use' link changed .. text and target for 'Terms of use' link changed Change-Id: Ibc041478d89749a695711194b080ebcf938011af --- M tests/browser/features/step_definitions/footer_steps.rb M tests/browser/features/support/pages/home_page.rb 2 files changed, 2 insertions(+), 3 deletions(-) Approvals: Mgrover: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/step_definitions/footer_steps.rb b/tests/browser/features/step_definitions/footer_steps.rb index 8745295..73c5957 100644 --- a/tests/browser/features/step_definitions/footer_steps.rb +++ b/tests/browser/features/step_definitions/footer_steps.rb @@ -27,7 +27,7 @@ end Then /^I go to the Terms of Use page$/ do - @browser.url.should match Regexp.escape('Terms_of_use?useformat=mobile') + @browser.url.should match Regexp.escape('Terms_of_use') end When /^I click on the Privacy link$/ do diff --git a/tests/browser/features/support/pages/home_page.rb b/tests/browser/features/support/pages/home_page.rb index cee16d3..8f00959 100644 --- a/tests/browser/features/support/pages/home_page.rb +++ b/tests/browser/features/support/pages/home_page.rb @@ -21,7 +21,7 @@ a(:privacy_link, text: 'Privacy') form(:search_form, id: 'mw-mf-searchForm') a(:sign_up, text: 'Sign up') - a(:terms_link, text: 'Terms of Use') + a(:terms_link, text: 'Terms of use') a(:watch_link, class: 'watch-this-article') div(:watch_note, text: 'Added San Francisco Chronicle to your watchlist') a(:watched_link, class: 'watch-this-article watched') @@ -33,7 +33,6 @@ page.search_results_element.a end a(:sign_up_watchlist, href: /returntoquery=article_action%3Dwatch&type=signup/) - a(:terms_link, text: 'Terms of Use') a(:watch_link, class: 'watch-this-article') div(:watch_note, text: 'Added San Francisco Chronicle to your watchlist') div(:watch_note_removed, text: 'Removed San Francisco Chronicle from your watchlist') -- To view, visit https://gerrit.wikimedia.org/r/94266 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc041478d89749a695711194b080ebcf938011af Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Cmcmahon Gerrit-Reviewer: Awjrichards Gerrit-Reviewer: Mgrover Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make oojs jshint voting - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: Make oojs jshint voting .. Make oojs jshint voting Follows-up ced4a80 Change-Id: Iaceb016cf7df20bcb4415bd5e9bd2a647f968f4f --- M layout.yaml 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 0a3bc58..ce81923 100644 --- a/layout.yaml +++ b/layout.yaml @@ -437,6 +437,11 @@ - name: mwext-Wikibase-jslint voting: true + - name: oojs-core-jslint +voting: true + - name: oojs-ui-jslint +voting: true + - name: mwext-TemplateData-phpcs-HEAD voting: true - name: mwext-VisualEditor-phpcs-HEAD -- To view, visit https://gerrit.wikimedia.org/r/94302 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaceb016cf7df20bcb4415bd5e9bd2a647f968f4f Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use descriptive heredoc - change (operations/mediawiki-config)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/94303 Change subject: Use descriptive heredoc .. Use descriptive heredoc Change-Id: I7ee9dbee39a326c7e9911fbaba69d38c2da690c7 --- M multiversion/checkoutMediaWiki 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/03/94303/1 diff --git a/multiversion/checkoutMediaWiki b/multiversion/checkoutMediaWiki index ec679fe..30b7d7e 100755 --- a/multiversion/checkoutMediaWiki +++ b/multiversion/checkoutMediaWiki @@ -80,11 +80,11 @@ echo "MediaWiki already checked out at $destIP\n"; } - $localSettingsCode = <
[MediaWiki-commits] [Gerrit] Prevent rendering topics like posts - change (mediawiki...Flow)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/94304 Change subject: Prevent rendering topics like posts .. Prevent rendering topics like posts Topic titles should never be rendered like a post, it will just cause issues. Blow up instead. Change-Id: I77ae191d890ae40c0d65682d255e126d69cbc7e6 --- M includes/Templating.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/04/94304/1 diff --git a/includes/Templating.php b/includes/Templating.php index 5a935a3..0ca7bdf 100644 --- a/includes/Templating.php +++ b/includes/Templating.php @@ -93,6 +93,10 @@ public function renderPost( PostRevision $post, Block $block, $return = true ) { global $wgFlowTokenSalt; + if ( $post->isTopicTitle() ) { + throw new \MWException( 'Cannot render topic with ' . __METHOD__ ); + } + // @todo: I don't like container being pulled in here, improve this some day $container = Container::getContainer(); -- To view, visit https://gerrit.wikimedia.org/r/94304 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77ae191d890ae40c0d65682d255e126d69cbc7e6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move autosetuprebase to where it will actually do something ... - change (operations/mediawiki-config)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/94301 Change subject: Move autosetuprebase to where it will actually do something useful .. Move autosetuprebase to where it will actually do something useful Change-Id: Ie608974b10217ffb716349562805acdac2705232 --- M multiversion/checkoutMediaWiki 1 file changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/01/94301/1 diff --git a/multiversion/checkoutMediaWiki b/multiversion/checkoutMediaWiki index 3ec4d1b..ec679fe 100755 --- a/multiversion/checkoutMediaWiki +++ b/multiversion/checkoutMediaWiki @@ -53,6 +53,13 @@ print "Error changing directory\n"; exit( 1 ); } + + passthru( 'git config branch.autosetuprebase always', $ret ); + if ( $ret ) { + # Don't exit, this isn't a show-stopper + print "Error running setting autosetuprebase\n"; + } + passthru( 'git checkout ' . escapeshellarg( "wmf/$gitVersion" ), $ret ); if ( $ret ) { print "Error checking out branch\n"; @@ -62,12 +69,6 @@ if ( $ret ) { print "Error updating submodules\n"; exit( 1 ); - } - - passthru( 'git config branch.autosetuprebase always', $ret ); - if ( $ret ) { - # Don't exit, this isn't a show-stopper - print "Error running setting autosetuprebase\n"; } passthru( 'git config alias.up "pull --ff-only"', $ret ); -- To view, visit https://gerrit.wikimedia.org/r/94301 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie608974b10217ffb716349562805acdac2705232 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make oojs jshint voting - change (integration/zuul-config)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/94302 Change subject: Make oojs jshint voting .. Make oojs jshint voting Follows-up ced4a80 Change-Id: Iaceb016cf7df20bcb4415bd5e9bd2a647f968f4f --- M layout.yaml 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/02/94302/1 diff --git a/layout.yaml b/layout.yaml index 0a3bc58..ce81923 100644 --- a/layout.yaml +++ b/layout.yaml @@ -437,6 +437,11 @@ - name: mwext-Wikibase-jslint voting: true + - name: oojs-core-jslint +voting: true + - name: oojs-ui-jslint +voting: true + - name: mwext-TemplateData-phpcs-HEAD voting: true - name: mwext-VisualEditor-phpcs-HEAD -- To view, visit https://gerrit.wikimedia.org/r/94302 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaceb016cf7df20bcb4415bd5e9bd2a647f968f4f Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Turn off geowiki monitoring - change (operations/puppet)
Hello Ottomata, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/94290 to review the following change. Change subject: Turn off geowiki monitoring .. Turn off geowiki monitoring Due to taking the data repository off-line, the files were no longer available on http://gp.wmflabs.org/ , and monitoring screamed at us. We're restructuring the data repositories and bring them back online, which requires monitoring changes. Afterwards, we'll turn monitoring back on. Change-Id: I2651cdc0d753c0315dbb466f5c6253c5620e1255 --- M manifests/misc/statistics.pp 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/90/94290/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 4f258c5..4e3ab58 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -955,6 +955,8 @@ # Checks if the geowiki files served throuh http://gp.wmflabs.org are # up to date. # +# Disabled for now due to restructuring of geowiki. +# class misc::statistics::geowiki::jobs::monitoring { require misc::statistics::geowiki @@ -969,5 +971,7 @@ hour=> 21, user=> $geowiki_user, command => "${geowiki_path}/scripts/check_web_page.sh", +# Disabled for now due to restructuring of geowiki +ensure => absent, } } -- To view, visit https://gerrit.wikimedia.org/r/94290 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2651cdc0d753c0315dbb466f5c6253c5620e1255 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Turn on generating geowiki's limn files - change (operations/puppet)
Hello Ottomata, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/94298 to review the following change. Change subject: Turn on generating geowiki's limn files .. Turn on generating geowiki's limn files Split of geowiki data into public and private part is done. We can generate the data again daily. Change-Id: I94ff084de41bd041d14f9c597a0c4b0eeb30f7e5 --- M manifests/misc/statistics.pp 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/98/94298/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index b97bdb5..1ce1a33 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -919,8 +919,6 @@ # == Class misc::statistics::geowiki::jobs::limn # Installs a cron job to create limn files from the geocoded editor data. -# -# Temporarily turned off reboot the geowiki repository. class misc::statistics::geowiki::jobs::limn { require misc::statistics::geowiki, misc::statistics::geowiki::mysql::conf::research, @@ -961,7 +959,6 @@ Git::Clone['geowiki-data-private'], File[$geowiki_mysql_research_conf_file], ], -ensure => absent, } } -- To view, visit https://gerrit.wikimedia.org/r/94298 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94ff084de41bd041d14f9c597a0c4b0eeb30f7e5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move geowiki scripts into geowiki's scripts subdirectory - change (operations/puppet)
Hello Ottomata, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/94294 to review the following change. Change subject: Move geowiki scripts into geowiki's scripts subdirectory .. Move geowiki scripts into geowiki's scripts subdirectory Since we'll be adding a repo for geowiki's private data, and a bare repo for it, following the current layout, we'd arrive at: /a/geowiki /a/geowiki-data-public /a/geowiki-data-private /a/geowiki-data-private.bare . Four geowiki directories in /a seems too much. So we move /a/geowiki -> /a/geowiki/scripts, and can work towards having all of them underneath /a/geowiki: /a/geowiki/scripts /a/geowiki/data-public /a/geowiki/data-private /a/geowiki/data-private.bare Change-Id: Ib7bada6e099a2f05a7b459cc96fbc6d21f43f23c --- M manifests/misc/statistics.pp 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/94/94294/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 163a413..6104dfe 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -821,9 +821,9 @@ $geowiki_user = $misc::statistics::user::username $geowiki_base_path = '/a/geowiki' -$geowiki_scripts_path = "${geowiki_base_path}" +$geowiki_scripts_path = "${geowiki_base_path}/scripts" -git::clone { 'geowiki': +git::clone { 'geowiki-scripts': directory => $geowiki_scripts_path, origin=> "https://gerrit.wikimedia.org/r/p/analytics/geowiki.git";, ensure=> 'latest', @@ -950,7 +950,7 @@ user=> $geowiki_user, command => "${geowiki_scripts_path}/scripts/make_and_push_limn_files.sh --cron-mode --basedir=${geowiki_data_path} --source_sql_cnf=${geowiki_mysql_research_conf_file}", require => [ -Git::Clone['geowiki'], +Git::Clone['geowiki-scripts'], Git::Clone['geowiki-data'], File[$geowiki_mysql_research_conf_file], ], -- To view, visit https://gerrit.wikimedia.org/r/94294 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7bada6e099a2f05a7b459cc96fbc6d21f43f23c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rsync geowiki's bare data-private repository to statistics' ... - change (operations/puppet)
Hello Ottomata, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/94299 to review the following change. Change subject: Rsync geowiki's bare data-private repository to statistics' webservers .. Rsync geowiki's bare data-private repository to statistics' webservers Andrew said that we can trust the network, so there is no need to encrypt the data when bringing it over to other hosts. Change-Id: If57d2f42c59d24c1e5813da66a66fbea66a240bd --- M manifests/misc/statistics.pp M manifests/role/statistics.pp 2 files changed, 35 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/94299/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 1ce1a33..69a9604 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -863,6 +863,36 @@ } } +# == Class misc::statistics::geowiki::repo::data_private_bare +# Makes sure the geowiki's bare data-private repository is available. +# +class misc::statistics::geowiki::repo::data_private_bare { +require misc::statistics::geowiki + +$geowiki_user = $misc::statistics::geowiki::geowiki_user +$geowiki_base_path = $misc::statistics::geowiki::geowiki_base_path +$geowiki_private_data_bare_path = "${geowiki_base_path}/data-private-bare" + +file { "$geowiki_private_data_bare_path": +ensure => directory, +owner => $geowiki_user, +group => $geowiki_user, +mode => '0640', +} + +# The bare repository lives on stat1, so it's available there directly. +# Other hosts need to rsync it over +if $::hostname != 'stat1' { +cron { 'geowiki data-private bare sync': +command => "/usr/bin/rsync -rt --delete rsync://stat1.wikimedia.org${geowiki_private_data_bare_path} ${geowiki_private_data_bare_path}", +require => File["$geowiki_private_data_bare_path"], +user=> 'root', +hour => '17', +minute => '0', +} +} +} + # == Class misc::statistics::geowiki::jobs::data # Installs a cron job to get recent editor data # from the research slave databases and generate @@ -922,6 +952,7 @@ class misc::statistics::geowiki::jobs::limn { require misc::statistics::geowiki, misc::statistics::geowiki::mysql::conf::research, +misc::statistics::geowiki::repo::data_private_bare, misc::statistics::packages::python $geowiki_user = $misc::statistics::geowiki::geowiki_user @@ -929,7 +960,7 @@ $geowiki_scripts_path = $misc::statistics::geowiki::geowiki_scripts_path $geowiki_public_data_path = "${geowiki_base_path}/data-public" $geowiki_private_data_path = "${geowiki_base_path}/data-private" -$geowiki_private_data_bare_path = "${geowiki_base_path}/data-private-bare" +$geowiki_private_data_bare_path = $misc::statistics::geowiki::repo::data_private_bare::geowiki_private_data_bare_path $geowiki_mysql_research_conf_file = $misc::statistics::geowiki::mysql::conf::research::conf_file git::clone { 'geowiki-data-public': diff --git a/manifests/role/statistics.pp b/manifests/role/statistics.pp index 419c264..b0d8cdf 100644 --- a/manifests/role/statistics.pp +++ b/manifests/role/statistics.pp @@ -45,7 +45,9 @@ # reportcard.wikimedia.org misc::statistics::sites::reportcard, # rsync public datasets from stat1 hourly - misc::statistics::public_datasets + misc::statistics::public_datasets, + # rsync geowiki's bare data-private from stat1 daily + misc::statistics::geowiki::repo::data_private_bare } class role::statistics::private inherits role::statistics { -- To view, visit https://gerrit.wikimedia.org/r/94299 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If57d2f42c59d24c1e5813da66a66fbea66a240bd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move geowiki's name for research MySQL config into separate ... - change (operations/puppet)
Hello Ottomata, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/94291 to review the following change. Change subject: Move geowiki's name for research MySQL config into separate variable .. Move geowiki's name for research MySQL config into separate variable This rephrasing makes follow-up commits that move files around more readable. Change-Id: I7ad34931f93f35d58fa7bb1aa14d71387442cae1 --- M manifests/misc/statistics.pp 1 file changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/91/94291/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 4e3ab58..18bcfcd 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -844,7 +844,8 @@ $research_mysql_user = $passwords::mysql::research::user $research_mysql_pass = $passwords::mysql::research::pass -file { "${geowiki_path}/.research.my.cnf": +$conf_file = "${geowiki_path}/.research.my.cnf" +file { $conf_file: owner => $geowiki_user, group => $geowiki_user, mode=> '0400', @@ -876,6 +877,8 @@ $geowiki_user = $misc::statistics::geowiki::geowiki_user $geowiki_path = $misc::statistics::geowiki::geowiki_path +$geowiki_mysql_research_conf_file = $misc::statistics::geowiki::mysql::conf::research::conf_file + # install MySQL conf files for db acccess $globaldev_mysql_user = $passwords::mysql::globaldev::user $globaldev_mysql_pass = $passwords::mysql::globaldev::pass @@ -906,7 +909,7 @@ minute => 0, hour=> 12, user=> $geowiki_user, -command => "/usr/bin/python ${geowiki_path}/geowiki/process_data.py -o ${$geowiki_backups_path} --wpfiles ${geowiki_path}/geowiki/data/all_ids.tsv --daily --start=`date --date='-2 day' +\\%Y-\\%m-\\%d` --end=`date --date='0 day' +\\%Y-\\%m-\\%d` --source_sql_cnf=${geowiki_path}/.globaldev.my.cnf --dest_sql_cnf=${geowiki_path}/.research.my.cnf", +command => "/usr/bin/python ${geowiki_path}/geowiki/process_data.py -o ${$geowiki_backups_path} --wpfiles ${geowiki_path}/geowiki/data/all_ids.tsv --daily --start=`date --date='-2 day' +\\%Y-\\%m-\\%d` --end=`date --date='0 day' +\\%Y-\\%m-\\%d` --source_sql_cnf=${geowiki_path}/.globaldev.my.cnf --dest_sql_cnf=${geowiki_mysql_research_conf_file}", require => File[$geowiki_backups_path], } } @@ -923,6 +926,7 @@ $geowiki_user = $misc::statistics::geowiki::geowiki_user $geowiki_path = $misc::statistics::geowiki::geowiki_path $geowiki_data_path = '/a/geowiki-data' +$geowiki_mysql_research_conf_file = $misc::statistics::geowiki::mysql::conf::research::conf_file git::clone { 'geowiki-data': directory => $geowiki_data_path, @@ -941,11 +945,11 @@ minute => 0, hour=> 15, user=> $geowiki_user, -command => "${geowiki_path}/scripts/make_and_push_limn_files.sh --cron-mode --basedir=${geowiki_data_path} --source_sql_cnf=${geowiki_path}/.research.my.cnf", +command => "${geowiki_path}/scripts/make_and_push_limn_files.sh --cron-mode --basedir=${geowiki_data_path} --source_sql_cnf=${geowiki_mysql_research_conf_file}", require => [ Git::Clone['geowiki'], Git::Clone['geowiki-data'], -File["${geowiki_path}/.research.my.cnf"], +File[$geowiki_mysql_research_conf_file], ], ensure => absent, } -- To view, visit https://gerrit.wikimedia.org/r/94291 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ad34931f93f35d58fa7bb1aa14d71387442cae1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename geowiki backups to logs, as they are only logs - change (operations/puppet)
Hello Ottomata, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/94295 to review the following change. Change subject: Rename geowiki backups to logs, as they are only logs .. Rename geowiki backups to logs, as they are only logs Change-Id: I454671074bcaf15b42d271c9cf42b14e3e26a31c --- M manifests/misc/statistics.pp 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/95/94295/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 6104dfe..7ad9607 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -897,8 +897,8 @@ ", } -$geowiki_backups_path = "${geowiki_base_path}/geowiki-backup-data" -file { $geowiki_backups_path: +$geowiki_log_path = "${geowiki_base_path}/logs" +file { $geowiki_log_path: ensure => 'directory', owner => $geowiki_user, group => $geowiki_user, @@ -907,13 +907,13 @@ # cron to run geowiki/process_data.py. # This will query the production slaves and # store results in the research staging database. -# Backup files will be kept $geowiki_backups_path. +# Logs will be kept $geowiki_log_path. cron { 'geowiki-process-data': minute => 0, hour=> 12, user=> $geowiki_user, -command => "/usr/bin/python ${geowiki_scripts_path}/geowiki/process_data.py -o ${$geowiki_backups_path} --wpfiles ${geowiki_scripts_path}/geowiki/data/all_ids.tsv --daily --start=`date --date='-2 day' +\\%Y-\\%m-\\%d` --end=`date --date='0 day' +\\%Y-\\%m-\\%d` --source_sql_cnf=${geowiki_mysql_globaldev_conf_file} --dest_sql_cnf=${geowiki_mysql_research_conf_file}", -require => File[$geowiki_backups_path], +command => "/usr/bin/python ${geowiki_scripts_path}/geowiki/process_data.py -o ${$geowiki_log_path} --wpfiles ${geowiki_scripts_path}/geowiki/data/all_ids.tsv --daily --start=`date --date='-2 day' +\\%Y-\\%m-\\%d` --end=`date --date='0 day' +\\%Y-\\%m-\\%d` --source_sql_cnf=${geowiki_mysql_globaldev_conf_file} --dest_sql_cnf=${geowiki_mysql_research_conf_file}", +require => File[$geowiki_log_path], } } -- To view, visit https://gerrit.wikimedia.org/r/94295 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I454671074bcaf15b42d271c9cf42b14e3e26a31c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move geowiki's name for globaldev MySQL config into separate... - change (operations/puppet)
Hello Ottomata, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/94292 to review the following change. Change subject: Move geowiki's name for globaldev MySQL config into separate variable .. Move geowiki's name for globaldev MySQL config into separate variable This rephrasing makes follow-up commits that move files around more readable. Change-Id: I4edca7388c0effaad5cd1bb03d27c648158478e3 --- M manifests/misc/statistics.pp 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/92/94292/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 18bcfcd..5474528 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -883,7 +883,8 @@ $globaldev_mysql_user = $passwords::mysql::globaldev::user $globaldev_mysql_pass = $passwords::mysql::globaldev::pass -file { "${geowiki_path}/.globaldev.my.cnf": +$geowiki_mysql_globaldev_conf_file = "${geowiki_path}/.globaldev.my.cnf" +file { $geowiki_mysql_globaldev_conf_file: owner => $geowiki_user, group => $geowiki_user, mode=> '0400', @@ -909,7 +910,7 @@ minute => 0, hour=> 12, user=> $geowiki_user, -command => "/usr/bin/python ${geowiki_path}/geowiki/process_data.py -o ${$geowiki_backups_path} --wpfiles ${geowiki_path}/geowiki/data/all_ids.tsv --daily --start=`date --date='-2 day' +\\%Y-\\%m-\\%d` --end=`date --date='0 day' +\\%Y-\\%m-\\%d` --source_sql_cnf=${geowiki_path}/.globaldev.my.cnf --dest_sql_cnf=${geowiki_mysql_research_conf_file}", +command => "/usr/bin/python ${geowiki_path}/geowiki/process_data.py -o ${$geowiki_backups_path} --wpfiles ${geowiki_path}/geowiki/data/all_ids.tsv --daily --start=`date --date='-2 day' +\\%Y-\\%m-\\%d` --end=`date --date='0 day' +\\%Y-\\%m-\\%d` --source_sql_cnf=${geowiki_mysql_globaldev_conf_file} --dest_sql_cnf=${geowiki_mysql_research_conf_file}", require => File[$geowiki_backups_path], } } -- To view, visit https://gerrit.wikimedia.org/r/94292 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4edca7388c0effaad5cd1bb03d27c648158478e3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Split geowiki data repository into private and public parts - change (operations/puppet)
Hello Ottomata, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/94297 to review the following change. Change subject: Split geowiki data repository into private and public parts .. Split geowiki data repository into private and public parts Change-Id: I6205cbb60dbdbb50fe50c0265f04f77c6b99a9de --- M manifests/misc/statistics.pp 1 file changed, 18 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/97/94297/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index b2f73ec..b97bdb5 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -929,30 +929,36 @@ $geowiki_user = $misc::statistics::geowiki::geowiki_user $geowiki_base_path = $misc::statistics::geowiki::geowiki_base_path $geowiki_scripts_path = $misc::statistics::geowiki::geowiki_scripts_path -$geowiki_data_path = "${geowiki_base_path}/data" +$geowiki_public_data_path = "${geowiki_base_path}/data-public" +$geowiki_private_data_path = "${geowiki_base_path}/data-private" +$geowiki_private_data_bare_path = "${geowiki_base_path}/data-private-bare" $geowiki_mysql_research_conf_file = $misc::statistics::geowiki::mysql::conf::research::conf_file -git::clone { 'geowiki-data': -directory => $geowiki_data_path, -origin=> "ssh://gerrit.wikimedia.org:29418/analytics/geowiki-data.git", -# As geowiki-data currently does not exist in gerrit, requiring the -# latest version would break puppet's the dependecy chain. So we'll not -# 'ensure => latest' until the repo comes back in gerrit. -ensure=> 'present', +git::clone { 'geowiki-data-public': +directory => $geowiki_public_data_path, +origin=> "ssh://gerrit.wikimedia.org:29418/analytics/geowiki/data-public.git", +ensure=> 'latest', +owner => $geowiki_user, +} + +git::clone { 'geowiki-data-private': +directory => $geowiki_private_data_path, +origin=> "file://${geowiki_private_data_bare_path}", +ensure=> 'latest', owner => $geowiki_user, } # cron job to do the actual fetching from the database, computation of -# the limn files, and pushing the limn files to the geowiki-data -# repository. +# the limn files, and pushing the limn files to the data repositories cron { 'geowiki-process-db-to-limn': minute => 0, hour=> 15, user=> $geowiki_user, -command => "${geowiki_scripts_path}/scripts/make_and_push_limn_files.sh --cron-mode --basedir=${geowiki_data_path} --source_sql_cnf=${geowiki_mysql_research_conf_file}", +command => "${geowiki_scripts_path}/scripts/make_and_push_limn_files.sh --cron-mode --basedir_public=${geowiki_public_data_path} --basedir_private=${geowiki_private_data_path} --source_sql_cnf=${geowiki_mysql_research_conf_file}", require => [ Git::Clone['geowiki-scripts'], -Git::Clone['geowiki-data'], +Git::Clone['geowiki-data-public'], +Git::Clone['geowiki-data-private'], File[$geowiki_mysql_research_conf_file], ], ensure => absent, -- To view, visit https://gerrit.wikimedia.org/r/94297 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6205cbb60dbdbb50fe50c0265f04f77c6b99a9de Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Split geowiki paths in base path and scripts - change (operations/puppet)
Hello Ottomata, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/94293 to review the following change. Change subject: Split geowiki paths in base path and scripts .. Split geowiki paths in base path and scripts This preparation step allows to move the checkout of the geowiki scripts around more easily in follow-up commits. Change-Id: I80ea50c0fcc9e53f1f1a92a1ef0a7aa7f08179f3 --- M manifests/misc/statistics.pp 1 file changed, 14 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/93/94293/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 5474528..163a413 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -820,10 +820,11 @@ require misc::statistics::user $geowiki_user = $misc::statistics::user::username -$geowiki_path = '/a/geowiki' +$geowiki_base_path = '/a/geowiki' +$geowiki_scripts_path = "${geowiki_base_path}" git::clone { 'geowiki': -directory => $geowiki_path, +directory => $geowiki_scripts_path, origin=> "https://gerrit.wikimedia.org/r/p/analytics/geowiki.git";, ensure=> 'latest', owner => $geowiki_user, @@ -839,12 +840,12 @@ passwords::mysql::research $geowiki_user = $misc::statistics::geowiki::geowiki_user -$geowiki_path = $misc::statistics::geowiki::geowiki_path +$geowiki_base_path = $misc::statistics::geowiki::geowiki_base_path $research_mysql_user = $passwords::mysql::research::user $research_mysql_pass = $passwords::mysql::research::pass -$conf_file = "${geowiki_path}/.research.my.cnf" +$conf_file = "${geowiki_base_path}/.research.my.cnf" file { $conf_file: owner => $geowiki_user, group => $geowiki_user, @@ -875,7 +876,8 @@ geoip $geowiki_user = $misc::statistics::geowiki::geowiki_user -$geowiki_path = $misc::statistics::geowiki::geowiki_path +$geowiki_base_path = $misc::statistics::geowiki::geowiki_base_path +$geowiki_scripts_path = $misc::statistics::geowiki::geowiki_scripts_path $geowiki_mysql_research_conf_file = $misc::statistics::geowiki::mysql::conf::research::conf_file @@ -883,7 +885,7 @@ $globaldev_mysql_user = $passwords::mysql::globaldev::user $globaldev_mysql_pass = $passwords::mysql::globaldev::pass -$geowiki_mysql_globaldev_conf_file = "${geowiki_path}/.globaldev.my.cnf" +$geowiki_mysql_globaldev_conf_file = "${geowiki_base_path}/.globaldev.my.cnf" file { $geowiki_mysql_globaldev_conf_file: owner => $geowiki_user, group => $geowiki_user, @@ -895,7 +897,7 @@ ", } -$geowiki_backups_path = "${geowiki_path}/geowiki-backup-data" +$geowiki_backups_path = "${geowiki_base_path}/geowiki-backup-data" file { $geowiki_backups_path: ensure => 'directory', owner => $geowiki_user, @@ -910,7 +912,7 @@ minute => 0, hour=> 12, user=> $geowiki_user, -command => "/usr/bin/python ${geowiki_path}/geowiki/process_data.py -o ${$geowiki_backups_path} --wpfiles ${geowiki_path}/geowiki/data/all_ids.tsv --daily --start=`date --date='-2 day' +\\%Y-\\%m-\\%d` --end=`date --date='0 day' +\\%Y-\\%m-\\%d` --source_sql_cnf=${geowiki_mysql_globaldev_conf_file} --dest_sql_cnf=${geowiki_mysql_research_conf_file}", +command => "/usr/bin/python ${geowiki_scripts_path}/geowiki/process_data.py -o ${$geowiki_backups_path} --wpfiles ${geowiki_scripts_path}/geowiki/data/all_ids.tsv --daily --start=`date --date='-2 day' +\\%Y-\\%m-\\%d` --end=`date --date='0 day' +\\%Y-\\%m-\\%d` --source_sql_cnf=${geowiki_mysql_globaldev_conf_file} --dest_sql_cnf=${geowiki_mysql_research_conf_file}", require => File[$geowiki_backups_path], } } @@ -925,7 +927,7 @@ misc::statistics::packages::python $geowiki_user = $misc::statistics::geowiki::geowiki_user -$geowiki_path = $misc::statistics::geowiki::geowiki_path +$geowiki_scripts_path = $misc::statistics::geowiki::geowiki_scripts_path $geowiki_data_path = '/a/geowiki-data' $geowiki_mysql_research_conf_file = $misc::statistics::geowiki::mysql::conf::research::conf_file @@ -946,7 +948,7 @@ minute => 0, hour=> 15, user=> $geowiki_user, -command => "${geowiki_path}/scripts/make_and_push_limn_files.sh --cron-mode --basedir=${geowiki_data_path} --source_sql_cnf=${geowiki_mysql_research_conf_file}", +command => "${geowiki_scripts_path}/scripts/make_and_push_limn_files.sh --cron-mode --basedir=${geowiki_data_path} --source_sql_cnf=${geowiki_mysql_research_conf_file}", require => [ Git::Clone['geowiki'], Git::Clone['geowiki-data'], @@ -966,7 +968,7 @@ require misc::statistics::geowiki
[MediaWiki-commits] [Gerrit] Checkout geowiki's data-private repo also on statistics' web... - change (operations/puppet)
Hello Ottomata, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/94300 to review the following change. Change subject: Checkout geowiki's data-private repo also on statistics' webservers .. Checkout geowiki's data-private repo also on statistics' webservers Change-Id: Ic3df699d15b2af1b2a22ecd5ca908085717bd282 --- M manifests/misc/statistics.pp M manifests/role/statistics.pp 2 files changed, 23 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/00/94300/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 69a9604..959c5a4 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -893,6 +893,25 @@ } } +# == Class misc::statistics::geowiki::repo::data_private +# Makes sure the geowiki's data-private repository is available. +# +class misc::statistics::geowiki::repo::data_private { +require misc::statistics::geowiki, +misc::statistics::geowiki::repo::data_private_bare + +$geowiki_user = $misc::statistics::geowiki::geowiki_user +$geowiki_private_data_path = "${geowiki_base_path}/data-private" +$geowiki_private_data_bare_path = $misc::statistics::geowiki::repo::data_private_bare::geowiki_private_data_bare_path + +git::clone { 'geowiki-data-private': +directory => $geowiki_private_data_path, +origin=> "file://${geowiki_private_data_bare_path}", +ensure=> 'latest', +owner => $geowiki_user, +} +} + # == Class misc::statistics::geowiki::jobs::data # Installs a cron job to get recent editor data # from the research slave databases and generate @@ -952,27 +971,19 @@ class misc::statistics::geowiki::jobs::limn { require misc::statistics::geowiki, misc::statistics::geowiki::mysql::conf::research, -misc::statistics::geowiki::repo::data_private_bare, +misc::statistics::geowiki::repo::data_private, misc::statistics::packages::python $geowiki_user = $misc::statistics::geowiki::geowiki_user $geowiki_base_path = $misc::statistics::geowiki::geowiki_base_path $geowiki_scripts_path = $misc::statistics::geowiki::geowiki_scripts_path $geowiki_public_data_path = "${geowiki_base_path}/data-public" -$geowiki_private_data_path = "${geowiki_base_path}/data-private" -$geowiki_private_data_bare_path = $misc::statistics::geowiki::repo::data_private_bare::geowiki_private_data_bare_path +$geowiki_private_data_path = $misc::statistics::geowiki::repo::data_private::geowiki_private_data_path $geowiki_mysql_research_conf_file = $misc::statistics::geowiki::mysql::conf::research::conf_file git::clone { 'geowiki-data-public': directory => $geowiki_public_data_path, origin=> "ssh://gerrit.wikimedia.org:29418/analytics/geowiki/data-public.git", -ensure=> 'latest', -owner => $geowiki_user, -} - -git::clone { 'geowiki-data-private': -directory => $geowiki_private_data_path, -origin=> "file://${geowiki_private_data_bare_path}", ensure=> 'latest', owner => $geowiki_user, } diff --git a/manifests/role/statistics.pp b/manifests/role/statistics.pp index b0d8cdf..acbcc60 100644 --- a/manifests/role/statistics.pp +++ b/manifests/role/statistics.pp @@ -46,8 +46,8 @@ misc::statistics::sites::reportcard, # rsync public datasets from stat1 hourly misc::statistics::public_datasets, - # rsync geowiki's bare data-private from stat1 daily - misc::statistics::geowiki::repo::data_private_bare + # rsync geowiki's data-private from stat1 daily + misc::statistics::geowiki::repo::data_private } class role::statistics::private inherits role::statistics { -- To view, visit https://gerrit.wikimedia.org/r/94300 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic3df699d15b2af1b2a22ecd5ca908085717bd282 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move geowiki data checkout into geowiki's base directory - change (operations/puppet)
Hello Ottomata, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/94296 to review the following change. Change subject: Move geowiki data checkout into geowiki's base directory .. Move geowiki data checkout into geowiki's base directory Change-Id: Ibcab3257be74d8d3735985290291df2fdc056115 --- M manifests/misc/statistics.pp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/96/94296/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 7ad9607..b2f73ec 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -927,8 +927,9 @@ misc::statistics::packages::python $geowiki_user = $misc::statistics::geowiki::geowiki_user +$geowiki_base_path = $misc::statistics::geowiki::geowiki_base_path $geowiki_scripts_path = $misc::statistics::geowiki::geowiki_scripts_path -$geowiki_data_path = '/a/geowiki-data' +$geowiki_data_path = "${geowiki_base_path}/data" $geowiki_mysql_research_conf_file = $misc::statistics::geowiki::mysql::conf::research::conf_file git::clone { 'geowiki-data': -- To view, visit https://gerrit.wikimedia.org/r/94296 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcab3257be74d8d3735985290291df2fdc056115 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor to wmf3 branch for cherry-pick - change (mediawiki/core)
Catrope has submitted this change and it was merged. Change subject: Update VisualEditor to wmf3 branch for cherry-pick .. Update VisualEditor to wmf3 branch for cherry-pick Change-Id: If106fadf0d861fed580c11338da47d61573648bf --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Catrope: Verified; Looks good to me, approved diff --git a/extensions/VisualEditor b/extensions/VisualEditor index ca2a7ce..15f1cb0 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit ca2a7ce38fd7b81f4b4edf9cc3fcb8e8e582e5aa +Subproject commit 15f1cb094f566b52129dce146601c834af85c385 -- To view, visit https://gerrit.wikimedia.org/r/94287 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If106fadf0d861fed580c11338da47d61573648bf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.23wmf3 Gerrit-Owner: Catrope Gerrit-Reviewer: Catrope ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor to wmf3 branch for cherry-pick - change (mediawiki/core)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/94287 Change subject: Update VisualEditor to wmf3 branch for cherry-pick .. Update VisualEditor to wmf3 branch for cherry-pick Change-Id: If106fadf0d861fed580c11338da47d61573648bf --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/87/94287/1 diff --git a/extensions/VisualEditor b/extensions/VisualEditor index ca2a7ce..15f1cb0 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit ca2a7ce38fd7b81f4b4edf9cc3fcb8e8e582e5aa +Subproject commit 15f1cb094f566b52129dce146601c834af85c385 -- To view, visit https://gerrit.wikimedia.org/r/94287 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If106fadf0d861fed580c11338da47d61573648bf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.23wmf3 Gerrit-Owner: Catrope ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a whole bunch of new ve.track() events for instrumenting... - change (mediawiki...VisualEditor)
Catrope has submitted this change and it was merged. Change subject: Add a whole bunch of new ve.track() events for instrumenting loading and saving .. Add a whole bunch of new ve.track() events for instrumenting loading and saving Renamed events: * performance.domLoad --> performance.system.domLoad * performance.domSave --> performance.system.domSave New events: * performance.system.activation: total load time * performance.system.domDiff: timing of paction=diff; like .domSave * performance.system.domSerialize: timing of paction=serialize; like .domSave * behavior.lastTransactionTillSaveDialogOpen: time from last transaction until user opened save dialog * behavior.saveDialogOpenTillSave: time from save dialog opening to user clicking save * behavior.saveDialogOpenTillReview: time from save dialog opening to user clicking review (skipped when a cached diff is shown) * behavior.saveDialogClose: when user closes save dialog; duration is time * performance.user.saveComplete: time from user clicking save to successful save completion; 'retries' indicates # of badtoken retries * performance.user.saveError.*: time from user clicking save to failure; 'retries' indicates # of badtoken retries ** performance.user.saveError.abusefilter ** performance.user.saveError.badtoken: token was bad and we prompted the user ** performance.user.saveError.captcha ** performance.user.saveError.editconflict ** performance.user.saveError.empty ** performance.user.saveError.spamblacklist ** performance.user.saveError.unknown * performance.user.reviewComplete: time from user clicking review to diff showing * performance.user.reviewError: time from user clicking review to diff failure since dialog was opened Change-Id: I9815fa637d34c766c163e181d2f9527d3f32a7c3 (cherry picked from commit d6a00d689e41340d5737d1443e501243540b8c44) --- M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js M modules/ve-mw/init/ve.init.mw.Target.js 2 files changed, 82 insertions(+), 3 deletions(-) Approvals: Catrope: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index 55459c5..1f95677 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -37,6 +37,7 @@ this.saveDialog = null; this.onBeforeUnloadFallback = null; this.onBeforeUnloadHandler = null; + this.timings = {}; this.active = false; this.edited = false; this.sanityCheckFinished = false; @@ -149,6 +150,7 @@ ve.init.mw.ViewPageTarget.prototype.activate = function () { if ( !this.active && !this.activating ) { this.activating = true; + this.timings.activationStart = ve.now(); // User interface changes this.transformPage(); @@ -238,6 +240,7 @@ if ( mw.config.get( 'wgVisualEditorConfig' ).showBetaWelcome ) { this.showBetaWelcome(); } + ve.track( 'performance.system.activation', { 'duration': ve.now() - this.timings.activationStart } ); mw.hook( 've.activationComplete' ).fire(); }, this ) ); } @@ -288,6 +291,7 @@ * @param {number} [newid] New revision id, undefined if unchanged */ ve.init.mw.ViewPageTarget.prototype.onSave = function ( html, newid ) { + ve.track( 'performance.user.saveComplete', { 'duration': ve.now() - this.timings.saveDialogSave } ); if ( !this.pageExists || this.restoring ) { // This is a page creation or restoration, refresh the page this.tearDownBeforeUnloadHandler(); @@ -345,6 +349,10 @@ */ ve.init.mw.ViewPageTarget.prototype.onSaveError = function ( jqXHR, status, data ) { var api, editApi, + trackData = { + 'duration': ve.now() - this.timings.saveDialogSave, + 'retries': this.timings.saveRetries + }, viewPage = this; this.saveDialog.saveButton.setDisabled( false ); @@ -354,6 +362,7 @@ // Handle empty response if ( !data ) { + ve.track( 'performance.user.saveError.empty', trackData ); this.saveDialog.showMessage( 'api-save-error', ve.msg( 'visualeditor-saveerror', 'Empty server response' ), @@ -369,6 +378,7 @@ // Handle spam blacklist error (either from core or from Extension:SpamBlacklist) if ( editApi && editApi.spamblacklist ) { + ve.track( 'performance.user.saveError.spamblacklist', trackData ); this.saveDialog.showMessage( 'api-save-error',
[MediaWiki-commits] [Gerrit] Remove exclusive module group to reduce HTTP request fragmen... - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Remove exclusive module group to reduce HTTP request fragmentation .. Remove exclusive module group to reduce HTTP request fragmentation Cache groups should only be used when it is worth to have the module(s) in a separate request. Echo is relatively small and stable in terms of cache combination, not worth it to force its modules to be in a separate http request as all other modules. Change-Id: I198b5664d662c93c593d048efcfaf4aac765a6b9 --- M Echo.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/Echo.php b/Echo.php index 660e9df..ab502c8 100644 --- a/Echo.php +++ b/Echo.php @@ -137,7 +137,6 @@ $echoResourceTemplate = array( 'localBasePath' => $dir . 'modules', 'remoteExtPath' => 'Echo/modules', - 'group' => 'ext.echo', ); $wgResourceModules += array( -- To view, visit https://gerrit.wikimedia.org/r/93053 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I198b5664d662c93c593d048efcfaf4aac765a6b9 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Catrope Gerrit-Reviewer: Kaldari Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: Werdna Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable DatabaseBase constructor - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Disable DatabaseBase constructor .. Disable DatabaseBase constructor Broke in I094185585dc844ca4d2d8b629107b2ab8f9bef39 Change-Id: I9ef09cfef07906cc5034a56f9b27eccd79f0d4ad --- M tests/BatchRowUpdateTest.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/BatchRowUpdateTest.php b/tests/BatchRowUpdateTest.php index e08517d..5f506e9 100644 --- a/tests/BatchRowUpdateTest.php +++ b/tests/BatchRowUpdateTest.php @@ -232,7 +232,7 @@ protected function mockDb() { // Cant mock from DatabaseType or DatabaseBase, they dont // have the full gamut of methods - return $this->getMock( 'DatabaseMysql' ); + return $this->getMockBuilder( 'DatabaseMysql' )->disableOriginalConstructor()->getMock(); } } -- To view, visit https://gerrit.wikimedia.org/r/94282 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9ef09cfef07906cc5034a56f9b27eccd79f0d4ad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add .jshintrc - change (oojs/ui)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/94286 Change subject: Add .jshintrc .. Add .jshintrc Change-Id: I361d7913621a737ea139b2ca53fd6f568d721af4 --- A .jshintrc 1 file changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/86/94286/1 diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..84f5a54 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,33 @@ +{ + // Enforcing + "bitwise": true, + "camelcase": true, + "curly": true, + "eqeqeq": true, + "forin": false, + "immed": true, + "latedef": true, + "newcap": true, + "noarg": true, + "noempty": true, + "nonew": true, + "plusplus": false, + "quotmark": "single", + "regexp": true, + "strict": false, + "trailing": true, + "undef": true, + "unused": true, + // Relaxing + "multistr": true, + "smarttabs": true, + // Legacy + "nomen": true, + "onevar": true, + + "globals": { + "OO": true, + "oo": false, + "QUnit": false + } +} -- To view, visit https://gerrit.wikimedia.org/r/94286 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I361d7913621a737ea139b2ca53fd6f568d721af4 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Catrope ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] 'Main Page' might not exist, use localized name - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: 'Main Page' might not exist, use localized name .. 'Main Page' might not exist, use localized name Change-Id: I6b034b3ebb9978749e91f5f3bd6e862bdd2acf91 --- M includes/CirrusSearchUpdatePagesJob.php 1 file changed, 3 insertions(+), 4 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CirrusSearchUpdatePagesJob.php b/includes/CirrusSearchUpdatePagesJob.php index 393c281..356d365 100644 --- a/includes/CirrusSearchUpdatePagesJob.php +++ b/includes/CirrusSearchUpdatePagesJob.php @@ -20,15 +20,14 @@ */ class CirrusSearchUpdatePagesJob extends Job { public static function build( $revisions, $checkFreshness ) { - // We don't have a "title" for this job so we use the Main Page because it exists. - $title = Title::newFromText( 'Main Page' ); - // Strip $revisions down to page ids so we don't put a ton of stuff in the job queue. $pageIds = array(); foreach ( $revisions as $rev ) { $pageIds[] = $rev[ 'id' ]; } - return new CirrusSearchUpdatePagesJob( $title, array( + + // We don't have a "title" for this job so we use the Main Page because it exists. + return new CirrusSearchUpdatePagesJob( Title::newMainPage(), array( 'pageIds' => $pageIds, 'checkFreshness' => $checkFreshness, ) ); -- To view, visit https://gerrit.wikimedia.org/r/94281 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b034b3ebb9978749e91f5f3bd6e862bdd2acf91 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Chad Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a whole bunch of new ve.track() events for instrumenting... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Add a whole bunch of new ve.track() events for instrumenting loading and saving .. Add a whole bunch of new ve.track() events for instrumenting loading and saving Renamed events: * performance.domLoad --> performance.system.domLoad * performance.domSave --> performance.system.domSave New events: * performance.system.activation: total load time * performance.system.domDiff: timing of paction=diff; like .domSave * performance.system.domSerialize: timing of paction=serialize; like .domSave * behavior.lastTransactionTillSaveDialogOpen: time from last transaction until user opened save dialog * behavior.saveDialogOpenTillSave: time from save dialog opening to user clicking save * behavior.saveDialogOpenTillReview: time from save dialog opening to user clicking review (skipped when a cached diff is shown) * behavior.saveDialogClose: when user closes save dialog; duration is time * performance.user.saveComplete: time from user clicking save to successful save completion; 'retries' indicates # of badtoken retries * performance.user.saveError.*: time from user clicking save to failure; 'retries' indicates # of badtoken retries ** performance.user.saveError.abusefilter ** performance.user.saveError.badtoken: token was bad and we prompted the user ** performance.user.saveError.captcha ** performance.user.saveError.editconflict ** performance.user.saveError.empty ** performance.user.saveError.spamblacklist ** performance.user.saveError.unknown * performance.user.reviewComplete: time from user clicking review to diff showing * performance.user.reviewError: time from user clicking review to diff failure since dialog was opened Change-Id: I9815fa637d34c766c163e181d2f9527d3f32a7c3 --- M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js M modules/ve-mw/init/ve.init.mw.Target.js 2 files changed, 82 insertions(+), 3 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index d02282d..10e7c88 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -37,6 +37,7 @@ this.saveDialog = null; this.onBeforeUnloadFallback = null; this.onBeforeUnloadHandler = null; + this.timings = {}; this.active = false; this.edited = false; this.sanityCheckFinished = false; @@ -149,6 +150,7 @@ ve.init.mw.ViewPageTarget.prototype.activate = function () { if ( !this.active && !this.activating ) { this.activating = true; + this.timings.activationStart = ve.now(); // User interface changes this.transformPage(); @@ -238,6 +240,7 @@ if ( mw.config.get( 'wgVisualEditorConfig' ).showBetaWelcome ) { this.showBetaWelcome(); } + ve.track( 'performance.system.activation', { 'duration': ve.now() - this.timings.activationStart } ); mw.hook( 've.activationComplete' ).fire(); }, this ) ); } @@ -288,6 +291,7 @@ * @param {number} [newid] New revision id, undefined if unchanged */ ve.init.mw.ViewPageTarget.prototype.onSave = function ( html, newid ) { + ve.track( 'performance.user.saveComplete', { 'duration': ve.now() - this.timings.saveDialogSave } ); if ( !this.pageExists || this.restoring ) { // This is a page creation or restoration, refresh the page this.tearDownBeforeUnloadHandler(); @@ -345,6 +349,10 @@ */ ve.init.mw.ViewPageTarget.prototype.onSaveError = function ( jqXHR, status, data ) { var api, editApi, + trackData = { + 'duration': ve.now() - this.timings.saveDialogSave, + 'retries': this.timings.saveRetries + }, viewPage = this; this.saveDialog.saveButton.setDisabled( false ); @@ -354,6 +362,7 @@ // Handle empty response if ( !data ) { + ve.track( 'performance.user.saveError.empty', trackData ); this.saveDialog.showMessage( 'api-save-error', ve.msg( 'visualeditor-saveerror', 'Empty server response' ), @@ -369,6 +378,7 @@ // Handle spam blacklist error (either from core or from Extension:SpamBlacklist) if ( editApi && editApi.spamblacklist ) { + ve.track( 'performance.user.saveError.spamblacklist', trackData ); this.saveDialog.showMessage( 'api-save-error', // TODO: Use mediawiki.language equivalant of Language.php::listToText
[MediaWiki-commits] [Gerrit] auto-expand text-area as content grows - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/94285 Change subject: auto-expand text-area as content grows .. auto-expand text-area as content grows Change-Id: Id690ba0462812ed1eaea392ac606cae3f760f626 --- M modules/discussion/ui.js 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/85/94285/1 diff --git a/modules/discussion/ui.js b/modules/discussion/ui.js index 65869a1..75d62fb 100644 --- a/modules/discussion/ui.js +++ b/modules/discussion/ui.js @@ -286,7 +286,7 @@ } ); } ); - } ); + } ); // Moderated posts need click to display content $( '' ) @@ -330,5 +330,13 @@ $container.find( '.flow-icon-permalink' ).click( function( e ) { highlightPost( $( this.hash ) ); } ); + + // auto-expand text-area as content grows + $container.find( 'textarea' ).keyup( function() { + var scrollHeight = this.scrollHeight; + if ( scrollHeight > $( this ).height() ) { + $( this ).animate( { height: scrollHeight }, 50 ); + } + } ); } ); } )( jQuery, mediaWiki ); -- To view, visit https://gerrit.wikimedia.org/r/94285 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id690ba0462812ed1eaea392ac606cae3f760f626 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] draining ulsfo of all traffic until TiNet link is confirmed ... - change (operations/dns)
Lcarr has submitted this change and it was merged. Change subject: draining ulsfo of all traffic until TiNet link is confirmed working .. draining ulsfo of all traffic until TiNet link is confirmed working Change-Id: Id7084db7616b14a64e936d4cd026dc384ad676f8 --- M config-geo 1 file changed, 9 insertions(+), 9 deletions(-) Approvals: Lcarr: Verified; Looks good to me, approved diff --git a/config-geo b/config-geo index 6c14ac5..de8f03c 100644 --- a/config-geo +++ b/config-geo @@ -19,24 +19,24 @@ IQ => esams, # Iraq IR => esams, # Iran (Islamic Republic of) JO => esams, # Jordan - JP => ulsfo, # Japan - KH => ulsfo, # Cambodia - KP => ulsfo, # Korea, Democratic People's Republic of - KR => ulsfo, # Korea, Republic of + JP => eqiad, # Japan + KH => eqiad, # Cambodia + KP => eqiad, # Korea, Democratic People's Republic of + KR => eqiad, # Korea, Republic of KW => esams, # Kuwait LA => eqiad, # Lao People's Democratic Republic LB => esams, # Lebanon MN => eqiad, # Mongolia - MY => ulsfo, # Malaysia + MY => eqiad, # Malaysia OM => esams, # Oman - PH => ulsfo, # Philippines + PH => eqiad, # Philippines PS => esams, # Palestine, State of QA => esams, # Qatar SA => esams, # Saudi Arabia - SG => ulsfo, # Singapore + SG => eqiad, # Singapore SY => esams, # Syrian Arab Republic TH => eqiad, # Thailand - TW => ulsfo, # Taiwan, Province of China + TW => eqiad, # Taiwan, Province of China VN => eqiad, # Viet Nam YE => esams, # Yemen }, @@ -165,7 +165,7 @@ YT => eqiad, # Yukon Territory }, }, - OC => ulsfo, + OC => eqiad, default => eqiad, } }, -- To view, visit https://gerrit.wikimedia.org/r/94283 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id7084db7616b14a64e936d4cd026dc384ad676f8 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Lcarr Gerrit-Reviewer: Lcarr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix how 'current' branch is determined in updateBitsBranchPo... - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Fix how 'current' branch is determined in updateBitsBranchPointers .. Fix how 'current' branch is determined in updateBitsBranchPointers updateBitsBranchPointers should determine 'current' by globbing directory names in /a/common, not /usr/local/apache/common-local, since the new branch is not there yet when updateBitsBranchPointers is called from checkoutMediaWiki. Change-Id: I1e6c5a3b8f29a7cfacc30e6bb4220311850580a2 --- M multiversion/updateBitsBranchPointers 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/multiversion/updateBitsBranchPointers b/multiversion/updateBitsBranchPointers index 0cfbb7d..556a787 100755 --- a/multiversion/updateBitsBranchPointers +++ b/multiversion/updateBitsBranchPointers @@ -20,10 +20,10 @@ } function updateBitsBranchPointers( $dryRun = false ) { - $branchDirs = glob( MULTIVER_COMMON_APACHE . '/php-*', GLOB_ONLYDIR ); + $branchDirs = glob( MULTIVER_COMMON_HOME . '/php-*', GLOB_ONLYDIR ); if ( !is_array( $branchDirs ) || count( $branchDirs ) < 1 ) { - fwrite( STDERR, __FUNCTION__ . ': no deployment branch directories found in ' . MULTIVER_COMMON_APACHE . "\n" ); + fwrite( STDERR, __FUNCTION__ . ': no deployment branch directories found in ' . MULTIVER_COMMON_HOME . "\n" ); exit( 1 ); } -- To view, visit https://gerrit.wikimedia.org/r/94280 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1e6c5a3b8f29a7cfacc30e6bb4220311850580a2 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Krinkle 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] draining ulsfo of all traffic until TiNet link is confirmed ... - change (operations/dns)
Lcarr has uploaded a new change for review. https://gerrit.wikimedia.org/r/94283 Change subject: draining ulsfo of all traffic until TiNet link is confirmed working .. draining ulsfo of all traffic until TiNet link is confirmed working Change-Id: Id7084db7616b14a64e936d4cd026dc384ad676f8 --- M config-geo 1 file changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/83/94283/1 diff --git a/config-geo b/config-geo index 6c14ac5..de8f03c 100644 --- a/config-geo +++ b/config-geo @@ -19,24 +19,24 @@ IQ => esams, # Iraq IR => esams, # Iran (Islamic Republic of) JO => esams, # Jordan - JP => ulsfo, # Japan - KH => ulsfo, # Cambodia - KP => ulsfo, # Korea, Democratic People's Republic of - KR => ulsfo, # Korea, Republic of + JP => eqiad, # Japan + KH => eqiad, # Cambodia + KP => eqiad, # Korea, Democratic People's Republic of + KR => eqiad, # Korea, Republic of KW => esams, # Kuwait LA => eqiad, # Lao People's Democratic Republic LB => esams, # Lebanon MN => eqiad, # Mongolia - MY => ulsfo, # Malaysia + MY => eqiad, # Malaysia OM => esams, # Oman - PH => ulsfo, # Philippines + PH => eqiad, # Philippines PS => esams, # Palestine, State of QA => esams, # Qatar SA => esams, # Saudi Arabia - SG => ulsfo, # Singapore + SG => eqiad, # Singapore SY => esams, # Syrian Arab Republic TH => eqiad, # Thailand - TW => ulsfo, # Taiwan, Province of China + TW => eqiad, # Taiwan, Province of China VN => eqiad, # Viet Nam YE => esams, # Yemen }, @@ -165,7 +165,7 @@ YT => eqiad, # Yukon Territory }, }, - OC => ulsfo, + OC => eqiad, default => eqiad, } }, -- To view, visit https://gerrit.wikimedia.org/r/94283 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7084db7616b14a64e936d4cd026dc384ad676f8 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Lcarr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable DatabaseBase constructor - change (mediawiki...Echo)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/94282 Change subject: Disable DatabaseBase constructor .. Disable DatabaseBase constructor Broke in I094185585dc844ca4d2d8b629107b2ab8f9bef39 Change-Id: I9ef09cfef07906cc5034a56f9b27eccd79f0d4ad --- M tests/BatchRowUpdateTest.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/82/94282/1 diff --git a/tests/BatchRowUpdateTest.php b/tests/BatchRowUpdateTest.php index e08517d..5f506e9 100644 --- a/tests/BatchRowUpdateTest.php +++ b/tests/BatchRowUpdateTest.php @@ -232,7 +232,7 @@ protected function mockDb() { // Cant mock from DatabaseType or DatabaseBase, they dont // have the full gamut of methods - return $this->getMock( 'DatabaseMysql' ); + return $this->getMockBuilder( 'DatabaseMysql' )->disableOriginalConstructor()->getMock(); } } -- To view, visit https://gerrit.wikimedia.org/r/94282 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ef09cfef07906cc5034a56f9b27eccd79f0d4ad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo 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] FormOptions: Implement FLOAT type - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: FormOptions: Implement FLOAT type .. FormOptions: Implement FLOAT type Also added WebRequest#getFloat(). Change-Id: I854f09bd26287880a2806852274471904bc33092 --- M includes/FormOptions.php M includes/WebRequest.php M tests/phpunit/includes/FormOptionsTest.php 3 files changed, 52 insertions(+), 10 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/FormOptions.php b/includes/FormOptions.php index 54822e3..cd6e207 100644 --- a/includes/FormOptions.php +++ b/includes/FormOptions.php @@ -4,6 +4,7 @@ * * Copyright © 2008, Niklas Laxström * Copyright © 2011, Antoine Musso + * Copyright © 2013, Bartosz Dziewoński * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,6 +43,9 @@ const STRING = 0; /** Integer type, maps guessType() to WebRequest::getInt() */ const INT = 1; + /** Float type, maps guessType() to WebRequest::getFloat() + * @since 1.23 */ + const FLOAT = 4; /** Boolean type, maps guessType() to WebRequest::getBool() */ const BOOL = 2; /** Integer type or null, maps to WebRequest::getIntOrNull() @@ -112,6 +116,8 @@ return self::BOOL; } elseif ( is_int( $data ) ) { return self::INT; + } elseif ( is_float( $data ) ) { + return self::FLOAT; } elseif ( is_string( $data ) ) { return self::STRING; } else { @@ -234,19 +240,29 @@ } /** -* Validate and set an option integer value -* The value will be altered to fit in the range. -* -* @param string $name option name -* @param int $min minimum value -* @param int $max maximum value -* @throws MWException If option is not of type INT +* @see validateBounds() */ public function validateIntBounds( $name, $min, $max ) { - $this->validateName( $name, true ); + $this->validateBounds( $name, $min, $max ); + } - if ( $this->options[$name]['type'] !== self::INT ) { - throw new MWException( "Option $name is not of type int" ); + /** +* Constrain a numeric value for a given option to a given range. The value will be altered to fit +* in the range. +* +* @since 1.23 +* +* @param string $name Option name +* @param int|float $min Minimum value +* @param int|float $max Maximum value +* @throws MWException If option is not of type INT +*/ + public function validateBounds( $name, $min, $max ) { + $this->validateName( $name, true ); + $type = $this->options[$name]['type']; + + if ( $type !== self::INT && $type !== self::FLOAT ) { + throw new MWException( "Option $name is not of type INT or FLOAT" ); } $value = $this->getValueReal( $this->options[$name] ); @@ -333,6 +349,9 @@ case self::INT: $value = $r->getInt( $name, $default ); break; + case self::FLOAT: + $value = $r->getFloat( $name, $default ); + break; case self::STRING: $value = $r->getText( $name, $default ); break; diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 462b312..4ad7344 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -481,6 +481,20 @@ } /** +* Fetch a floating point value from the input or return $default if not set. +* Guaranteed to return a float; non-numeric input will typically +* return 0. +* +* @since 1.23 +* @param $name String +* @param $default Float +* @return Float +*/ + public function getFloat( $name, $default = 0 ) { + return floatval( $this->getVal( $name, $default ) ); + } + + /** * Fetch a boolean value from the input or return $default if not set. * Guaranteed to return true or false, with normal PHP semantics for * boolean interpretation of strings. diff --git a/tests/phpunit/includes/FormOptionsTest.php b/tests/phpunit/includes/FormOptionsTest.php index 08d6ba8..665fa39 100644 --- a/tests/phpunit/includes/FormOptionsTest.php +++ b/tests/phpunit/includes/FormOptionsTest.php @@ -34,6 +34,7 @@
[MediaWiki-commits] [Gerrit] Main Page might not exist - change (mediawiki...CirrusSearch)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/94281 Change subject: Main Page might not exist .. Main Page might not exist Change-Id: I6b034b3ebb9978749e91f5f3bd6e862bdd2acf91 --- M includes/CirrusSearchUpdatePagesJob.php 1 file changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/81/94281/1 diff --git a/includes/CirrusSearchUpdatePagesJob.php b/includes/CirrusSearchUpdatePagesJob.php index 393c281..356d365 100644 --- a/includes/CirrusSearchUpdatePagesJob.php +++ b/includes/CirrusSearchUpdatePagesJob.php @@ -20,15 +20,14 @@ */ class CirrusSearchUpdatePagesJob extends Job { public static function build( $revisions, $checkFreshness ) { - // We don't have a "title" for this job so we use the Main Page because it exists. - $title = Title::newFromText( 'Main Page' ); - // Strip $revisions down to page ids so we don't put a ton of stuff in the job queue. $pageIds = array(); foreach ( $revisions as $rev ) { $pageIds[] = $rev[ 'id' ]; } - return new CirrusSearchUpdatePagesJob( $title, array( + + // We don't have a "title" for this job so we use the Main Page because it exists. + return new CirrusSearchUpdatePagesJob( Title::newMainPage(), array( 'pageIds' => $pageIds, 'checkFreshness' => $checkFreshness, ) ); -- To view, visit https://gerrit.wikimedia.org/r/94281 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b034b3ebb9978749e91f5f3bd6e862bdd2acf91 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set visibility for class property of RegexlikeReplacer - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Set visibility for class property of RegexlikeReplacer .. Set visibility for class property of RegexlikeReplacer Only used in StringUtils::delimiterReplace(). Search core and 600+ extensions. Change-Id: Ibbf0edd1143f7bd2dc39e9ad913d1e4a38f60dfc --- M includes/utils/StringUtils.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/utils/StringUtils.php b/includes/utils/StringUtils.php index 5f19e1c..9cd3d3f 100644 --- a/includes/utils/StringUtils.php +++ b/includes/utils/StringUtils.php @@ -333,7 +333,7 @@ * Class to replace regex matches with a string similar to that used in preg_replace() */ class RegexlikeReplacer extends Replacer { - var $r; + private $r; /** * @param string $r -- To view, visit https://gerrit.wikimedia.org/r/94255 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibbf0edd1143f7bd2dc39e9ad913d1e4a38f60dfc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand Gerrit-Reviewer: Chad Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot Gerrit-Reviewer: テスト ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set visibility on class properties of ExplodeIterator - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Set visibility on class properties of ExplodeIterator .. Set visibility on class properties of ExplodeIterator Set to private. Only used in StringUtils::explode(). Searched core and 600+ extensions. Change-Id: Idbf981d1864f45bbb4adce08803dc693d9a5c200 --- M includes/utils/StringUtils.php 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/utils/StringUtils.php b/includes/utils/StringUtils.php index c506a76..5f19e1c 100644 --- a/includes/utils/StringUtils.php +++ b/includes/utils/StringUtils.php @@ -525,19 +525,19 @@ */ class ExplodeIterator implements Iterator { // The subject string - var $subject, $subjectLength; + private $subject, $subjectLength; // The delimiter - var $delim, $delimLength; + private $delim, $delimLength; // The position of the start of the line - var $curPos; + private $curPos; // The position after the end of the next delimiter - var $endPos; + private $endPos; // The current token - var $current; + private $current; /** * Construct a DelimIterator -- To view, visit https://gerrit.wikimedia.org/r/94254 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idbf981d1864f45bbb4adce08803dc693d9a5c200 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand Gerrit-Reviewer: Chad Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix how 'current' branch is determined in updateBitsBranchPo... - change (operations/mediawiki-config)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/94280 Change subject: Fix how 'current' branch is determined in updateBitsBranchPointers .. Fix how 'current' branch is determined in updateBitsBranchPointers updateBitsBranchPointers should determine 'current' by globbing directory names in /a/common, not /usr/local/apache/common-local, since the new branch is not there yet when updateBitsBranchPointers is called from checkoutMediaWiki. Change-Id: I1e6c5a3b8f29a7cfacc30e6bb4220311850580a2 --- M multiversion/updateBitsBranchPointers 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/80/94280/1 diff --git a/multiversion/updateBitsBranchPointers b/multiversion/updateBitsBranchPointers index 0cfbb7d..556a787 100755 --- a/multiversion/updateBitsBranchPointers +++ b/multiversion/updateBitsBranchPointers @@ -20,10 +20,10 @@ } function updateBitsBranchPointers( $dryRun = false ) { - $branchDirs = glob( MULTIVER_COMMON_APACHE . '/php-*', GLOB_ONLYDIR ); + $branchDirs = glob( MULTIVER_COMMON_HOME . '/php-*', GLOB_ONLYDIR ); if ( !is_array( $branchDirs ) || count( $branchDirs ) < 1 ) { - fwrite( STDERR, __FUNCTION__ . ': no deployment branch directories found in ' . MULTIVER_COMMON_APACHE . "\n" ); + fwrite( STDERR, __FUNCTION__ . ': no deployment branch directories found in ' . MULTIVER_COMMON_HOME . "\n" ); exit( 1 ); } -- To view, visit https://gerrit.wikimedia.org/r/94280 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e6c5a3b8f29a7cfacc30e6bb4220311850580a2 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set visibility on class properties of ReplacementArray - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Set visibility on class properties of ReplacementArray .. Set visibility on class properties of ReplacementArray Usages in: Core: * HtmlFormatter: No referenced properties. * Language: No referenced properties. * LanguageConverter subclasses: I think there are no referenced properties here, but not 100% certain. * Tidy: No referenced properties. Extensions: * AbuseFilter: No referenced properties. * LiquidThreads: No referenced properties. * Transliterator: No referenced properties. * WYSIWIG: No referenced properties. Change-Id: I1b2e3360468cbfc803ab884f999437e9b8c3758d --- M includes/utils/StringUtils.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/utils/StringUtils.php b/includes/utils/StringUtils.php index 68f6fd7..c506a76 100644 --- a/includes/utils/StringUtils.php +++ b/includes/utils/StringUtils.php @@ -409,8 +409,8 @@ * Supports lazy initialisation of FSS resource */ class ReplacementArray { - /*mostly private*/ var $data = false; - /*mostly private*/ var $fss = false; + private $data = false; + private $fss = false; /** * Create an object with the specified replacement array -- To view, visit https://gerrit.wikimedia.org/r/94253 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b2e3360468cbfc803ab884f999437e9b8c3758d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand Gerrit-Reviewer: Chad Gerrit-Reviewer: Hashar Gerrit-Reviewer: NormalUser Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change all Exception for MWException - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Change all Exception for MWException .. Change all Exception for MWException Change-Id: I427009c9d8bdd30c1a031613e43ee61dc582fa31 --- M DATA_ABSTRACTION M includes/Block/Topic.php M includes/Data/BoardHistoryStorage.php M includes/Data/RevisionStorage.php M includes/Data/RootPostLoader.php M includes/Model/AbstractRevision.php M includes/Model/Definition.php M includes/Model/TopicListEntry.php M includes/Model/Workflow.php M includes/Repository/SelectQueryBuilder.php M includes/Repository/TreeRepository.php M includes/TalkpageManager.php 12 files changed, 28 insertions(+), 27 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/DATA_ABSTRACTION b/DATA_ABSTRACTION index 54ff14a..b208f75 100644 --- a/DATA_ABSTRACTION +++ b/DATA_ABSTRACTION @@ -308,7 +308,7 @@ $handler->onPostLoad( $this, $object ); } return $object; - } catch ( \Exception $e ) { + } catch ( \MWException $e ) { ... } } @@ -320,7 +320,7 @@ } $data = $this->mapper->serialize( $object ); $this->storage->put( $data ) ); - } catch ( \Exception $e ) { + } catch ( \MWException $e ) { ... } }; diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php index 1fcd240..f3c1c06 100644 --- a/includes/Block/Topic.php +++ b/includes/Block/Topic.php @@ -118,7 +118,7 @@ } else { $topicTitle = $this->loadTopicTitle(); if ( !$topicTitle ) { - throw new \Exception( 'No revision associated with workflow?' ); + throw new \MWException( 'No revision associated with workflow?' ); } if ( !$this->permissions->isAllowed( $topicTitle, 'edit-title' ) ) { $this->errors['permissions'] = wfMessage( 'flow-error-not-allowed' ); @@ -422,7 +422,7 @@ protected function renderEditPost( Templating $templating, array $options, $return = false ) { if ( !isset( $options['postId'] ) ) { - throw new \Exception( 'No postId provided' ); + throw new \MWException( 'No postId provided' ); } $post = $this->loadRequestedPost( $options['postId'] ); if ( !$this->permissions->isAllowed( $post, 'edit-post' ) ) { diff --git a/includes/Data/BoardHistoryStorage.php b/includes/Data/BoardHistoryStorage.php index 0a16615..4e91818 100644 --- a/includes/Data/BoardHistoryStorage.php +++ b/includes/Data/BoardHistoryStorage.php @@ -102,7 +102,7 @@ public function __construct( BufferedCache $cache, BoardHistoryStorage $storage, $prefix, array $indexed, array $options = array() ) { if ( $indexed !== array( 'topic_list_id' ) ) { - throw new \Exception( __CLASS__ . ' is hardcoded to only index topic_list_id: ' . print_r( $indexed, true ) ); + throw new \MWException( __CLASS__ . ' is hardcoded to only index topic_list_id: ' . print_r( $indexed, true ) ); } parent::__construct( $cache, $storage, $prefix, $indexed, $options ); } diff --git a/includes/Data/RevisionStorage.php b/includes/Data/RevisionStorage.php index c8847af..2540e16 100644 --- a/includes/Data/RevisionStorage.php +++ b/includes/Data/RevisionStorage.php @@ -135,7 +135,7 @@ ); if ( !$res ) { // TODO: dont fail, but dont end up caching bad result either - throw new \Exception( 'query failure' ); + throw new \MWException( 'query failure' ); } $revisionIds = array(); @@ -160,7 +160,7 @@ ); if ( !$res ) { // TODO: dont fail, but dont end up caching bad result either - throw new \Exception( 'query failure' ); + throw new \MWException( 'query failure' ); } $result = array(); @@ -453,7 +453,7 @@ public function __construct( BufferedCache $cache, PostRevisionStorage $storage, TreeRepository $treeRepo, $prefix, array $indexed, array $options = array() ) { if ( $indexed !== array( 'topic_root' ) ) { - throw new \Exception( __CLASS__ . ' is hardcoded to only index topic_root: ' . print_r
[MediaWiki-commits] [Gerrit] Restrict Verified/Submit to JenkinsBot and l10n-bot - change (oojs/ui)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/94279 Change subject: Restrict Verified/Submit to JenkinsBot and l10n-bot .. Restrict Verified/Submit to JenkinsBot and l10n-bot Change-Id: I17bdf6fed16db1a7775b79994474fe70453fc4a5 --- A groups M project.config 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/79/94279/1 diff --git a/groups b/groups new file mode 100644 index 000..1022c06 --- /dev/null +++ b/groups @@ -0,0 +1,5 @@ +# UUID Group Name +# +global:Registered-UsersRegistered Users +2bc47fcadf4e44ec9a1a73bcfa06232554f47ce2 JenkinsBot +cc37d98e3a4301744a0c0a9249173ae170696072 l10n-bot diff --git a/project.config b/project.config index 54c7676..7406f2c 100644 --- a/project.config +++ b/project.config @@ -3,3 +3,11 @@ [project] state = active description = Object-oriented UI widget library +[access "refs/heads/master"] + exclusiveGroupPermissions = label-Verified submit + label-Verified = -1..+0 group Registered Users + label-Verified = -1..+2 group JenkinsBot + label-Verified = -1..+2 group l10n-bot + submit = deny group Registered Users + submit = group JenkinsBot + submit = group l10n-bot -- To view, visit https://gerrit.wikimedia.org/r/94279 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I17bdf6fed16db1a7775b79994474fe70453fc4a5 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: refs/meta/config Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Restrict Verified/Submit to JenkinsBot and l10n-bot - change (oojs/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/94278 Change subject: Restrict Verified/Submit to JenkinsBot and l10n-bot .. Restrict Verified/Submit to JenkinsBot and l10n-bot Change-Id: Id2a12891e34a2eab5a6e5697715a2fe13d471d41 --- A groups M project.config 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/core refs/changes/78/94278/1 diff --git a/groups b/groups new file mode 100644 index 000..1022c06 --- /dev/null +++ b/groups @@ -0,0 +1,5 @@ +# UUID Group Name +# +global:Registered-UsersRegistered Users +2bc47fcadf4e44ec9a1a73bcfa06232554f47ce2 JenkinsBot +cc37d98e3a4301744a0c0a9249173ae170696072 l10n-bot diff --git a/project.config b/project.config index 6bfa725..59bb5e6 100644 --- a/project.config +++ b/project.config @@ -3,3 +3,11 @@ [project] state = active description = Object Oriented JavaScript library +[access "refs/heads/master"] + exclusiveGroupPermissions = label-Verified submit + label-Verified = -1..+0 group Registered Users + label-Verified = -1..+2 group JenkinsBot + label-Verified = -1..+2 group l10n-bot + submit = deny group Registered Users + submit = group JenkinsBot + submit = group l10n-bot -- To view, visit https://gerrit.wikimedia.org/r/94278 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id2a12891e34a2eab5a6e5697715a2fe13d471d41 Gerrit-PatchSet: 1 Gerrit-Project: oojs/core Gerrit-Branch: refs/meta/config Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update static-current symlinks to 1.23wmf3 - change (operations/mediawiki-config)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/94277 Change subject: Update static-current symlinks to 1.23wmf3 .. Update static-current symlinks to 1.23wmf3 These should have been updated to 1.23wmf3 by updateBitsBranchPointers, but they were updated to 1.23wmf2 instead. Reason TBD; just fixing for now. Change-Id: I5a970d209cec773d00f99bc42cd42b57fc20c707 --- M docroot/bits/static-current/extensions M docroot/bits/static-current/resources M docroot/bits/static-current/skins 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/77/94277/1 diff --git a/docroot/bits/static-current/extensions b/docroot/bits/static-current/extensions index a50a95a..452f2aa 12 --- a/docroot/bits/static-current/extensions +++ b/docroot/bits/static-current/extensions @@ -1 +1 @@ -/usr/local/apache/common-local/php-1.23wmf2/extensions \ No newline at end of file +/usr/local/apache/common-local/php-1.23wmf3/extensions \ No newline at end of file diff --git a/docroot/bits/static-current/resources b/docroot/bits/static-current/resources index da40e1a..fb50da5 12 --- a/docroot/bits/static-current/resources +++ b/docroot/bits/static-current/resources @@ -1 +1 @@ -/usr/local/apache/common-local/php-1.23wmf2/resources \ No newline at end of file +/usr/local/apache/common-local/php-1.23wmf3/resources \ No newline at end of file diff --git a/docroot/bits/static-current/skins b/docroot/bits/static-current/skins index ca85527..e6f2faa 12 --- a/docroot/bits/static-current/skins +++ b/docroot/bits/static-current/skins @@ -1 +1 @@ -/usr/local/apache/common-local/php-1.23wmf2/skins \ No newline at end of file +/usr/local/apache/common-local/php-1.23wmf3/skins \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/94277 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a970d209cec773d00f99bc42cd42b57fc20c707 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixes in FlowActions - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Fixes in FlowActions .. Fixes in FlowActions * Header namespace was not correctly used (so Header typehint was assumed as \Header) * Restoring clears out moderatedByUserText, so we have to use userText there Change-Id: I69bfa59313d266c36683079c2792c5f9587a6929 --- M FlowActions.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/FlowActions.php b/FlowActions.php index ad54194..5f0c5a0 100644 --- a/FlowActions.php +++ b/FlowActions.php @@ -1,6 +1,7 @@ 'flow-rev-message-restored-post', 'i18n-params' => array( function ( PostRevision $revision, UrlGenerator $urlGenerator, User $user, Block $block ) { - return $revision->getModeratedByUserText(); + // moderatedByUserText is null for restored (because that + // actually reverts any moderation to MODERATED_NONE) + return $revision->getUserText( $user ); }, function ( PostRevision $revision, UrlGenerator $urlGenerator, User $user, Block $block ) { return $revision->getUserText( $user ); -- To view, visit https://gerrit.wikimedia.org/r/93968 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I69bfa59313d266c36683079c2792c5f9587a6929 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix wikimania2014wiki logo. - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Fix wikimania2014wiki logo. .. Fix wikimania2014wiki logo. Change-Id: Id4726858a61651a7eef01fb0b30ced3f568badff --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index cfd7d34..a274ddb 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -989,7 +989,7 @@ 'wikimania2011wiki' => '//upload.wikimedia.org/wikipedia/commons/thumb/a/a3/Wikimania_2011_logo.svg/135px-Wikimania_2011_logo.svg.png', // bug 48382 'wikimania2012wiki' => '//upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Wikimania_2012_logo.svg/135px-Wikimania_2012_logo.svg.png', // bug 48382 'wikimania2013wiki' => '//upload.wikimedia.org/wikipedia/commons/thumb/5/52/Wikimania_2013_logo.svg/135px-Wikimania_2013_logo.svg.png', // bug 48382 - 'wikimania2014wiki' => '//upload.wikimedia.org/wikipedia/commons/thumb/0/06/Wikimania_2014_Shard_logo_v3_with_logotype_and_date_(small).svg/135px-Wikimania_2014_Shard_logo_v3_with_logotype_and_date_(small).svg.png', // bug 56398 + 'wikimania2014wiki' => '//upload.wikimedia.org/wikipedia/commons/thumb/0/06/Wikimania_2014_Shard_logo_v3_with_logotype_and_date_%28small%29.svg/135px-Wikimania_2014_Shard_logo_v3_with_logotype_and_date_%28small%29.svg.png', // bug 56398 'wikimaniateamwiki' => '//upload.wikimedia.org/wikipedia/commons/thumb/0/07/Wikimania_team_logo.svg/135px-Wikimania_team_logo.svg.png', // bug 48376 ), # @} end of wgLogo -- To view, visit https://gerrit.wikimedia.org/r/94272 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id4726858a61651a7eef01fb0b30ced3f568badff Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config 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] Travis 67.4 / Fix MW 1.23 / DatabaseBase::__construct parame... - change (mediawiki...SemanticMediaWiki)
Mwjames has submitted this change and it was merged. Change subject: Travis 67.4 / Fix MW 1.23 / DatabaseBase::__construct parameter array ... was deprecated 1.22 .. Travis 67.4 / Fix MW 1.23 / DatabaseBase::__construct parameter array ... was deprecated 1.22 1) SMW\Test\SQLStore\PropertiesCollectorTest::testConstructor Use of DatabaseBase::__construct method called without parameter array. was deprecated in MediaWiki 1.22. Change-Id: Ic4495b6ae95a58ffbcbf45bb524f85bd577facae --- M tests/phpunit/includes/storage/sqlstore/PropertiesCollectorTest.php M tests/phpunit/includes/storage/sqlstore/UnusedPropertiesCollectorTest.php M tests/phpunit/includes/storage/sqlstore/WantedPropertiesCollectorTest.php 3 files changed, 19 insertions(+), 55 deletions(-) Approvals: Mwjames: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/includes/storage/sqlstore/PropertiesCollectorTest.php b/tests/phpunit/includes/storage/sqlstore/PropertiesCollectorTest.php index 9621a70..c2249cc 100644 --- a/tests/phpunit/includes/storage/sqlstore/PropertiesCollectorTest.php +++ b/tests/phpunit/includes/storage/sqlstore/PropertiesCollectorTest.php @@ -56,13 +56,9 @@ 'usage_count' => (string)$usageCount // PropertyStatisticsTable assert ctype_digit ); - // Database stub object to make the test independent from any real DB - $connection = $this->getMock( 'DatabaseMysql' ); - - // Override method with expected return objects - $connection->expects( $this->any() ) - ->method( 'select' ) - ->will( $this->returnValue( new FakeResultWrapper( array( (object)$result ) ) ) ); + $connection = $this->newMockBuilder()->newObject( 'DatabaseBase', array( + 'select' => new FakeResultWrapper( array( (object)$result ) ) + ) ); return $connection; } diff --git a/tests/phpunit/includes/storage/sqlstore/UnusedPropertiesCollectorTest.php b/tests/phpunit/includes/storage/sqlstore/UnusedPropertiesCollectorTest.php index e91f4c9..50af1dc 100644 --- a/tests/phpunit/includes/storage/sqlstore/UnusedPropertiesCollectorTest.php +++ b/tests/phpunit/includes/storage/sqlstore/UnusedPropertiesCollectorTest.php @@ -37,34 +37,19 @@ /** * @since 1.9 * -* @return Database -*/ - private function getMockDBConnection( $smwTitle = 'Foo' ) { - - $result = array( - 'smw_title' => $smwTitle, - ); - - // Database stub object to make the test independent from any real DB - $connection = $this->getMock( 'DatabaseMysql' ); - - // Override method with expected return objects - $connection->expects( $this->any() ) - ->method( 'select' ) - ->will( $this->returnValue( new FakeResultWrapper( array( (object)$result ) ) ) ); - - return $connection; - } - - /** -* @since 1.9 -* * @return UnusedPropertiesCollector */ private function newInstance( $smwTitle = 'Foo', $cacheEnabled = false ) { $mockStore = $this->newMockBuilder()->newObject( 'Store' ); - $connection = $this->getMockDBConnection( $smwTitle ); + + $result = array( + 'smw_title' => $smwTitle, + ); + + $connection = $this->newMockBuilder()->newObject( 'DatabaseBase', array( + 'select' => new FakeResultWrapper( array( (object)$result ) ) + ) ); $settings = $this->newSettings( array( 'smwgCacheType' => 'hash', diff --git a/tests/phpunit/includes/storage/sqlstore/WantedPropertiesCollectorTest.php b/tests/phpunit/includes/storage/sqlstore/WantedPropertiesCollectorTest.php index 88f1b14..80ecc33 100644 --- a/tests/phpunit/includes/storage/sqlstore/WantedPropertiesCollectorTest.php +++ b/tests/phpunit/includes/storage/sqlstore/WantedPropertiesCollectorTest.php @@ -36,30 +36,6 @@ /** * @since 1.9 * -* @return Database -*/ - private function getMockDBConnection( $smwTitle = 'Foo', $count = 1 ) { - - // Injection object expected as the DB fetchObject - $result = array( - 'count' => $count, - 'smw_title' => $smwTitle - ); - - // Database stub object to make the test independent from any real DB - $connection = $this->getMock( 'DatabaseMysql' ); - - // Override method with expected return objects - $connection->expects( $this->any() ) - ->
[MediaWiki-commits] [Gerrit] Give the search page a little UI love - change (mediawiki/core)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/94276 Change subject: Give the search page a little UI love .. Give the search page a little UI love Uses mediawiki.ui to make the input field more legible and modern, as well as giving the search button a lovely shade of blue. Screenshot: https://www.mediawiki.org/wiki/File:Search-UI-minor-tweak.png Change-Id: I7fdd9970ed5807df94c04bec1681f33523cad173 --- M includes/specials/SpecialSearch.php 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/76/94276/1 diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index d5a6b29..27f4d40 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -88,7 +88,7 @@ $this->outputHeader(); $out = $this->getOutput(); $out->allowClickjacking(); - $out->addModuleStyles( 'mediawiki.special' ); + $out->addModuleStyles( array( 'mediawiki.special', 'mediawiki.ui' ) ); // Strip underscores from title parameter; most of the time we'll want // text form here. But don't strip underscores from actual text params! @@ -1094,10 +1094,14 @@ $out .= Html::input( 'search', $term, 'search', array( 'id' => $this->profile === 'advanced' ? 'powerSearchText' : 'searchText', 'size' => '50', - 'autofocus' + 'autofocus', + 'class' => 'mw-ui-input', ) ) . "\n"; $out .= Html::hidden( 'fulltext', 'Search' ) . "\n"; - $out .= Xml::submitButton( $this->msg( 'searchbutton' )->text() ) . "\n"; + $out .= Xml::submitButton( + $this->msg( 'searchbutton' )->text(), + array( 'class' => array( 'mw-ui-button', 'mw-ui-primary' ) ) + ) . "\n"; return $out . $this->didYouMeanHtml; } -- To view, visit https://gerrit.wikimedia.org/r/94276 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7fdd9970ed5807df94c04bec1681f33523cad173 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use page-less Parsoid API for Flow - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Use page-less Parsoid API for Flow .. Use page-less Parsoid API for Flow Relevant Parsoid change at https://gerrit.wikimedia.org/r/#/c/91321/ Bug: 55682 Change-Id: I0cbb164f9ec7cb269b77f765bfdadee074b3770c --- M includes/ParsoidUtils.php 1 file changed, 35 insertions(+), 29 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ParsoidUtils.php b/includes/ParsoidUtils.php index f015847..970a437 100644 --- a/includes/ParsoidUtils.php +++ b/includes/ParsoidUtils.php @@ -19,7 +19,7 @@ try { // use VE API (which connects to Parsoid) if available... return self::parsoid( $from, $to, $content ); - } catch ( \Exception $e ) { + } catch ( NoParsoidException $e ) { // ... otherwise default to parser return self::parser( $from, $to, $content ); } @@ -36,44 +36,47 @@ * @return string */ protected static function parsoid( $from, $to, $content ) { - if ( !class_exists( 'ApiVisualEditor' ) ) { - throw new \MWException( 'VisualEditor is unavailable' ); + global $wgVisualEditorParsoidURL, $wgVisualEditorParsoidPrefix, $wgVisualEditorParsoidTimeout; + + if ( ! isset( $wgVisualEditorParsoidURL ) || ! $wgVisualEditorParsoidURL ) { + throw new NoParsoidException( "VisualEditor parsoid configuration is unavailable" ); } - if ( $to === 'html' ) { - $action = 'parsefragment'; - } elseif ( $to === 'wikitext' ) { - $action = 'serialize'; + if ( $from == 'html' ) { + $from = 'html'; + } elseif ( in_array( $from, array( 'wt', 'wikitext' ) ) ) { + $from = 'wt'; } else { - throw new \MWException( 'Unknown format: '. $to ); + throw new \MWException( 'Unknown source format: ' . $from ); } - global $wgRequest; - $params = new \DerivativeRequest( - $wgRequest, + $response = \Http::post( + $wgVisualEditorParsoidURL . '/' . $wgVisualEditorParsoidPrefix . '/', array( - 'action' => 'visualeditor', - // Bogus title used for parser - 'page' => \Title::newMainPage()->getPrefixedDBkey(), - // 'basetimestamp' => ?, - // 'starttimestamp' => ?, - 'paction' => $action, - 'oldid' => '', - $from => $content, - ), - true // POST + 'postData' => array( $from => $content ), + 'timeout' => $wgVisualEditorParsoidTimeout + ) ); - wfDebugLog( __CLASS__, __FUNCTION__ . ": Roundtripping parsoid for $from => $to" ); - $api = new \ApiMain( $params, true ); - $api->execute(); - $result = $api->getResultData(); - - if ( !isset( $result['visualeditor']['content'] ) ) { - throw new \MWException( 'Unable to parse content' ); + if ( $response === false ) { + throw new \MWException( 'Failed contacting parsoid' ); } - return $result['visualeditor']['content']; + // Full HTML document is returned, we only want what's inside + if ( $to == 'html' ) { + $dom = new \DOMDocument(); + $dom->loadHTML( $response ); + $body = $dom->getElementsByTagName( 'body' )->item(0); + + $response = ''; + foreach( $body->childNodes as $child ) { + $response .= $child->ownerDocument->saveXML( $child ); + } + } elseif ( !in_array( $to, array( 'wt', 'wikitext' ) ) ) { + throw new \MWException( "Unknown format requested: " . $to ); + } + + return $response; } /** @@ -104,3 +107,6 @@ return $output->getText(); } } + +class NoParsoidExceptions extends \MWException {} + -- To view, visit https://gerrit.wikimedia.org/r/92633 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0cbb164f9ec7cb269b77
[MediaWiki-commits] [Gerrit] Simplify watchlist edit mode handling - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Simplify watchlist edit mode handling .. Simplify watchlist edit mode handling The old "clear" mode has been killed years ago and now acts the same as the "raw" mode. Make SpecialEditWatchlist::getMode() return EDIT_RAW where it would previously return EDIT_CLEAR, simplify handling at call sites, update comments. Change-Id: I1213c83b7040ae500a0299817ee503ab1b5616c6 --- M includes/specials/SpecialEditWatchlist.php M includes/specials/SpecialWatchlist.php 2 files changed, 7 insertions(+), 17 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialEditWatchlist.php b/includes/specials/SpecialEditWatchlist.php index b6005de..b33703d 100644 --- a/includes/specials/SpecialEditWatchlist.php +++ b/includes/specials/SpecialEditWatchlist.php @@ -36,7 +36,8 @@ */ class SpecialEditWatchlist extends UnlistedSpecialPage { /** -* Editing modes +* Editing modes. EDIT_CLEAR is no longer used; the "Clear" link scared people +* too much. Now it's passed on to the raw editor, from which it's very easy to clear. */ const EDIT_CLEAR = 1; const EDIT_RAW = 2; @@ -95,10 +96,6 @@ $mode = self::getMode( $this->getRequest(), $mode ); switch ( $mode ) { - case self::EDIT_CLEAR: - // The "Clear" link scared people too much. - // Pass on to the raw editor, from which it's very easy to clear. - case self::EDIT_RAW: $out->setPageTitle( $this->msg( 'watchlistedit-raw-title' ) ); $form = $this->getRawForm(); @@ -636,7 +633,6 @@ switch ( $mode ) { case 'clear': case self::EDIT_CLEAR: - return self::EDIT_CLEAR; case 'raw': case self::EDIT_RAW: return self::EDIT_RAW; diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 59f0dfe..6572a08 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -74,18 +74,12 @@ $mode = SpecialEditWatchlist::getMode( $request, $par ); if ( $mode !== false ) { - # TODO: localise? - switch ( $mode ) { - case SpecialEditWatchlist::EDIT_CLEAR: - $mode = 'clear'; - break; - case SpecialEditWatchlist::EDIT_RAW: - $mode = 'raw'; - break; - default: - $mode = null; + if ( $mode === SpecialEditWatchlist::EDIT_RAW ) { + $title = SpecialPage::getTitleFor( 'EditWatchlist', 'raw' ); + } else { + $title = SpecialPage::getTitleFor( 'EditWatchlist' ); } - $title = SpecialPage::getTitleFor( 'EditWatchlist', $mode ); + $output->redirect( $title->getLocalURL() ); return; } -- To view, visit https://gerrit.wikimedia.org/r/89423 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1213c83b7040ae500a0299817ee503ab1b5616c6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Aude Gerrit-Reviewer: Chad Gerrit-Reviewer: Parent5446 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] Add AUTHORS and LICENSE files - change (oojs/ui)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/94275 Change subject: Add AUTHORS and LICENSE files .. Add AUTHORS and LICENSE files Change-Id: Ib35423d11f784b083d0dfc201a6ef7eeef09cb63 --- A AUTHORS.txt A LICENSE-MIT 2 files changed, 40 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/75/94275/1 diff --git a/AUTHORS.txt b/AUTHORS.txt new file mode 100644 index 000..cc1ba49 --- /dev/null +++ b/AUTHORS.txt @@ -0,0 +1,20 @@ +Principal Authors (major contributors, alphabetically) + +Ed Sanders +Roan Kattouw +Rob Moen +Timo Tijhof +Trevor Parscal + +Patch Contributors (minor contributors, alphabetically) + +Amir Aharoni +Bartosz Dziewoński +Erik Moeller +Erick Guan +Inez Korczyński +James Forrester +Kyle Florence +Moriel Schottlender +Niklas Laxström +Sam Reed diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 000..d51f81a --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,20 @@ +Copyright 2011-2013 OOJS Team and other contributors. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- To view, visit https://gerrit.wikimedia.org/r/94275 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib35423d11f784b083d0dfc201a6ef7eeef09cb63 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Catrope ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename mw.util.wikiGetlink to getUrl - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Rename mw.util.wikiGetlink to getUrl .. Rename mw.util.wikiGetlink to getUrl Old name still works, but is deprecated. The new one has the nice property of being the same as a function defined on mw.Title which does the same thing. Replaced all occurences throughout the codebase. Bug: 55764 Change-Id: I8704a6620ece44d374e199c05464b8a553e12e74 --- M resources/mediawiki.page/mediawiki.page.watch.ajax.js M resources/mediawiki/mediawiki.Title.js M resources/mediawiki/mediawiki.jqueryMsg.js M resources/mediawiki/mediawiki.util.js M tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js M tests/qunit/suites/resources/mediawiki/mediawiki.test.js M tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js 8 files changed, 21 insertions(+), 14 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mediawiki.page/mediawiki.page.watch.ajax.js b/resources/mediawiki.page/mediawiki.page.watch.ajax.js index 545cd07..e9afa4a 100644 --- a/resources/mediawiki.page/mediawiki.page.watch.ajax.js +++ b/resources/mediawiki.page/mediawiki.page.watch.ajax.js @@ -161,7 +161,7 @@ cleanTitle = title.replace( /_/g, ' ' ); link = mw.html.element( 'a', { - href: mw.util.wikiGetlink( title ), + href: mw.util.getUrl( title ), title: cleanTitle }, cleanTitle ); diff --git a/resources/mediawiki/mediawiki.Title.js b/resources/mediawiki/mediawiki.Title.js index 4a64566..dde5abf 100644 --- a/resources/mediawiki/mediawiki.Title.js +++ b/resources/mediawiki/mediawiki.Title.js @@ -549,11 +549,11 @@ /** * Get the URL to this title * -* @see mw.util#wikiGetlink +* @see mw.util#getUrl * @return {string} */ getUrl: function () { - return mw.util.wikiGetlink( this.toString() ); + return mw.util.getUrl( this.toString() ); }, /** diff --git a/resources/mediawiki/mediawiki.jqueryMsg.js b/resources/mediawiki/mediawiki.jqueryMsg.js index b634917..70b9be9 100644 --- a/resources/mediawiki/mediawiki.jqueryMsg.js +++ b/resources/mediawiki/mediawiki.jqueryMsg.js @@ -946,7 +946,7 @@ var page, anchor, url; page = nodes[0]; - url = mw.util.wikiGetlink( page ); + url = mw.util.getUrl( page ); // [[Some Page]] or [[Namespace:Some Page]] if ( nodes.length === 1 ) { diff --git a/resources/mediawiki/mediawiki.util.js b/resources/mediawiki/mediawiki.util.js index 4334a9f..259f1c8 100644 --- a/resources/mediawiki/mediawiki.util.js +++ b/resources/mediawiki/mediawiki.util.js @@ -168,7 +168,7 @@ * e.g. { action: 'edit' }. Optional. * @return {string} Location for a page with name of `str` or boolean false on error. */ - wikiGetlink: function ( str, params ) { + getUrl: function ( str, params ) { var url = mw.config.get( 'wgArticlePath' ).replace( '$1', util.wikiUrlencode( typeof str === 'string' ? str : mw.config.get( 'wgPageName' ) ) ); if ( params && !$.isEmptyObject( params ) ) { @@ -612,6 +612,13 @@ } }; + /** +* @method wikiGetlink +* @inheritdoc #getUrl +* @deprecated since 1.23 Use #getUrl instead. +*/ + mw.log.deprecate( util, 'wikiGetlink', util.getUrl, 'Use mw.util.getUrl instead.' ); + mw.util = util; }( mediaWiki, jQuery ) ); diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js b/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js index 13c0efc..f0bb0fc 100644 --- a/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js +++ b/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js @@ -324,7 +324,7 @@ mw.config.set( 'wgArticlePath', '/wiki/$1' ); title = new mw.Title( 'Foobar' ); - assert.equal( title.getUrl(), '/wiki/Foobar', 'Basic functionally, toString passing to wikiGetlink' ); + assert.equal( title.getUrl(), '/wiki/Foobar', 'Basic functionally, getUrl uses mw.util.getUrl' ); ti
[MediaWiki-commits] [Gerrit] Start using rc_source - change (mediawiki...Flow)
EBernhardson has submitted this change and it was merged. Change subject: Start using rc_source .. Start using rc_source Change-Id: If0b9c745bbc692990e64dc28ec171cbc75a27fba --- M Hooks.php A db_patches/patch-rc_source.sql 2 files changed, 5 insertions(+), 0 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/Hooks.php b/Hooks.php index fd99eb3..ad14472 100644 --- a/Hooks.php +++ b/Hooks.php @@ -43,6 +43,7 @@ $updater->addExtensionIndex( 'flow_workflow', 'flow_workflow_lookup', "$dir/db_patches/patch-workflow_lookup_idx.sql" ); $updater->addExtensionIndex( 'flow_topic_list', 'flow_topic_list_topic_id', "$dir/db_patches/patch-topic_list_topic_id_idx.sql" ); $updater->modifyExtensionField( 'flow_revision', 'rev_change_type', "$dir/db_patches/patch-rev_change_type_update.sql" ); + $updater->modifyExtensionField( 'recentchanges', 'rc_source', "$dir/db_patches/patch-rc_source.sql" ); require_once __DIR__.'/maintenance/FlowInsertDefaultDefinitions.php'; $updater->addPostDatabaseUpdateMaintenance( 'FlowInsertDefaultDefinitions' ); diff --git a/db_patches/patch-rc_source.sql b/db_patches/patch-rc_source.sql new file mode 100644 index 000..0f9c2de --- /dev/null +++ b/db_patches/patch-rc_source.sql @@ -0,0 +1,4 @@ +-- Updates Flow's recentchanges entries to new rc_source column +-- values for rc_source & rc_type are respectively RC_FLOW & +-- Flow\Data\RecentChanges::SRC_FLOW, as defined in Flow.php +UPDATE /*_*/recentchanges SET rc_source = "flow" WHERE rc_type = 142; -- To view, visit https://gerrit.wikimedia.org/r/93969 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If0b9c745bbc692990e64dc28ec171cbc75a27fba Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename mw.util.wikiGetlink to getUrl - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Rename mw.util.wikiGetlink to getUrl .. Rename mw.util.wikiGetlink to getUrl Old name still works, but is deprecated. The new one has the nice property of being the same as a function defined on mw.Title which does the same thing. Replaced all occurences throughout the codebase. Bug: 55764 Change-Id: I8704a6620ece44d374e199c05464b8a553e12e74 (cherry picked from commit 35970fb460060cab9a3984030241987a86146f09) --- M RELEASE-NOTES-1.23 M resources/mediawiki.page/mediawiki.page.watch.ajax.js M resources/mediawiki/mediawiki.Title.js M resources/mediawiki/mediawiki.jqueryMsg.js M resources/mediawiki/mediawiki.util.js M tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js M tests/qunit/suites/resources/mediawiki/mediawiki.test.js M tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js 9 files changed, 23 insertions(+), 14 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index ffbdefa..04be2a2 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -54,6 +54,8 @@ === Other changes in 1.23 === * The global variable $wgArticle has been removed after a lengthy deprecation +* mediawiki.util: mw.util.wikiGetlink has been renamed to getUrl. (The old name still + works, but is deprecated.) == Compatibility == diff --git a/resources/mediawiki.page/mediawiki.page.watch.ajax.js b/resources/mediawiki.page/mediawiki.page.watch.ajax.js index 545cd07..e9afa4a 100644 --- a/resources/mediawiki.page/mediawiki.page.watch.ajax.js +++ b/resources/mediawiki.page/mediawiki.page.watch.ajax.js @@ -161,7 +161,7 @@ cleanTitle = title.replace( /_/g, ' ' ); link = mw.html.element( 'a', { - href: mw.util.wikiGetlink( title ), + href: mw.util.getUrl( title ), title: cleanTitle }, cleanTitle ); diff --git a/resources/mediawiki/mediawiki.Title.js b/resources/mediawiki/mediawiki.Title.js index 4a64566..dde5abf 100644 --- a/resources/mediawiki/mediawiki.Title.js +++ b/resources/mediawiki/mediawiki.Title.js @@ -549,11 +549,11 @@ /** * Get the URL to this title * -* @see mw.util#wikiGetlink +* @see mw.util#getUrl * @return {string} */ getUrl: function () { - return mw.util.wikiGetlink( this.toString() ); + return mw.util.getUrl( this.toString() ); }, /** diff --git a/resources/mediawiki/mediawiki.jqueryMsg.js b/resources/mediawiki/mediawiki.jqueryMsg.js index b634917..70b9be9 100644 --- a/resources/mediawiki/mediawiki.jqueryMsg.js +++ b/resources/mediawiki/mediawiki.jqueryMsg.js @@ -946,7 +946,7 @@ var page, anchor, url; page = nodes[0]; - url = mw.util.wikiGetlink( page ); + url = mw.util.getUrl( page ); // [[Some Page]] or [[Namespace:Some Page]] if ( nodes.length === 1 ) { diff --git a/resources/mediawiki/mediawiki.util.js b/resources/mediawiki/mediawiki.util.js index 4334a9f..259f1c8 100644 --- a/resources/mediawiki/mediawiki.util.js +++ b/resources/mediawiki/mediawiki.util.js @@ -168,7 +168,7 @@ * e.g. { action: 'edit' }. Optional. * @return {string} Location for a page with name of `str` or boolean false on error. */ - wikiGetlink: function ( str, params ) { + getUrl: function ( str, params ) { var url = mw.config.get( 'wgArticlePath' ).replace( '$1', util.wikiUrlencode( typeof str === 'string' ? str : mw.config.get( 'wgPageName' ) ) ); if ( params && !$.isEmptyObject( params ) ) { @@ -612,6 +612,13 @@ } }; + /** +* @method wikiGetlink +* @inheritdoc #getUrl +* @deprecated since 1.23 Use #getUrl instead. +*/ + mw.log.deprecate( util, 'wikiGetlink', util.getUrl, 'Use mw.util.getUrl instead.' ); + mw.util = util; }( mediaWiki, jQuery ) ); diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js b/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js index 13c0efc..f0bb0fc 100644 --- a/tests/qunit/suites/resour
[MediaWiki-commits] [Gerrit] FormOptions: Implement FLOAT type - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/94274 Change subject: FormOptions: Implement FLOAT type .. FormOptions: Implement FLOAT type Also added WebRequest#getFloat(). Change-Id: I854f09bd26287880a2806852274471904bc33092 --- M includes/FormOptions.php M includes/WebRequest.php M tests/phpunit/includes/FormOptionsTest.php 3 files changed, 52 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/74/94274/1 diff --git a/includes/FormOptions.php b/includes/FormOptions.php index 54822e3..cd6e207 100644 --- a/includes/FormOptions.php +++ b/includes/FormOptions.php @@ -4,6 +4,7 @@ * * Copyright © 2008, Niklas Laxström * Copyright © 2011, Antoine Musso + * Copyright © 2013, Bartosz Dziewoński * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,6 +43,9 @@ const STRING = 0; /** Integer type, maps guessType() to WebRequest::getInt() */ const INT = 1; + /** Float type, maps guessType() to WebRequest::getFloat() + * @since 1.23 */ + const FLOAT = 4; /** Boolean type, maps guessType() to WebRequest::getBool() */ const BOOL = 2; /** Integer type or null, maps to WebRequest::getIntOrNull() @@ -112,6 +116,8 @@ return self::BOOL; } elseif ( is_int( $data ) ) { return self::INT; + } elseif ( is_float( $data ) ) { + return self::FLOAT; } elseif ( is_string( $data ) ) { return self::STRING; } else { @@ -234,19 +240,29 @@ } /** -* Validate and set an option integer value -* The value will be altered to fit in the range. -* -* @param string $name option name -* @param int $min minimum value -* @param int $max maximum value -* @throws MWException If option is not of type INT +* @see validateBounds() */ public function validateIntBounds( $name, $min, $max ) { - $this->validateName( $name, true ); + $this->validateBounds( $name, $min, $max ); + } - if ( $this->options[$name]['type'] !== self::INT ) { - throw new MWException( "Option $name is not of type int" ); + /** +* Constrain a numeric value for a given option to a given range. The value will be altered to fit +* in the range. +* +* @since 1.23 +* +* @param string $name Option name +* @param int|float $min Minimum value +* @param int|float $max Maximum value +* @throws MWException If option is not of type INT +*/ + public function validateBounds( $name, $min, $max ) { + $this->validateName( $name, true ); + $type = $this->options[$name]['type']; + + if ( $type !== self::INT && $type !== self::FLOAT ) { + throw new MWException( "Option $name is not of type INT or FLOAT" ); } $value = $this->getValueReal( $this->options[$name] ); @@ -333,6 +349,9 @@ case self::INT: $value = $r->getInt( $name, $default ); break; + case self::FLOAT: + $value = $r->getFloat( $name, $default ); + break; case self::STRING: $value = $r->getText( $name, $default ); break; diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 462b312..4ad7344 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -481,6 +481,20 @@ } /** +* Fetch a floating point value from the input or return $default if not set. +* Guaranteed to return a float; non-numeric input will typically +* return 0. +* +* @since 1.23 +* @param $name String +* @param $default Float +* @return Float +*/ + public function getFloat( $name, $default = 0 ) { + return floatval( $this->getVal( $name, $default ) ); + } + + /** * Fetch a boolean value from the input or return $default if not set. * Guaranteed to return true or false, with normal PHP semantics for * boolean interpretation of strings. diff --git a/tests/phpunit/includes/FormOptionsTest.php b/tests/phpunit/includes/FormOptionsTest.php index 08d6ba8..665fa39 100644 --- a/tests/phpunit/includes/FormOptionsTest.php +++ b/tests/phpunit/
[MediaWiki-commits] [Gerrit] attempt to get around bogus failure to type password - change (mediawiki...MobileFrontend)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/94273 Change subject: attempt to get around bogus failure to type password .. attempt to get around bogus failure to type password Change-Id: Ie97459a993f1181bbcf6854ce0be2dbdcca06d9a --- M tests/browser/features/support/pages/login_page.rb 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/73/94273/1 diff --git a/tests/browser/features/support/pages/login_page.rb b/tests/browser/features/support/pages/login_page.rb index 64f1c9a..b83be0e 100644 --- a/tests/browser/features/support/pages/login_page.rb +++ b/tests/browser/features/support/pages/login_page.rb @@ -19,8 +19,8 @@ @browser.div(id: 'mw-content-text').p.b end def login_with(username, password) -self.username = username -self.password = password +self.username_element.when_present.send_keys(username) +self.password_element.when_present.send_keys(password) login end end -- To view, visit https://gerrit.wikimedia.org/r/94273 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie97459a993f1181bbcf6854ce0be2dbdcca06d9a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Cmcmahon ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove stupid one-cell table - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove stupid one-cell table .. Remove stupid one-cell table Change-Id: Ia24c68378385adfd2a5c0bf7b9646bb1edc3d7e4 --- M includes/specials/SpecialSearch.php 1 file changed, 5 insertions(+), 6 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index d5a6b29..8c8de8e 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -318,13 +318,12 @@ ) ); $out->addHtml( - Xml::openElement( 'table', array( 'id' => 'mw-search-top-table', 'cellpadding' => 0, 'cellspacing' => 0 ) ) . - Xml::openElement( 'tr' ) . - Xml::openElement( 'td' ) . "\n" . + # This is an awful awful ID name. It's not a table, but we + # named it poorly from when this was a table so now we're + # stuck with it + Xml::openElement( 'div', array( 'id' => 'mw-search-top-table' ) ) . $this->shortDialog( $term ) . - Xml::closeElement( 'td' ) . - Xml::closeElement( 'tr' ) . - Xml::closeElement( 'table' ) + Xml::closeElement( 'div' ) ); // Sometimes the search engine knows there are too many hits -- To view, visit https://gerrit.wikimedia.org/r/93887 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia24c68378385adfd2a5c0bf7b9646bb1edc3d7e4 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Chad Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Chad Gerrit-Reviewer: Manybubbles Gerrit-Reviewer: MarkTraceur Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits