Merge ~jugmac00/launchpad:identify-ppa-as-official-db.patch into launchpad:db-devel

Proposed by Jürgen Gmach
Status: Merged
Approved by: Jürgen Gmach
Approved revision: cffcbb2144e202afaa4f9bb9ea51abc17effc08c
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~jugmac00/launchpad:identify-ppa-as-official-db.patch
Merge into: launchpad:db-devel
Diff against target: 20 lines (+14/-0)
1 file modified
database/schema/patch-2211-10-0.sql (+14/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) db Approve
William Grant db Approve
Review via email: mp+430753@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2022-09-29.

Commit message

Add `Archive.official` database column

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) wrote : Posted in a previous version of this proposal

For details see https://warthogs.atlassian.net/browse/LP-905

tl/dr We need this field as `Archive.purpose` is not sufficient to support the new usecases for private distributions, which rely on more than one archive.

Revision history for this message
Colin Watson (cjwatson) wrote : Posted in a previous version of this proposal

Adding William for a second DB review.

review: Approve (db)
Revision history for this message
Colin Watson (cjwatson) wrote : Posted in a previous version of this proposal

Oh, also I just noticed that you've proposed this branch against master. You need to rebase it onto db-devel and propose it for merging into db-devel.

review: Needs Resubmitting (db)
Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Thanks Colin! I just re-submitted the MP and updated the comment.

Revision history for this message
William Grant (wgrant) wrote :

Do we want to make sure this is set to True for PRIMARY and PARTNER?

review: Approve (db)
Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Yes, indeed. I am currently writing a garbo job to pre-populate the field for the mentioned reason.

Additionally, we agreed upon that distribution owners can set it to TRUE for PPAs.

Actually, we have not discussed whether it should be possible for distribution owners to set the field to False, even when the purpose is PRIMARY/PARTNER - that is something we need to decide.

When you asked that question, did you have some constraints in mind from the database side or do you think the garbo job is the way to go?

Revision history for this message
William Grant (wgrant) wrote :

I'd just add an `UPDATE archive SET official = true WHERE purpose IN (1, 4);` at the end of the DB patch.

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

That sounds like a better approach. Thanks.

Do we need to remove the UPDATE statement at some point in time? e.g. when all the patches will be consolidated into the launchapd-xxxx-xx-x.sql file?

Revision history for this message
Colin Watson (cjwatson) wrote :

No need to do anything special there - a rebaseline will automatically drop the `UPDATE`, since rebaselines are done by doing a `pg_dump` of the new database state.

review: Approve (db)
Revision history for this message
Colin Watson (cjwatson) (last edit ):
Revision history for this message
Colin Watson (cjwatson) wrote :

(Ignore my comment starting with "This `UPDATE` turns out to be a bit of a problem" - I meant to remove that while editing but missed it.)

Revision history for this message
William Grant (wgrant) :

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

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

to status/vote changes: