Last modified: 2014-07-07 15:40:12 UTC
Path to reports from wikimetrics UI look like: http://localhost:5000/static/public/1/full_report.json Instead they should be like: http://localhost:5000/static/public/wiki/newly-register-users/full_report.json http://localhost:5000/static/public/<metric>/<cohort>/full_report.json
To be clear, this can be implemented with a symlink tree that abides to our conevention.
Note: Symlinking the reports is good enough Note: We do not need to change the report generating code. Note: It's only about the CronUsers recurrent public reports current status: domain/static/public/124124/full_report.json desired (only for WikimetricsBot): domain/static/public/WikimetricsBot/<metric>/<cohort>.json
Change 143040 had a related patch set uploaded by Milimetric: Add pretty symlink for WikimetricsBot https://gerrit.wikimedia.org/r/143040
Change 143040 merged by jenkins-bot: Add pretty symlink for WikimetricsBot https://gerrit.wikimedia.org/r/143040
As we kicked symlink handling down the road for the backup script, and this card is now adding symlinks, this card needs to make the backup work with symlinks. Hence, reopening the bug. I had a short look, but it seems that wikimetrics generates absolute symlink targets, starting in /srv/wikimetrics/[...] instead of relative links. This use of absolute targets for symlinks unnecessarily binds the directory of public files to the full path where wikimetrics gets deployed to. Also, since the backup is currently grabbing the public files from /var/lib/wikimetrics, having the symlinks' absolute targets start in /srv/wikimetrics would make it necessary that the backup grabs files outside of its public directory. So it would make it hard for the backup to determine which targets of symbolic links are fine, and which are not. Could we use relative targets for links instead? That way, we could keep wikimetric's internal logic bound to the wikimetrics repository and would not need to duplicate this internal logic to the external backup script. And also, it would make the public files directory more portable.
Yes, we can change it to relative symlinks.
Change 144439 had a related patch set uploaded by Nuria: Making pretty report symlinks relative https://gerrit.wikimedia.org/r/144439
Change 144439 merged by jenkins-bot: Making pretty report symlinks relative https://gerrit.wikimedia.org/r/144439