mbox series

[00/15] remote-mediawiki: various fixes to make tests pass

Message ID 20200916102918.29805-1-avarab@gmail.com (mailing list archive)
Headers show
Series remote-mediawiki: various fixes to make tests pass | expand

Message

Ævar Arnfjörð Bjarmason Sept. 16, 2020, 10:29 a.m. UTC
I had occasion to look at remote-mediawiki and I couldn't even get the
test suite to run. The patches below have more detail but there's
issues like a hard error on any Perl release newer than ones released
in 2013, and the MediaWiki release it tries to use spewing errors on
any modern PHP version.

This series fixes these issues. With it applied it's possible to run
the tests, and they all pass.

Simon Legner (1):
  remote-mediawiki: fix duplicate revisions being imported

Ævar Arnfjörð Bjarmason (14):
  remote-mediawiki doc: correct link to GitHub project
  remote-mediawiki doc: link to MediaWiki's current version
  remote-mediawiki doc: bump recommended PHP version to 7.3
  remote-mediawiki tests: use the login/password variables
  remote-mediawiki tests: use a 10 character password
  remote-mediawiki tests: use test_cmp in tests
  remote-mediawiki tests: guard test_cmp with test_path_is_file
  remote-mediawiki tests: change `[]` to `test`
  remote-mediawiki tests: use "$dir/" instead of "$dir."
  remote-mediawiki tests: use a more idiomatic dispatch table
  remote-mediawiki tests: replace deprecated Perl construct
  remote-mediawiki tests: use inline PerlIO for readability
  remote-mediawiki tests: use CLI installer
  remote-mediawiki tests: annotate failing tests

 contrib/mw-to-git/git-mw.perl                 |   2 +-
 contrib/mw-to-git/git-remote-mediawiki.perl   |   5 +-
 contrib/mw-to-git/git-remote-mediawiki.txt    |   2 +-
 contrib/mw-to-git/t/.gitignore                |   2 +-
 contrib/mw-to-git/t/README                    |  10 +-
 contrib/mw-to-git/t/install-wiki/.gitignore   |   1 -
 .../t/install-wiki/LocalSettings.php          | 129 --------------
 .../mw-to-git/t/install-wiki/db_install.php   | 120 -------------
 contrib/mw-to-git/t/t9360-mw-to-git-clone.sh  |   8 +-
 .../t/t9363-mw-to-git-export-import.sh        |  15 +-
 contrib/mw-to-git/t/test-gitmw-lib.sh         | 159 +++++++++---------
 contrib/mw-to-git/t/test-gitmw.pl             |  22 ++-
 contrib/mw-to-git/t/test.config               |  23 +--
 13 files changed, 129 insertions(+), 369 deletions(-)
 delete mode 100644 contrib/mw-to-git/t/install-wiki/.gitignore
 delete mode 100644 contrib/mw-to-git/t/install-wiki/LocalSettings.php
 delete mode 100644 contrib/mw-to-git/t/install-wiki/db_install.php

Comments

Jeff King Sept. 16, 2020, 6:57 p.m. UTC | #1
On Wed, Sep 16, 2020 at 12:29:03PM +0200, Ævar Arnfjörð Bjarmason wrote:

> I had occasion to look at remote-mediawiki and I couldn't even get the
> test suite to run. The patches below have more detail but there's
> issues like a hard error on any Perl release newer than ones released
> in 2013, and the MediaWiki release it tries to use spewing errors on
> any modern PHP version.
> 
> This series fixes these issues. With it applied it's possible to run
> the tests, and they all pass.

These all look reasonable. I left a few minor comments, but frankly, I
care little enough about this clearly unmaintained bit of contrib/ that
I would be happy either way.

I am a little puzzled about what we want the future of contrib/mw-to-git
to be. It sounds like there have been a few minor improvements in the
external GitHub project (though clearly lacking a bunch of fixes you
have here). Should we be pushing these fixes up to that version and then
either:

  - considering that project the upstream, and reimporting from them
    once the fixes are merged there

  - ejecting it from contrib/; it can live on as a separate project

-Peff
Johannes Schindelin Sept. 16, 2020, 7:46 p.m. UTC | #2
Hi Ævar,

On Wed, 16 Sep 2020, Ævar Arnfjörð Bjarmason wrote:

> I had occasion to look at remote-mediawiki and I couldn't even get the
> test suite to run. The patches below have more detail but there's
> issues like a hard error on any Perl release newer than ones released
> in 2013, and the MediaWiki release it tries to use spewing errors on
> any modern PHP version.
>
> This series fixes these issues. With it applied it's possible to run
> the tests, and they all pass.

I glimpsed through the patches, and they all look in pretty good shape. I
just wish that the TODO in Simon's patch had been resolved, and that the
test failures had been root-caused, but then, I personally do not really
care all that much about the `remote-mediawiki` backend any longer, so I
am fine with the patches as-are (modulo Danh's/Eric's nit about the
extra tests before `test_cmp`).

Thanks,
Dscho

>
> Simon Legner (1):
>   remote-mediawiki: fix duplicate revisions being imported
>
> Ævar Arnfjörð Bjarmason (14):
>   remote-mediawiki doc: correct link to GitHub project
>   remote-mediawiki doc: link to MediaWiki's current version
>   remote-mediawiki doc: bump recommended PHP version to 7.3
>   remote-mediawiki tests: use the login/password variables
>   remote-mediawiki tests: use a 10 character password
>   remote-mediawiki tests: use test_cmp in tests
>   remote-mediawiki tests: guard test_cmp with test_path_is_file
>   remote-mediawiki tests: change `[]` to `test`
>   remote-mediawiki tests: use "$dir/" instead of "$dir."
>   remote-mediawiki tests: use a more idiomatic dispatch table
>   remote-mediawiki tests: replace deprecated Perl construct
>   remote-mediawiki tests: use inline PerlIO for readability
>   remote-mediawiki tests: use CLI installer
>   remote-mediawiki tests: annotate failing tests
>
>  contrib/mw-to-git/git-mw.perl                 |   2 +-
>  contrib/mw-to-git/git-remote-mediawiki.perl   |   5 +-
>  contrib/mw-to-git/git-remote-mediawiki.txt    |   2 +-
>  contrib/mw-to-git/t/.gitignore                |   2 +-
>  contrib/mw-to-git/t/README                    |  10 +-
>  contrib/mw-to-git/t/install-wiki/.gitignore   |   1 -
>  .../t/install-wiki/LocalSettings.php          | 129 --------------
>  .../mw-to-git/t/install-wiki/db_install.php   | 120 -------------
>  contrib/mw-to-git/t/t9360-mw-to-git-clone.sh  |   8 +-
>  .../t/t9363-mw-to-git-export-import.sh        |  15 +-
>  contrib/mw-to-git/t/test-gitmw-lib.sh         | 159 +++++++++---------
>  contrib/mw-to-git/t/test-gitmw.pl             |  22 ++-
>  contrib/mw-to-git/t/test.config               |  23 +--
>  13 files changed, 129 insertions(+), 369 deletions(-)
>  delete mode 100644 contrib/mw-to-git/t/install-wiki/.gitignore
>  delete mode 100644 contrib/mw-to-git/t/install-wiki/LocalSettings.php
>  delete mode 100644 contrib/mw-to-git/t/install-wiki/db_install.php
>
> --
> 2.28.0.297.g1956fa8f8d
>
>
Junio C Hamano Sept. 17, 2020, 10:28 p.m. UTC | #3
Jeff King <peff@peff.net> writes:

> I am a little puzzled about what we want the future of contrib/mw-to-git
> to be. It sounds like there have been a few minor improvements in the
> external GitHub project (though clearly lacking a bunch of fixes you
> have here). Should we be pushing these fixes up to that version and then
> either:
>
>   - considering that project the upstream, and reimporting from them
>     once the fixes are merged there
>
>   - ejecting it from contrib/; it can live on as a separate project

In general the latter is preferrable.

If it is not well maintained in upstream, we can keep it in our
contrib/ hierarchy forever, but given that nobody among us seems to
be motivated and qualified enough to be its true maintainer, and no
user seems to be contacting us about its bugs, it is just between
letting it wither over there or in our contrib/, which does not make
much of a difference, I would think.
Ævar Arnfjörð Bjarmason Sept. 21, 2020, 10:15 a.m. UTC | #4
On Wed, Sep 16 2020, Johannes Schindelin wrote:

> Hi Ævar,
>
> On Wed, 16 Sep 2020, Ævar Arnfjörð Bjarmason wrote:
>
>> I had occasion to look at remote-mediawiki and I couldn't even get the
>> test suite to run. The patches below have more detail but there's
>> issues like a hard error on any Perl release newer than ones released
>> in 2013, and the MediaWiki release it tries to use spewing errors on
>> any modern PHP version.
>>
>> This series fixes these issues. With it applied it's possible to run
>> the tests, and they all pass.
>
> I glimpsed through the patches, and they all look in pretty good shape. I
> just wish that the TODO in Simon's patch had been resolved, and that the
> test failures had been root-caused, but then, I personally do not really
> care all that much about the `remote-mediawiki` backend any longer, so I
> am fine with the patches as-are (modulo Danh's/Eric's nit about the
> extra tests before `test_cmp`).

I didn't look into it much, but isn't it just some general "feature" of
the remote protocol that it might tell you about a refname twice, and
you have to de-duplicate them? I searched a bit for whether that was
documented or not, didn't find it, and moved on.

>>
>> Simon Legner (1):
>>   remote-mediawiki: fix duplicate revisions being imported
>>
>> Ævar Arnfjörð Bjarmason (14):
>>   remote-mediawiki doc: correct link to GitHub project
>>   remote-mediawiki doc: link to MediaWiki's current version
>>   remote-mediawiki doc: bump recommended PHP version to 7.3
>>   remote-mediawiki tests: use the login/password variables
>>   remote-mediawiki tests: use a 10 character password
>>   remote-mediawiki tests: use test_cmp in tests
>>   remote-mediawiki tests: guard test_cmp with test_path_is_file
>>   remote-mediawiki tests: change `[]` to `test`
>>   remote-mediawiki tests: use "$dir/" instead of "$dir."
>>   remote-mediawiki tests: use a more idiomatic dispatch table
>>   remote-mediawiki tests: replace deprecated Perl construct
>>   remote-mediawiki tests: use inline PerlIO for readability
>>   remote-mediawiki tests: use CLI installer
>>   remote-mediawiki tests: annotate failing tests
>>
>>  contrib/mw-to-git/git-mw.perl                 |   2 +-
>>  contrib/mw-to-git/git-remote-mediawiki.perl   |   5 +-
>>  contrib/mw-to-git/git-remote-mediawiki.txt    |   2 +-
>>  contrib/mw-to-git/t/.gitignore                |   2 +-
>>  contrib/mw-to-git/t/README                    |  10 +-
>>  contrib/mw-to-git/t/install-wiki/.gitignore   |   1 -
>>  .../t/install-wiki/LocalSettings.php          | 129 --------------
>>  .../mw-to-git/t/install-wiki/db_install.php   | 120 -------------
>>  contrib/mw-to-git/t/t9360-mw-to-git-clone.sh  |   8 +-
>>  .../t/t9363-mw-to-git-export-import.sh        |  15 +-
>>  contrib/mw-to-git/t/test-gitmw-lib.sh         | 159 +++++++++---------
>>  contrib/mw-to-git/t/test-gitmw.pl             |  22 ++-
>>  contrib/mw-to-git/t/test.config               |  23 +--
>>  13 files changed, 129 insertions(+), 369 deletions(-)
>>  delete mode 100644 contrib/mw-to-git/t/install-wiki/.gitignore
>>  delete mode 100644 contrib/mw-to-git/t/install-wiki/LocalSettings.php
>>  delete mode 100644 contrib/mw-to-git/t/install-wiki/db_install.php
>>
>> --
>> 2.28.0.297.g1956fa8f8d
>>
>>