Merge lp:~matiasb/launchpad-buildd/set-build-request-id-prefix into lp:launchpad-buildd

Proposed by Matias Bordese on 2019-05-08
Status: Merged
Merged at revision: 378
Proposed branch: lp:~matiasb/launchpad-buildd/set-build-request-id-prefix
Merge into: lp:launchpad-buildd
Diff against target: 43 lines (+5/-4)
2 files modified
lpbuildd/target/build_snap.py (+2/-1)
lpbuildd/target/tests/test_build_snap.py (+3/-3)
To merge this branch: bzr merge lp:~matiasb/launchpad-buildd/set-build-request-id-prefix
Reviewer Review Type Date Requested Status
Colin Watson 2019-05-08 Approve on 2019-05-08
Review via email: mp+367119@code.launchpad.net

Commit message

Updated build-request-id tag to set lp prefix.

To post a comment you must log in.
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lpbuildd/target/build_snap.py'
2--- lpbuildd/target/build_snap.py 2019-04-26 13:14:13 +0000
3+++ lpbuildd/target/build_snap.py 2019-05-08 14:54:02 +0000
4@@ -202,7 +202,8 @@
5 def image_info(self):
6 data = {}
7 if self.args.build_request_id is not None:
8- data["build-request-id"] = self.args.build_request_id
9+ data["build-request-id"] = 'lp-{}'.format(
10+ self.args.build_request_id)
11 if self.args.build_request_timestamp is not None:
12 data["build-request-timestamp"] = self.args.build_request_timestamp
13 if self.args.build_url is not None:
14
15=== modified file 'lpbuildd/target/tests/test_build_snap.py'
16--- lpbuildd/target/tests/test_build_snap.py 2019-04-26 13:14:13 +0000
17+++ lpbuildd/target/tests/test_build_snap.py 2019-05-08 14:54:02 +0000
18@@ -460,7 +460,7 @@
19 RanBuildCommand(
20 ["snapcraft"], cwd="/build/test-snap",
21 SNAPCRAFT_BUILD_INFO="1",
22- SNAPCRAFT_IMAGE_INFO='{"build-request-id": "13"}',
23+ SNAPCRAFT_IMAGE_INFO='{"build-request-id": "lp-13"}',
24 SNAPCRAFT_BUILD_ENVIRONMENT="host"),
25 ]))
26
27@@ -506,14 +506,14 @@
28 SNAPCRAFT_LOCAL_SOURCES="1", SNAPCRAFT_SETUP_CORE="1",
29 SNAPCRAFT_BUILD_INFO="1",
30 SNAPCRAFT_IMAGE_INFO=(
31- '{"build-request-id": "13",'
32+ '{"build-request-id": "lp-13",'
33 ' "build_url": "https://launchpad.example/build"}'),
34 SNAPCRAFT_BUILD_ENVIRONMENT="host")),
35 AnyMatch(RanBuildCommand(
36 ["snapcraft"], cwd="/build/test-snap",
37 SNAPCRAFT_BUILD_INFO="1",
38 SNAPCRAFT_IMAGE_INFO=(
39- '{"build-request-id": "13",'
40+ '{"build-request-id": "lp-13",'
41 ' "build_url": "https://launchpad.example/build"}'),
42 SNAPCRAFT_BUILD_ENVIRONMENT="host")),
43 ))

Subscribers

People subscribed via source and target branches