thenets / docker-parsoid

Containerized MediaWiki parsoid service
MIT License
21 stars 17 forks source link

Parsoid 0.11 #13

Closed bperel closed 4 years ago

bperel commented 4 years ago

Hello,

Parsoid 0.11 has been released a few weeks ago. Any chance to have it available using this Docker image?

thenets commented 4 years ago

Hi @bperel :)

I'm testing and it'll be released next weekend.

bperel commented 4 years ago

Cool ! I tested building the image locally, still pointing to master, and things seem to work. Since version 0.11 is the last one using NodeJS (they're migrating to PHP) maybe it would be a good idea to change the Dockerfile so that it installs NodeJS instead of PHP?

thenets commented 4 years ago

Good to know that you tested and it's working.

About the migration to PHP, I know about that but I didn't have time to study it. I don't know if it's a good idea keep both projects in the same repo. Maybe it's better wait and release an entire new repo and Docker Hub project.

When I get a free time to talk to the MediaWiki developers I will try to learn what will be the best approach.

bperel commented 4 years ago

Maybe you could rename Dockerfile to Dockerfile.nodejs (and edit that file to say that it's only buildable until version 0.11) and create a new Dockerfile based on PHP, since all the rest of the repo will stay even when NodeJS isn't used anymore

thenets commented 4 years ago

@bperel It's a good idea. I'll try it.

I tested and it's working the version 0.11.0. I'll release it today at night timezone (Brazil, São Paulo).

bperel commented 4 years ago

Hi, any progress on the release?

thenets commented 4 years ago

@bperel I had a lot of unit test errors with the version 0.11.0. I'm trying to fix it but it's complicated.

I released the new version and I'll investigate it more later. I also need to update the README and the Wiki documentation.

You can use the 0.11.0 version here:

docker run thenets/parsoid:0.11

This is the error message:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'parserTests' ]
2 info using npm@6.13.6
3 info using node@v13.8.0
4 verbose run-script [ 'preparserTests', 'parserTests', 'postparserTests' ]
5 info lifecycle parsoid@0.11.0~preparserTests: parsoid@0.11.0
6 info lifecycle parsoid@0.11.0~parserTests: parsoid@0.11.0
7 verbose lifecycle parsoid@0.11.0~parserTests: unsafe-perm in lifecycle true
8 verbose lifecycle parsoid@0.11.0~parserTests: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/lib/parsoid/node_modules/.bin:/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/lib/parsoid/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle parsoid@0.11.0~parserTests: CWD: /var/lib/parsoid
10 silly lifecycle parsoid@0.11.0~parserTests: Args: [
10 silly lifecycle   '-c',
10 silly lifecycle   'node bin/parserTests.js --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist'
10 silly lifecycle ]
11 silly lifecycle parsoid@0.11.0~parserTests: Returned: code: 2  signal: null
12 info lifecycle parsoid@0.11.0~parserTests: Failed to exec parserTests script
13 verbose stack Error: parsoid@0.11.0 parserTests: `node bin/parserTests.js --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist`
13 verbose stack Exit status 2
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:321:20)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:321:20)
13 verbose stack     at maybeClose (internal/child_process.js:1026:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid parsoid@0.11.0
15 verbose cwd /var/lib/parsoid
16 verbose Linux 4.15.0-76-generic
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "parserTests"
18 verbose node v13.8.0
19 verbose npm  v6.13.6
20 error code ELIFECYCLE
21 error errno 2
22 error parsoid@0.11.0 parserTests: `node bin/parserTests.js --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist`
22 error Exit status 2
23 error Failed at the parsoid@0.11.0 parserTests script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
bperel commented 4 years ago

On my side, I get test results error, both if I run parserTests from my host (with Node 8) or from the Docker image (which has Node 12) :

# npm run parserTests

> parsoid@0.11.0 parserTests /var/lib/parsoid
> node bin/parserTests.js --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist

{"name":"parsoid","hostname":"1421720fd415","pid":20,"level":40,"levelPath":"warn/service-runner","msg":"startup finished","time":"2020-02-27T15:14:08.145Z","v":0}
ParserTests running with node v12.15.0
Initialization complete. Now launching tests.
^Cbash-5.0# npm run parserTests

> parsoid@0.11.0 parserTests /var/lib/parsoid
> node bin/parserTests.js --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist

{"name":"parsoid","hostname":"1421720fd415","pid":55,"level":40,"levelPath":"warn/service-runner","msg":"startup finished","time":"2020-02-27T15:20:56.157Z","v":0}
ParserTests running with node v12.15.0
Initialization complete. Now launching tests.
==========================================================
SUMMARY: parserTests.txt
Execution time: 117455.129ms
wt2html: 1369 passed (0 unexpected) / 146 failed (0 unexpected)
wt2wt: 1286 passed (0 unexpected) / 96 failed (0 unexpected)
html2html: 1190 passed (0 unexpected) / 141 failed (0 unexpected)
html2wt: 888 passed (0 unexpected) / 547 failed (0 unexpected)
selser: 17807 passed (0 unexpected) / 1052 failed (0 unexpected)
TOTAL: 22540 passed (0 unexpected) / 1982 failed (0 unexpected)
No errors logged.
==========================================================
SUMMARY: citeParserTests.txt
Execution time: 14986.312ms
wt2html: 61 passed (0 unexpected) / 41 failed (0 unexpected)
wt2wt: 76 passed (0 unexpected) / 17 failed (0 unexpected)
html2html: 60 passed (0 unexpected) / 34 failed (0 unexpected)
html2wt: 45 passed (0 unexpected) / 46 failed (0 unexpected)
selser: 1530 passed (0 unexpected) / 332 failed (0 unexpected)
TOTAL: 1772 passed (0 unexpected) / 470 failed (0 unexpected)
No errors logged.
Blacklist changed!
==========================================================
SUMMARY: timedMediaHandlerParserTests.txt
Execution time: 488.444ms
Passed 96 of 96 tests... ALL TESTS PASSED!
No errors logged.
==========================================================
SUMMARY: langParserTests.txt
Execution time: 636.969ms
Passed 156 of 156 tests... ALL TESTS PASSED!
No errors logged.
==========================================================
SUMMARY: poemParserTests.txt
Execution time: 332.560ms
Passed 60 of 60 tests... ALL TESTS PASSED!
No errors logged.

==========================================================
SUMMARY: ALL TESTS
TOTAL: 24624 passed (0 unexpected) / 2452 failed (0 unexpected)
24624 total passed tests (expected 24624), 2452 total failures (expected 2452)
0 errors logged.
Blacklist changed!
--> NO UNEXPECTED RESULTS <--
Perhaps some tests were deleted or renamed.
Use `bin/parserTests.js --rewrite-blacklist` to update blacklist.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! parsoid@0.11.0 parserTests: `node bin/parserTests.js --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the parsoid@0.11.0 parserTests script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-02-27T15_23_11_546Z-debug.log
thenets commented 4 years ago

@bperel yeah... the developers maybe deleted some unit test files from release branch/tag.

Let me know if the version 0.11.0 works fine. I also created a new Dockerfile using Ubuntu 18.04 if something goes wrong with Alpine.

All the documentation are up to date too.

thenets commented 4 years ago

@bperel I'll close this issue. I think everything is working ok now.