Up the max_days for metrics

Bug #1869912 reported by LukeWH
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Software Center Agent
Fix Released
Undecided
Maximiliano Bertacchini

Bug Description

Some snaps have been active for more than 2 years - we should increase the maximum days to reflect this.

In the front-end we'd like to add a 5 years option, currently the max_days is set to 1095 (2.9 years), we'd want it to be over 1827.

Cheers!

Revision history for this message
Maximiliano Bertacchini (maxiberta) wrote :

Just updated staging to 1830, and filed a ticket to update prod as well.

Changed in software-center-agent:
status: New → In Progress
assignee: nobody → Maximiliano Bertacchini (maxiberta)
Revision history for this message
Maximiliano Bertacchini (maxiberta) wrote :

Production is now snapstats_max_metric_interval=1830 (~5 years).

Changed in software-center-agent:
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
LukeWH (0-luke) wrote :

This doesn't seem to be coming through to the API yet - should it be?

I Just to be clear, this is the endpoint and payload, with associated result.

POST: https://dashboard.snapcraft.io/dev/api/snaps/metrics
Payload:
{'filters': [{'metric_name': 'weekly_installed_base_by_version', 'snap_id': 'RT9mcUhVsRYrDLG8qnvGiy26NKvv6Qkd', 'start': '2015-04-01', 'end': '2020-04-02'}, {'metric_name': 'weekly_installed_base_by_country', 'snap_id': 'RT9mcUhVsRYrDLG8qnvGiy26NKvv6Qkd', 'start': '2020-04-02', 'end': '2020-04-02'}]}

Returned error:
[{'extra': {'end': '2020-04-02', 'start': '2015-04-01', 'index': 0, 'max_days': 1095}, 'message': 'Filter interval larger than 1095 days at index 0', 'code': 'invalid-date-interval'}]

Changed in software-center-agent:
status: Fix Released → In Progress
Revision history for this message
Maximiliano Bertacchini (maxiberta) wrote :

Confirmed working on prod now.

Changed in software-center-agent:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.