Page MenuHomePhabricator

[reportupdater] Allow defaults for all config parameters
Closed, ResolvedPublic5 Estimated Story Points

Description

Today, only the db parameter is allowed to have default.
That was implemented, because of backwards compatibility with the former generate.py.
But it can easily be extended to all other config parameters, so that a config like this:

daily_report:
    type: script
    starts: 2018-01-01
    granularity: days
    explode_by:
        wiki: wikis.txt

weekly_report:
    type: script
    starts: 2018-01-01
    granularity: weeks
    explode_by:
        wiki: wikis.txt

monthly_report:
    type: script
    starts: 2018-01-01
    granularity: months
    explode_by:
        wiki: wikis.txt

could look like that:

defaults:
    type: script
    starts: 2018-01-01
    explode_by:
        wiki: wikis.txt

daily_report:
    granularity: days

weekly_report:
    granularity: weeks

monthly_report:
    granularity: months

ReportUpdater documentation: https://wikitech.wikimedia.org/wiki/Analytics/Systems/Reportupdater
ReportUpdater source code: https://gerrit.wikimedia.org/r/#/admin/projects/analytics/reportupdater

Event Timeline

mforns triaged this task as Unbreak Now! priority.Apr 26 2018, 4:32 PM
mforns moved this task from Incoming to Smart Tools for Better Data on the Analytics board.
mforns lowered the priority of this task from Unbreak Now! to Needs Triage.Apr 26 2018, 4:34 PM
Vvjjkkii renamed this task from [reportupdater] Allow defaults for all config parameters to g5daaaaaaa.Jul 1 2018, 1:14 AM
Vvjjkkii raised the priority of this task from Low to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
AfroThundr3007730 renamed this task from g5daaaaaaa to [reportupdater] Allow defaults for all config parameters.Jul 1 2018, 7:04 AM
AfroThundr3007730 lowered the priority of this task from High to Low.
AfroThundr3007730 updated the task description. (Show Details)
AfroThundr3007730 added a subscriber: Aklapper.
Milimetric raised the priority of this task from Low to Medium.Oct 18 2018, 5:11 PM
Milimetric added a project: good first task.
Milimetric set the point value for this task to 5.

I got a ping from @Geekbug, will update description here to link to ReportUpdater docs and source. Feel free to ping on IRC again.

mforns lowered the priority of this task from Medium to Low.Dec 9 2019, 5:46 PM

Change 623060 had a related patch set uploaded (by Paul Kernfeld; owner: Paul Kernfeld):
[analytics/reportupdater@master] reader.py: Get report granularity from defaults

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

paulkernfeld subscribed.

I saw this was tagged with "good first task" so I put together a partial implementation of this in Gerrit.

@mforns can probably code review this when he is back

Change 623060 merged by Milimetric:
[analytics/reportupdater@master] reader.py: Get all report keys from defaults

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

@Nuria thanks for pointing that out! I just made the companion wiki edit.

Thank you @paulkernfeld , let us know if you are interested on another task, you can ping us in #wikimedia-analytics on irc

an example of one (in js) https://phabricator.wikimedia.org/T261502