← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~alvarocs/launchpad:fetch-service-column-charmrecipe into launchpad:db-devel

 

Alvaro Crespo Serrano has proposed merging ~alvarocs/launchpad:fetch-service-column-charmrecipe into launchpad:db-devel.

Commit message:
Add 'use_fetch_service' and 'fetch_service_policy' columns to CharmRecipe table

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~alvarocs/launchpad/+git/launchpad/+merge/485870

In order to integrate charm builds for superdistro machinery, we need to make fetch service configurable for Charms. This already exists for other crafts such as Rocks, Snaps and Sources.
 - use_fetch_service: flag to use fetch service instead of the builder proxy.
 - fetch_service_policy: to enable configuration of the fetch service policy.

DB patch allocation 2211-39-0: https://git.launchpad.net/~launchpad/+git/dbpatches/commit/?id=0980f6db8e967f14eafe3280c95a87005e7b37d1
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~alvarocs/launchpad:fetch-service-column-charmrecipe into launchpad:db-devel.
diff --git a/database/schema/patch-2211-39-0.sql b/database/schema/patch-2211-39-0.sql
new file mode 100644
index 0000000..ae3be1f
--- /dev/null
+++ b/database/schema/patch-2211-39-0.sql
@@ -0,0 +1,14 @@
+-- Copyright 2025 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+ALTER TABLE CharmRecipe ADD COLUMN use_fetch_service boolean DEFAULT false NOT NULL;
+COMMENT ON COLUMN CharmRecipe.use_fetch_service IS 'Whether to use the fetch-service in place of the builder-proxy when building this charm.';
+
+-- The default value of 1 will point to the 'strict' policy for the
+-- 'fetch_service_policy' column
+ALTER TABLE CharmRecipe ADD COLUMN fetch_service_policy integer DEFAULT 1 NOT NULL;
+COMMENT ON COLUMN CharmRecipe.fetch_service_policy IS 'Enum describing which fetch service policy to use when building this charm.';
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2211, 39, 0);