Page MenuHomePhabricator

Have a CI test that fails if a Beta Cluster / production extension has an unsatisfiable dependency that blocks merge
Open, Needs TriagePublic0 Estimated Story Points

Description

… rather than having it blow up when beta-scap-eqiad tries and fails to run.

Event Timeline

Not quite sure how best to do this; a structure test in core could work, but then any dependencies in extension.json must be satisfiable by linked code in gerrit, which adds a requirement I don't think all of our extensions can exhibit (e.g. extensions that depend on SMW?).

Special integration-config local code job, I guess. Meh.

OK, jq -e 'if .requires.extensions|length == 0 then "" else .requires.extensions|keys end' extension.json gets us an array of required extensions. Then we'd just… assert that the extension exists?

OK, jq -e 'if .requires.extensions|length == 0 then "" else .requires.extensions|keys end' extension.json gets us an array of required extensions. Then we'd just… assert that the extension exists?

Taking this example out to a test on beta:

#!/usr/bin/env bash

while read ext; do
        jq -r '.requires.extensions|to_entries[].key' "$ext" 2>/dev/null || :;
done < <(find /srv/mediawiki-staging/php-master -name extension.json) | while read needed_ext; do
        if [ ! -d "/srv/mediawiki-staging/php-master/extensions/${needed_ext}" ]; then
            echo "${needed_ext} not found"
        fi
done

But as you mentioned in Aug 2019, the result is SemanticMediaWiki not found twice. Also ZeroBanner not found.

Yeah, we'd need to also only run this on this for extensions in extensions-list (though I thought we were planning to dump that?). SMW/etc. repos shouldn't be our concern.

Jdforrester-WMF renamed this task from Have a CI test that fails if a Beta Cluster extension has an unsatisfiable dependency to Have a CI test that fails if a Beta Cluster / production extension has an unsatisfiable dependency that blocks merge.Apr 9 2020, 4:42 PM

Yeah, we'd need to also only run this on this for extensions in extensions-list (though I thought we were planning to dump that?). SMW/etc. repos shouldn't be our concern.

I also have a vague memory about dropping extensions-list, but I think there were some early snags in that (cf: T125678: Scap should not rely on extension-list, instead pass --extension-dir to mergeMessageFileList.php) although I don't remember details here.