Merge lp://qastaging/~didrocks/ubuntu-release-upgrader/add_telemetry into lp://qastaging/ubuntu-release-upgrader

Proposed by Didier Roche-Tolomelli
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 3135
Merged at revision: 3131
Proposed branch: lp://qastaging/~didrocks/ubuntu-release-upgrader/add_telemetry
Merge into: lp://qastaging/ubuntu-release-upgrader
Diff against target: 549 lines (+176/-55)
8 files modified
DistUpgrade/DistUpgradeController.py (+16/-20)
DistUpgrade/DistUpgradeView.py (+11/-7)
DistUpgrade/DistUpgradeViewGtk3.py (+20/-16)
DistUpgrade/DistUpgradeViewKDE.py (+14/-10)
DistUpgrade/DistUpgradeViewNonInteractive.py (+3/-0)
DistUpgrade/DistUpgradeViewText.py (+5/-2)
DistUpgrade/telemetry.py (+101/-0)
debian/changelog (+6/-0)
To merge this branch: bzr merge lp://qastaging/~didrocks/ubuntu-release-upgrader/add_telemetry
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Brian Murray Approve
Review via email: mp+345088@code.qastaging.launchpad.net

Commit message

Add upgrade telemetry data for later collect in ubuntu-report.

Description of the change

Add upgrade telemetry data for later collect in ubuntu-report.

This was tested with 17.04 -> 18.04 upgrade, in text mode, GTK3 and KDE.

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

Keep in mind that it is possible to from one release to multiple releases e.g. from xenial to artful or bionic. So without knowing the database structure I think it would make sense to also record the "To" release. You can find this in DistUpgradeController.py.

I'm also curious about how this information will be used because the use cases might benefit from gathering additional information like the version of release upgrader being used or environmental variables set.

Otherwise there are a couple of typos and one nitpick to have a look at.

review: Needs Information
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Thanks for the review!
There isn't a fixed database structure schema. However, keep in mind that ubuntu-report gather this results (as well as installers one) under some subfields on the json, alongside collecting a lot of others information.
So basically, we have the "To" and a lot of other details. Moreinfo on https://github.com/ubuntu/ubuntu-report.

For now, we collect those details, similarly than for ubiquity, and we'll organize them next cycle if nobody on IS step up first.

Typos fixed and pushed. Thanks!

3132. By Didier Roche-Tolomelli

Fix some typos

3133. By Didier Roche-Tolomelli

Use uptime time instead of time.time(), which is sensitive to system
clock reset by NTP or others…

3134. By Didier Roche-Tolomelli

Fetch if users enabled third party repos before upgrade

3135. By Didier Roche-Tolomelli

Fetch original install media

Revision history for this message
Brian Murray (brian-murray) wrote :

This looks good to me to merge and upload after the one change is made.

While this may be more useful for the failure case you might consider including what components (-updates, -security, main, universe, etc...) are enabled on the system that was upgraded. Here's an example from an upgrade log file.

2018-05-12 20:32:36,997 DEBUG found components: {'bionic-updates': {'main', 'universe', 'multiverse', 'restricted'}, 'bionic-security': {'main', 'universe', 'multiverse', 'restricted'}, 'bionic': {'main', 'universe', 'multiverse', 'restricted'}}

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

We don't want to include the enabled components for now, but thanks for the suggestion! I'll fix the current uptime comment.

Thanks again for the review :)

Revision history for this message
Brian Murray (brian-murray) :
review: Approve
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Tested artful -> bionic upgrade with this code and it reports the expected telemetry data.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches