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: Yuan-Chen Cheng
Approved revision: 58b75306ae7184fdb0cf07ff58b42ec1108e0884
Merged at revision: 9f591a49a97647247fd1049d12d532827e626a6b
Proposed branch: ~fourdollars/pc-enablement/+git/oem-scripts:master
Merge into: ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master
Diff against target: 100 lines (+34/-3)
4 files modified
debian/changelog (+9/-0)
debian/tests/launchpad-api (+6/-0)
launchpad-api (+4/-1)
mir-bug (+15/-2)
Reviewer Review Type Date Requested Status
Yuan-Chen Cheng (community) Approve
Review via email: mp+407299@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

[BOT]
$ cat oem-scripts-1.9-58b7530-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
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/3K8fwd6Nzb/ oem-scripts-1.9-58b7530-in-docker-focal-complete.log

Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 38037d5..9c26c3d 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+oem-scripts (1.9) UNRELEASED; urgency=medium
7+
8+ * mir-bug: Support the oem-needs-upload and oem-done-upload tags.
9+ * debian/tests/launchpad-api,
10+ launchpad-api: Correct the return code when using `launchpad-api get`
11+ failed.
12+
13+ -- Shih-Yuan Lee (FourDollars) <sylee@canonical.com> Wed, 18 Aug 2021 14:30:31 +0800
14+
15 oem-scripts (1.8) focal; urgency=medium
16
17 * debian/tests/mir-bug,
18diff --git a/debian/tests/launchpad-api b/debian/tests/launchpad-api
19index ff71689..d1b4909 100644
20--- a/debian/tests/launchpad-api
21+++ b/debian/tests/launchpad-api
22@@ -2,7 +2,13 @@
23
24 export LAUNCHPAD_API="https://api.staging.launchpad.net/"
25
26+# LP: #2 doesn't exist so it should return failed.
27+if launchpad-api get bugs/2 2>&1; then
28+ exit 1
29+fi
30+
31 launchpad-api patch bugs/100 tags:='["focal"]'
32+
33 if [ "$(launchpad-api get bugs/100 | jq -r '.tags|join(" ")')" != "focal" ]; then
34 exit 1
35 fi
36diff --git a/launchpad-api b/launchpad-api
37index aa4001e..e6f958c 100755
38--- a/launchpad-api
39+++ b/launchpad-api
40@@ -31,6 +31,9 @@ usage_auth_failed()
41 It could be command error OR your authentication token is removed or expired.
42 If you think it's the authentication issue, you can try to backup/remove
43 the config.ini, get authentication token and try again.
44+If it still failed, it could be a server side issue.
45+
46+launchpad-api is just a shell script wrapper for https://api.launchpad.net/.
47
48 Ex:
49
50@@ -124,7 +127,7 @@ get_api()
51 oauth_timestamp=="$(date +%s)" \
52 oauth_token=="${oauth_token}" \
53 oauth_version=="1.0" \
54- "$@" || ( usage_auth_failed ; usage )
55+ "$@" || ( usage_auth_failed ; usage ; false )
56 }
57
58 patch_api()
59diff --git a/mir-bug b/mir-bug
60index 715aac1..74ec3c2 100755
61--- a/mir-bug
62+++ b/mir-bug
63@@ -456,7 +456,12 @@ def update_bug(
64 if check_bug_tags(bug, certified) is False:
65 tags = copy(bug.tags)
66 if certified:
67- taglist = TAG_LIST + ["ubuntu-certified"]
68+ if args.release:
69+ taglist = TAG_LIST + ["ubuntu-certified", "oem-done-upload"]
70+ elif args.ready:
71+ taglist = TAG_LIST + ["ubuntu-certified", "oem-needs-upload"]
72+ else:
73+ taglist = TAG_LIST + ["ubuntu-certified"]
74 else:
75 taglist = TAG_LIST
76 for tag in taglist:
77@@ -470,6 +475,9 @@ def update_bug(
78 if tag[len("oem-scripts-") :] != oem_scripts.__version__:
79 if yes_or_ask(yes, f"Do you want to remove '{tag}' tag?"):
80 tags.remove(tag)
81+ elif certified and args.release and tag == "oem-needs-upload":
82+ if yes_or_ask(yes, f"Do you want to remove '{tag}' tag?"):
83+ tags.remove(tag)
84 if tags != bug.tags:
85 bug.tags = tags
86
87@@ -786,7 +794,12 @@ def check_bug_tags(bug, certified: bool = False) -> bool:
88 info("Checking bug tags...")
89 result = True
90 if certified:
91- taglist = TAG_LIST + ["ubuntu-certified"]
92+ if args.release:
93+ taglist = TAG_LIST + ["ubuntu-certified", "oem-done-upload"]
94+ elif args.ready:
95+ taglist = TAG_LIST + ["ubuntu-certified", "oem-needs-upload"]
96+ else:
97+ taglist = TAG_LIST + ["ubuntu-certified"]
98 else:
99 taglist = TAG_LIST
100 for tag in taglist:

Subscribers

People subscribed via source and target branches