Merge ~fourdollars/pc-enablement/+git/oem-scripts:master into ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master

Proposed by Shih-Yuan Lee
Status: Merged
Approved by: Shih-Yuan Lee
Approved revision: 17a41409f356de870046fbaf1517ea23c498b1a0
Merged at revision: cd7830b3009effb43d6e73a10cceb63fbde4b39b
Proposed branch: ~fourdollars/pc-enablement/+git/oem-scripts:master
Merge into: ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master
Diff against target: 45 lines (+19/-2)
2 files modified
bootstrap-meta (+12/-2)
debian/changelog (+7/-0)
Reviewer Review Type Date Requested Status
Yao Wei Approve
Review via email: mp+409298@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Yao Wei (medicalwei) wrote :

LGTM. Triggered the error case using my account:

➜ oem-scripts git:(17a4140) ✗ ./bootstrap-meta update-sru-bug ../oem-hw-info/platform-info/stella.cmit/fossa-ivysaur.json --kernel linux-generic-hwe-20.04 --ready

<INFO> Using oem-scripts login
Do you want to update LP#1945186 - "Update the hardware support for HP Z2 Mini G5 Workstation, SFF G5 Workstation, TWR G5 Workstation in oem-stella.cmit-ivysaur-meta" for linux-generic-hwe-20.04? (y/n) y

<WARNING> Yao Wei doesn't have the permission to change the status of "oem-stella.cmit-ivysaur-meta (Ubuntu)".

<INFO> LP#1945186 - "Update the hardware support for HP Z2 Mini G5 Workstation, SFF G5 Workstation, TWR G5 Workstation in oem-stella.cmit-ivysaur-meta" has been updated.

review: Approve
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

[BOT]
$ cat oem-scripts-1.17-17a4140-in-docker-focal-summary.log
autopkgtest-collect-credentials PASS
autopkgtest-oem-scripts-auto PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bootstrap-meta PASS
bug-bind PASS
get-private-ppa PASS
jq-lp PASS
launchpad-api PASS
lp-bug PASS
oem-meta-packages PASS
pkg-list PASS
review-merge-proposal PASS
run-autopkgtest PASS
setup-apt-dir PASS
mir-bug SKIP exit status 77 and marked as skippable
git-url-insteadof-setting PASS
lp-dl-attm PASS
recovery-from-iso.sh PASS
mir-bug-verification PASS
https://paste.ubuntu.com/p/vt7RXwtrw6/ oem-scripts-1.17-17a4140-in-docker-focal-complete.log

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bootstrap-meta b/bootstrap-meta
2index 094a6fe..7f7391e 100755
3--- a/bootstrap-meta
4+++ b/bootstrap-meta
5@@ -380,13 +380,23 @@ class BootstrapMetaSRU(BootstrapMeta):
6 task.status = "Triaged"
7 else:
8 task.status = "Confirmed"
9- task.lp_save()
10+ try:
11+ task.lp_save()
12+ except lazr.restfulclient.errors.Unauthorized:
13+ warning(
14+ f'{lp.me.display_name} doesn\'t have the permission to change the status of "{task.bug_target_name}".'
15+ )
16
17 if not focal_series_found and release:
18 task = bug.addTask(target=lp.projects[f"ubuntu/focal/+source/{self.meta}"])
19 task.status = "In Progress"
20 task.importance = "High"
21- task.lp_save()
22+ try:
23+ task.lp_save()
24+ except lazr.restfulclient.errors.Unauthorized:
25+ warning(
26+ f'{lp.me.display_name} doesn\'t have the permission to add the task for "{task.bug_target_name}".'
27+ )
28
29 if lp.service_root != "https://api.launchpad.net/":
30 info(f'{bug.web_link} - "{bug.title}" has been updated.')
31diff --git a/debian/changelog b/debian/changelog
32index 0c262c6..80c6eca 100644
33--- a/debian/changelog
34+++ b/debian/changelog
35@@ -1,3 +1,10 @@
36+oem-scripts (1.17) UNRELEASED; urgency=medium
37+
38+ * bootstrap-meta: Try to catch some permission problem and avoid the
39+ failures.
40+
41+ -- Shih-Yuan Lee (FourDollars) <sylee@canonical.com> Tue, 28 Sep 2021 21:36:15 +0800
42+
43 oem-scripts (1.16) focal; urgency=medium
44
45 * debian/install,

Subscribers

People subscribed via source and target branches