Merge lp:~lifeless/launchpad/subunit into lp:launchpad/db-devel

Proposed by Robert Collins on 2010-11-27
Status: Merged
Approved by: Stuart Bishop on 2010-12-01
Approved revision: no longer in the source branch.
Merged at revision: 10029
Proposed branch: lp:~lifeless/launchpad/subunit
Merge into: lp:launchpad/db-devel
Diff against target: 79 lines (+28/-0)
4 files modified
database/schema/comments.sql (+8/-0)
database/schema/patch-2208-33-0.sql (+16/-0)
database/schema/security.cfg (+3/-0)
lib/lp/code/doc/branch.txt (+1/-0)
To merge this branch: bzr merge lp:~lifeless/launchpad/subunit
Reviewer Review Type Date Requested Status
Stuart Bishop db 2010-11-27 Approve on 2010-12-01
Martin Pool (community) Needs Information on 2010-11-29
Robert Collins (community) db Approve on 2010-11-27
Review via email: mp+42023@code.launchpad.net

Commit Message

DB patch supporting subunit stream storage against branches.

Description of the Change

Add storage space for subunit streams; will do things with it next cycle.

To post a comment you must log in.
Robert Collins (lifeless) wrote :

Fine by me :P

review: Approve (db)
Martin Pool (mbp) wrote :

Is there a LEP giving context for this?

If these are going to be attached to merge proposals or queues as the comment suggests, perhaps a more general attachment object would be useful, with a MIME type that can say it is subunit.

review: Needs Information
Robert Collins (lifeless) wrote :

On Mon, Nov 29, 2010 at 4:30 PM, Martin Pool <email address hidden> wrote:
> Review: Needs Information
> Is there a LEP giving context for this?

Nope :)

> If these are going to be attached to merge proposals or queues as the comment suggests, perhaps a more general attachment object would be useful, with a MIME type that can say it is subunit.

These are the start of test result support in LP, not generic attachments.

-rob

Stuart Bishop (stub) wrote :

We need an index on stream too to keep the Librarian Garbage Collector happy.

Otherwise fine. patch-2208-33-0.sql

 review approve db
 merge approved

Stuart Bishop (stub) :
review: Approve (db)
Robert Collins (lifeless) wrote :

Will
"+CREATE INDEX SubunitStream__stream__idx ON SubunitStream(stream);"

be sufficient?

Stuart Bishop (stub) wrote :

On Wed, Dec 1, 2010 at 1:22 PM, Robert Collins
<email address hidden> wrote:
> Will
> "+CREATE INDEX SubunitStream__stream__idx ON SubunitStream(stream);"
>
> be sufficient?

Yes.

--
Stuart Bishop <email address hidden>
http://www.stuartbishop.net/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'database/schema/comments.sql'
2--- database/schema/comments.sql 2010-12-01 11:26:57 +0000
3+++ database/schema/comments.sql 2010-12-02 01:47:15 +0000
4@@ -136,6 +136,14 @@
5 COMMENT ON COLUMN SeriesSourcePackageBranch.registrant IS 'The person who registered this link.';
6 COMMENT ON COLUMN SeriesSourcePackageBranch.date_created IS 'The date this link was created.';
7
8+-- SubunitStream
9+
10+COMMENT ON TABLE SubunitStream IS 'Raw gz compressed subunit streams.';
11+COMMENT ON COLUMN SubunitStream.uploader IS 'The account used to upload the stream.';
12+COMMENT ON COLUMN SubunitStream.date_created IS 'The date of the upload.';
13+COMMENT ON COLUMN SubunitStream.branch IS 'The branch which the stream was created on/for/with.';
14+COMMENT ON COLUMN SubunitStream.stream IS 'The library file alias which contains the stream content.';
15+
16 -- BranchSubscription
17
18 COMMENT ON TABLE BranchSubscription IS 'An association between a person or team and a bazaar branch.';
19
20=== added file 'database/schema/patch-2208-33-0.sql'
21--- database/schema/patch-2208-33-0.sql 1970-01-01 00:00:00 +0000
22+++ database/schema/patch-2208-33-0.sql 2010-12-02 01:47:15 +0000
23@@ -0,0 +1,16 @@
24+SET client_min_messages=ERROR;
25+
26+CREATE TABLE SubunitStream (
27+ id SERIAL PRIMARY KEY,
28+ uploader INTEGER NOT NULL REFERENCES Person(id),
29+ date_created timestamp without time zone NOT NULL
30+ DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC'),
31+ branch INTEGER NOT NULL REFERENCES Branch(id),
32+ stream INTEGER NOT NULL REFERENCES LibraryFileAlias(id)
33+);
34+
35+CREATE INDEX SubunitStream__uploader_created__idx ON SubunitStream(uploader, date_created);
36+CREATE INDEX SubunitStream__branch_created__idx ON SubunitStream(branch, date_created);
37+CREATE INDEX SubunitStream__stream__idx ON SubunitStream(stream);
38+
39+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 33, 0);
40
41=== modified file 'database/schema/security.cfg'
42--- database/schema/security.cfg 2010-12-01 11:26:57 +0000
43+++ database/schema/security.cfg 2010-12-02 01:47:15 +0000
44@@ -281,6 +281,7 @@
45 public.staticdiff = SELECT, INSERT, UPDATE
46 public.structuralsubscription = SELECT, INSERT, UPDATE, DELETE
47 public.suggestivepotemplate = SELECT, INSERT, DELETE
48+public.subunitstream = SELECT, INSERT, UPDATE, DELETE
49 public.temporaryblobstorage = SELECT, INSERT, DELETE
50 public.translationgroup = SELECT, INSERT, UPDATE
51 public.translationimportqueueentry = SELECT, INSERT, UPDATE, DELETE
52@@ -346,6 +347,7 @@
53 public.sourcepackagepublishinghistory = SELECT
54 public.sourcepackagerelease = SELECT
55 public.specification = SELECT
56+public.subunitstream = SELECT
57 public.translationmessage = SELECT, INSERT, UPDATE
58 public.translationtemplateitem = SELECT
59
60@@ -398,6 +400,7 @@
61 public.product = SELECT
62 public.productreleasefile = SELECT
63 public.project = SELECT
64+public.subunitstream = SELECT
65 public.shipitreport = SELECT
66 public.shippingrun = SELECT
67 public.sprint = SELECT
68
69=== modified file 'lib/lp/code/doc/branch.txt'
70--- lib/lp/code/doc/branch.txt 2010-10-06 18:53:53 +0000
71+++ lib/lp/code/doc/branch.txt 2010-12-02 01:47:15 +0000
72@@ -405,6 +405,7 @@
73 sourcepackagerecipedata.base_branch
74 sourcepackagerecipedatainstruction.branch
75 specificationbranch.branch
76+ subunitstream.branch
77 translationtemplatesbuild.branch
78
79 (Unfortunately, references can form a cycle-- note that

Subscribers

People subscribed via source and target branches

to status/vote changes: