Page MenuHomePhabricator

scap documentation is no more generated
Closed, ResolvedPublic

Description

Scap documentation is published at https://doc.wikimedia.org/mw-tools-scap/ . It is done by the mw-tools-scap-tox-doc-publish Jenkins job which invokes tox -e doc.

Since we have removed tox.ini in Feburary 2021 (5bc9d9dd55565440b381bc87cf17594f3e97ac01), the job has been failing and the documentation is no more generated.

I don't think PipelineLib / Blubber has a mechanism to capture artifacts and publish them. The easiest is probably to reintroduce tox at least for doc generation and while at it I would like to align the doc publishing to no more use Jenkins git polling but use the postmerge zuul pipeline and we can probably relocate the doc to a more friendly name than mw-tools-scap.

Event Timeline

Change 824456 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/tools/scap@master] Restore tox for CI documentation generation

https://gerrit.wikimedia.org/r/824456

Change 824463 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] Publish scap documentation on postmerge

https://gerrit.wikimedia.org/r/824463

Change 824495 had a related patch set uploaded (by Hashar; author: Hashar):

[operations/puppet@production] doc: redirect /mw-tools-scap/ to /scap/

https://gerrit.wikimedia.org/r/824495

Change 824463 merged by jenkins-bot:

[integration/config@master] Publish scap documentation on postmerge

https://gerrit.wikimedia.org/r/824463

Change 824456 merged by jenkins-bot:

[mediawiki/tools/scap@master] Restore tox for CI documentation generation

https://gerrit.wikimedia.org/r/824456

Change 824531 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] [scap] check doc generation in test and gate

https://gerrit.wikimedia.org/r/824531

Change 824532 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/tools/scap@master] Sphinx program output must use a relative python

https://gerrit.wikimedia.org/r/824532

Change 824531 merged by jenkins-bot:

[integration/config@master] [scap] check doc generation in test and gate

https://gerrit.wikimedia.org/r/824531

Change 824532 merged by jenkins-bot:

[mediawiki/tools/scap@master] Sphinx program output must use a relative python

https://gerrit.wikimedia.org/r/824532

Change 824535 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] Move scap doc from /mw-tools-scap/ to /scap/

https://gerrit.wikimedia.org/r/824535

Change 824535 merged by jenkins-bot:

[integration/config@master] Move scap doc from /mw-tools-scap/ to /scap/

https://gerrit.wikimedia.org/r/824535

Change 824538 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/docroot@master] doc: update links from /mw-tools-scap/ to /scap/

https://gerrit.wikimedia.org/r/824538

Change 824538 merged by jenkins-bot:

[integration/docroot@master] doc: update links from /mw-tools-scap/ to /scap/

https://gerrit.wikimedia.org/r/824538

Mentioned in SAL (#wikimedia-operations) [2022-08-18T17:08:26Z] <hashar@deploy1002> Started deploy [integration/docroot@1aca57b]: doc: update links from /mw-tools-scap/ to /scap/ - T315541

Mentioned in SAL (#wikimedia-operations) [2022-08-18T17:08:35Z] <hashar@deploy1002> Finished deploy [integration/docroot@1aca57b]: doc: update links from /mw-tools-scap/ to /scap/ - T315541 (duration: 00m 09s)

Change 824495 merged by Cathal Mooney:

[operations/puppet@production] doc: redirect /mw-tools-scap/ to /scap/

https://gerrit.wikimedia.org/r/824495

Cathal from SRE kindly deployed the Apache config, however the redirect does not work. We have:

# Back-compat for T246042
Redirect 302 /mediawiki-extensions-CollaborationKit/ /CollaborationKit/
Redirect 302 /mediawiki-extensions-Wikibase/ /Wikibase/

# Back-compat for scap T315541
Redirect 302 /mw-tools-scap/ /scap/

https://doc.wikimedia.org/mediawiki-extensions-CollaborationKit/ and https://doc.wikimedia.org/mediawiki-extensions-Wikibase/ are 404.
https://doc.wikimedia.org/mw-tools-scap/ does not redirect but serves the old content.

Cathal did restart Apache.

Why the Redirect does not work is a mystery, it might because of our rewrite rules taking precedence over the mod_alias Redirect

# When the requested URI is not available in our webapp:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
# Then internally redirect to CI published material under WMF_DOC_PATH
RewriteRule ^(.+) ${WMF_DOC_PATH}$1

Change 824542 had a related patch set uploaded (by Hashar; author: Hashar):

[operations/puppet@production] doc: properly redirect back compat URLs

https://gerrit.wikimedia.org/r/824542

Change 824542 merged by Dzahn:

[operations/puppet@production] doc: properly redirect back compat URLs

https://gerrit.wikimedia.org/r/824542

Before the change was deployed, new test for scap3 redirect fails (as expected, test the test):

[deploy1002:~] $ httpbb --hosts doc2001.codfw.wmnet /srv/deployment/httpbb-tests/doc/test_doc.yaml
Sending to doc2001.codfw.wmnet...
http://doc.wikimedia.org/mw-tools-scap/scap3/index.html (/srv/deployment/httpbb-tests/doc/test_doc.yaml:26)
    Status code: expected 302, got 200.
    Location header: expected 'https://doc.wikimedia.org/scap/scap3/index.html', was missing.
===
FAIL: 10 requests sent to doc2001.codfw.wmnet. 1 request with failed assertions.

Change was applied:

-    Redirect 302 /mediawiki-extensions-CollaborationKit/ /CollaborationKit/
-    Redirect 302 /mediawiki-extensions-Wikibase/ /Wikibase/
+    RewriteRule ^/mediawiki-extensions-CollaborationKit/(.*)$ /CollaborationKit/$1 [L,R]
+    RewriteRule ^/mediawiki-extensions-Wikibase/(.*)$ /Wikibase/$1 [L,R]
 
     # Back-compat for scap T315541
-    Redirect 302 /mw-tools-scap/ /scap/
+    RewriteRule ^/mw-tools-scap/(.*)$ /scap/$1 [L,R]

Now all tests including the new one pass:

[deploy1002:~] $ httpbb --hosts doc2001.codfw.wmnet /srv/deployment/httpbb-tests/doc/test_doc.yaml
Sending to doc2001.codfw.wmnet...
PASS: 10 requests sent to doc2001.codfw.wmnet. All assertions passed.

Mentioned in SAL (#wikimedia-releng) [2022-08-30T09:32:07Z] <hashar> doc: on doc1002: sudo -u doc-uploader rm -fR /srv/doc/mw-tools-scap/ That got moved to /srv/doc and a redirect has been set. # T315541

@Dzahn thank you for the httpbb test suite!

I have deleted the old/stalled artifacts and updated a few links on wikitech and mediawiki.org.

The canonical link is now https://doc.wikimedia.org/scap/

Change 827967 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/tools/scap@master] Update URL for online documentation

https://gerrit.wikimedia.org/r/827967

Change 827967 merged by jenkins-bot:

[mediawiki/tools/scap@master] Update URL for online documentation

https://gerrit.wikimedia.org/r/827967