metakgp / metakgp-wiki

Dockerized source for the metakgp wiki.
https://wiki.metakgp.org
GNU General Public License v3.0
23 stars 20 forks source link

Upgrade Mediawiki's version to 1.34 #78

Closed icyflame closed 4 years ago

icyflame commented 4 years ago

Summary

The nightly Travis CI build has been failing for the past few days as ArticleFeedback doesn't support Mediawiki 1.33. Mediawiki 1.34 is now stable.

This PR updates the Mediawiki version to 1.34.

Every commit explains the reasons for the change. Here's a summary:

image

Here's a summary of the process I went through during the upgrade:

Mediawiki 1.33 => 1.34 Upgrade summary
This periodic failing build on Travis CI got to me

https://travis-ci.org/metakgp/metakgp-wiki/builds/656667168#L2620

I am making a PR to upgrade to Mediawiki 1.34.

icyflame  1 hour ago

- Scribunto is part of mediawiki core now
- We don't need to pull the master branch of ArticleFeedbackV5 anymore
- PHP 7 and 7.1 aren't supported  I upgraded to PHP 7.3 with Debian Buster (We
  were using Debian Jessie, which is two releases ago)
    - 7.1 => 7.3 had a couple of breaking changes: count(null) is an error now.
      Hopefully none of the extensions has some code like that

icyflame  1 hour ago

On the bright side though, 7.3 is supposed to have some major improvements
related to RAM usage. So, maybe our memory usage will go down from 90 => 80%?

icyflame  1 hour ago

Oh, Node 10 on Parsoid and Python 2 on Backup  We have to fix that.  I will
create a GitHub issue for each of them.

icyflame  1 hour ago

Issues created//github.com/metakgp/metakgp-wiki/issues/76
https://github.com/metakgp/metakgp-wiki/issues/77

icyflame  1 hour ago

I didn't remove all the Scribunto configuration  Removed and re-building now.

icyflame  39 minutes ago

Alright, we have our first customer: RecentPages has some strange code?

> 2020/02/29 15 PHP Warning:  Use of undefined constant DB_SLAVE - assumed
> 'DB_SLAVE' (this will throw an Error in a future version of PHP) in
> /srv/mediawiki/extensions/RecentPages/RecentPages.php on line 279" while
> reading response header from upstream, client wiki.metakgp.org, request9000",
> host8080"

icyflame  35 minutes ago

We are fetching the PHP file from
GitHubhttps://github.com/Inclumedia/RecentPages/blob/b7d863d2b862e70ebde0635e7845b4cba0d4db7e/RecentPages.php#L279

Code looks fine, maybe I just need to define DB_SLAVE?

icyflame  30 minutes ago

> If you use an undefined constant, PHP assumes that you mean the name of the
> constant itself, just as if you called it as a string (CONSTANT vs
> "CONSTANT"). This fallback is deprecated as of PHP 7.2.0, and an error of
> level E_WARNING is issued when it happens (previously, an error of level
> E_NOTICE has been issued instead.) See also the manual entry on why $foo[bar]
> is wrong (unless you first define() bar as a constant). This does not apply to
> (fully) qualified constants, which will raise a fatal error if undefined. If
> you simply want to check if a constant is set, use the defined() function.

-- https://www.php.net/manual/en/language.constants.syntax.php

So, we just need to explicitly define the DB_SLAVE constant and set it to the
value "DB_SLAVE" (edited)

icyflame  30 minutes ago

Done, re-building now;

icyflame  29 minutes ago

Didn't add a semicolon. I need a stricter PHP linter in my editor.  Fixed and
re-building

icyflame  23 minutes ago

All the pages except the main page work fine. Here we go.  (edited)

icyflame  15 minutes ago

> [4ffcc58250ce869ee5be1905] /w/Main_Page UnexpectedValueException from line 462
> of /srv/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Invalid
> server index index #DB_SLAVE

Still looks like a RecentPages issue, the value I gave this constant was
incorrect?  I wonder what was the constant's value in the previous PHP version.
Perhaps, I should find that.

icyflame  13 minutes ago

https://doc.wikimedia.org/mediawiki-core/master/php/GlobalFunctions_8php.html#a46345f25555fd93d272119932fbfc18f

Ah, it should be an integer.

icyflame  8 minutes ago

AHA! WORKED! (edited)
thealphadollar commented 4 years ago

I'll try to merge this tomorrow :)

icyflame commented 4 years ago

@thealphadollar Hi, I would like to release this PR. Also, I would like to wait for Vikrant's review.

thealphadollar commented 4 years ago

Sounds good to me.

On Sun, 1 Mar, 2020, 10:33 am Siddharth Kannan, notifications@github.com wrote:

@thealphadollar https://github.com/thealphadollar Hi, I would like to release this PR. Also, I would like to wait for Vikrant's review.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/metakgp/metakgp-wiki/pull/78?email_source=notifications&email_token=AH2K2IHMK3CUBFXRCY7DJSTRFHUDBA5CNFSM4K62EQVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENMU2EQ#issuecomment-593054994, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH2K2ICFVIPYX3VCF33L7QTRFHUDBANCNFSM4K62EQVA .

icyflame commented 4 years ago

🗒 I created #79, #80, and #81 to make some changes once this PR is merged and deployed.

I will deploy this PR tonight.