Developer added video url but it didn't appear in USC or apps.ubuntu.com

Bug #1215399 reported by Dave Morley
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Software Center Agent
Fix Released
Medium
Michael Nelson

Bug Description

THe Zeegaree Dev added a video url for their application but is doesn't show in USC (see screenshot attached) Somehow the video url was missing from the api list.

Revision history for this message
Dave Morley (davmor2) wrote :
Revision history for this message
Michael Nelson (michael.nelson) wrote :

The video is indeed present in the feed, and from the screenshot, USC is finding the video_embedded_html_url [1], but software-center-agent doesn't think the url is correct and instead renders a 404 with "The requested video is not available".

The reason is that SCA doesn't think the sha1 is a hash of the URL, and indeed it's not [2]. Manually constructing the url which should be published with the correct hash does indeed work [3].

So, why is the video url not matching the hash... from a quick look at the code, it looks to be fallout from a recent-ish change we made to only update the approved changes (Application.request_changes and Application._apply_immediate_changes). This would mean that the published video_urls attribute was updated from a previous value, but without updating the published video_embedded_html_urls. Indeed, I can verify this is the case because checking for older videos for zeegaree on vimeo, you can see that one from 4 months ago matches the hash [4].

[1] https://myapps.developer.ubuntu.com/dev/apps/1623/video/6d6550441e87c8c43b69e9eaeedaf49e9dce610c/
[2] hashlib.sha1('http://vimeo.com/65380474').hexdigest()
'd3b70b4008f035bf4d8cd4a35be72f071a8e8228'
[3] https://myapps.developer.ubuntu.com/dev/apps/1623/video/d3b70b4008f035bf4d8cd4a35be72f071a8e8228/
[4] hashlib.sha1('http://vimeo.com/62694828').hexdigest()
 '6d6550441e87c8c43b69e9eaeedaf49e9dce610c'

Changed in software-center-agent:
assignee: Ubuntu One web team (ubuntuone-web) → Michael Nelson (michael.nelson)
Revision history for this message
Michael Nelson (michael.nelson) wrote :

So the issue was that when we calculated the pending changes, we were stripping out any fields which contained calculated values ('price' legacy field based on 'prices', 'icon_url' legacy field based on icon_urls, and video_embedded_html_urls field which is calculated from the video_urls). This was originally done so that reviewers wouldn't need to see the duplicate data.

But, later the view was updated to only approve and publish the changes with which the reviewer was presented (get_pending_changes), so those three fields were not updated in the published json, although their current counterparts were (icon_urls, prices, video_urls).

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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