Merge ~ines-almeida/launchpad:fetch-service-option-db-update into launchpad:db-devel

Proposed by Ines Almeida
Status: Merged
Approved by: Ines Almeida
Approved revision: 77648e8f8d4d5416d72b3748386fdb2984fb75a6
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ines-almeida/launchpad:fetch-service-option-db-update
Merge into: launchpad:db-devel
Diff against target: 16 lines (+10/-0)
1 file modified
database/schema/patch-2211-26-0.sql (+10/-0)
Reviewer Review Type Date Requested Status
William Grant db Approve
Simone Pelosi Approve
Jürgen Gmach Approve
Review via email: mp+461264@code.launchpad.net

Commit message

db: add new field Snap.use_fetch_service

The new field will dictate whether, while building a snap, the builder will use the (new) fetch-service or the (current) builder-proxy for external access

Description of the change

To post a comment you must log in.
Revision history for this message
Ines Almeida (ines-almeida) wrote :

Lint issues don't seem related to this MP. I'll take a look into it tomorrow

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

The linter issues might be caused once again by black and the black plugin for docstrings.

Revision history for this message
Simone Pelosi (pelpsi) :
review: Approve
Revision history for this message
William Grant (wgrant) wrote :

The snap table is small enough that it's fine to set the default up front.

review: Approve (db)
Revision history for this message
Ines Almeida (ines-almeida) wrote :

Rebased db-devel after buildbot successfully built db-devel and merged master into it.
LPCI ran successfully, so I'll merge this one now

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/database/schema/patch-2211-26-0.sql b/database/schema/patch-2211-26-0.sql
2new file mode 100644
3index 0000000..6f60d7e
4--- /dev/null
5+++ b/database/schema/patch-2211-26-0.sql
6@@ -0,0 +1,10 @@
7+-- Copyright 2024 Canonical Ltd. This software is licensed under the
8+-- GNU Affero General Public License version 3 (see the file LICENSE).
9+
10+SET client_min_messages=ERROR;
11+
12+ALTER TABLE Snap ADD COLUMN use_fetch_service boolean DEFAULT false NOT NULL;
13+
14+COMMENT ON COLUMN Snap.use_fetch_service IS 'Whether to use the fetch-service in place of the builder-proxy when building this snap.';
15+
16+INSERT INTO LaunchpadDatabaseRevision VALUES (2211, 26, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: