SCA depends on devportal app

Bug #776505 reported by Michael Nelson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Software Center Agent
Confirmed
Low
Unassigned

Bug Description

Currently the softwarecenteragent app depends on the devportal app, as the Application.tos_url property tries to resolve a dev-portal url, which, without the devportal app, will result in errors like this https://pastebin.canonical.com/47053/ when using the SCA api.

This means that we can't deploy softwarecenteragent without including devportal in the INSTALLED_APPS.

There are other minor dependencies that should be removed also:
 * softwarecenteragent.application_states currently imports from devportal.mailer
 * softwarecenteragent.tests.test_forms imports from devportal.forms

Tags: tech-debt
Revision history for this message
Dave Morley (davmor2) wrote :

Anthony is this still the case?

Changed in software-center-agent:
assignee: nobody → Anthony Lenton (elachuni)
Revision history for this message
Anthony Lenton (elachuni) wrote :

As far as I know this is still the case.

Changed in software-center-agent:
status: New → Confirmed
importance: Undecided → Low
assignee: Anthony Lenton (elachuni) → nobody
tags: added: tech-debt
Revision history for this message
Michael Nelson (michael.nelson) wrote :

The (Published)Application.tos_url now simply references the tos_url from it's published json representation - so it is no longer tied to devportal itself. It is also rendered by an sca url/view now. That said, other aspects are. If I were to work on this today for a /api/2.1/ I'd check the following:

 * The exported tos_url includes a devportal-specific application id - this should be switched to depend only on the sca published app id (currently sca needs to look up devportal.Application objects to serve the request).
 * When a devportal app is published to sca, the license text should be included, so that sca can render the license without devportal.
 * The embedded video urls point at devportal - these should instead point at sca so that USC isn't requesting data from devportal at all, just published app data from sca - this includes the app-id in that url, which currently refers to a devportal app object, rather than the published sca object.
 * Finally, the available apps json should use the "id" attribute of the sca.published application, rather than the devportal app id.

With those done, the sca api would be completely independent of devportal data, allowing the service to run separately (ie. we don't have the same server serving high-volume available app urls, as well as servicing uploads from devs uploading packages) with devportal to publish data via an API call to sca.

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.