https://bugzilla.wikimedia.org/show_bug.cgi?id=53972
Web browser: ---
Bug ID: 53972
Summary: Deployment: Repository .git is synchronised fine, but
is broken for submodules because of hardcoded gitdir
link
Product: Wikimedia
Version: wmf-deployment
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General/Unknown
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
Mobile Platform: ---
The VisualEditor UI has an interface to check what version is currently
deployed (similar to Special:Version), when asking around people seemed to
assume that this has been disabled purposely on the cluster.
However this does not seem to be true.
For one, the configuration around is working perfectly fine.
Though the HEAD commit is retreived by MediaWiki's GitInfo class without shell
(it just reads from the .git/HEAD file directly), I additionally verified that
$wgGitBin (used for calcuating the commit dates with `git show`) has also not
been disabled in production and works fine (tested on tin.eqiad.wmnet).
The .git directory itself is not excluded from our deployment scripts. Though
partial syncs using sync-dir or sync-file will naturally not sync the .git
directory, when using scap or sync-dir on an extension directory, it will be
updated just fine.
And, in fact, [[Special:Version]] does show a git hash (maybe not the best one,
but it does show something).
It doesn't work for extensions because the git data is stored in mediawiki-core
(e.g. mediawiki-core/extensions/VisualEditor/.git is a placeholder file with a
pointer to mediawiki-core/.git/modules/extensions/VisualEditor), and the
pointer is hardcoded to the location of the working copy on tin, namely
/a/common/php-1.22wmf16, which doesn't exist on apaches.
For example:
krinkle@mw1017:/apache/common/php-1.22wmf16/extensions/VisualEditor$ git show
fatal: Not a git repository:
/a/common/php-1.22wmf16/.git/modules/extensions/VisualEditor
krinkle@mw1017:/apache/common/php-1.22wmf16/extensions/VisualEditor$ cat .git
gitdir: /a/common/php-1.22wmf16/.git/modules/extensions/VisualEditor
I'm not sure whether the resemblance of /a and /apache is a coincendence or
whether one is intended to be a shortcut of the other. Either way, it seems
fairly trivial to make this work.
I'm not sure what the semantic meaning is of these directories (/a/ seems to be
an existing but unused directory on all hosts other than tin).
Depending on whether it is really empty we should probably just create a
symlink from /a to /apache on all machines that have /apache (except for tin),
or if /a is used for other stuff, put symlink inside and have one from
/a/common to /apache/common (except for tin).
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l