Merge ~ilasc/launchpad:populate-store-upload-revision into launchpad:master
Proposed by
Ioana Lasc
Status: | Merged |
---|---|
Approved by: | Ioana Lasc |
Approved revision: | 87014a2cd2a230179585b1d3db9b26aad4f21014 |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~ilasc/launchpad:populate-store-upload-revision |
Merge into: | launchpad:master |
Diff against target: |
252 lines (+149/-5) 4 files modified
database/schema/security.cfg (+1/-0) lib/lp/scripts/garbo.py (+51/-2) lib/lp/scripts/tests/test_garbo.py (+83/-1) lib/lp/snappy/model/snapbuild.py (+14/-2) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson (community) | Approve | ||
Review via email: mp+407679@code.launchpad.net |
Commit message
Populate store_upload_
Description of the change
This populates the new DB column store_upload_
We're renaming the existent "store_
This work will be followed by a second MP for LP-349 to start updating the new DB column "store_
To post a comment you must log in.
Thanks Colin! That helped debug interactively and get to the bottom of it. It turns out the script was in fact getting triggered but it was failing with a "hidden" SilentLaunchpad ScriptFailure caused by garbo_daily not having enough permissions to update SnapBuild.
In terms of breaking API clients that expect the `store_ upload_ revision` attribute of a snap build to contain useful data, indeed I believe we have a problem there:
I might be misunderstanding this but it looks like we now have a collision between the DB column name and the property that I didn't realize was exposed through the API before we landed the DB patch. I think we won't be able to define a getter with the same name and have it exposed through API same as before along the lines of:
def store_upload_ revision( self): upload_ revision is None: upload_ revision
if self.store_
return self._store_
because that will interfere with the query to populate the DB (the new getter will not return None when it should so we can backfill, it would return the value in the former property).
I could propose a patch to alter the name of the currently empty column from "store_ upload_ revision" to "store_revision".
It's entirely possible I misunderstood what's possible / what's required (for backward compatibility) here though...