Merge ~lamoura/ubuntu/+source/ubuntu-advantage-tools:upload-29.3-mantic into ubuntu/+source/ubuntu-advantage-tools:ubuntu/devel

Proposed by Lucas Albuquerque Medeiros de Moura
Status: Merged
Merged at revision: 8de7686c99e692d69a8ff4a74772b8be3570edd6
Proposed branch: ~lamoura/ubuntu/+source/ubuntu-advantage-tools:upload-29.3-mantic
Merge into: ubuntu/+source/ubuntu-advantage-tools:ubuntu/devel
Diff against target: 92 lines (+42/-2)
4 files modified
debian/changelog (+7/-0)
features/api.feature (+33/-0)
uaclient/api/u/pro/status/enabled_services/v1.py (+1/-1)
uaclient/version.py (+1/-1)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior (community) Approve
Ubuntu Sponsors Pending
Canonical Server Reporter Pending
Review via email: mp+450057@code.launchpad.net

Description of the change

Release 29.3 of Ubuntu Pro client addressing a bug on importing an API endpoint

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks, Lucas.

I see that the builds have passed. The changes are simple, so +1 from me.

Uploaded:

$ dput ubuntu-advantage-tools_29.3_source.changes
Trying to upload package to ubuntu
Checking signature on .changes
gpg: /home/sergio/work/ubuntu-advantage-tools/ubuntu-advantage-tools_29.3_source.changes: Valid signature from 106DA1C8C3CBBF14
Checking signature on .dsc
gpg: /home/sergio/work/ubuntu-advantage-tools/ubuntu-advantage-tools_29.3.dsc: Valid signature from 106DA1C8C3CBBF14
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ubuntu-advantage-tools_29.3.dsc: done.
  Uploading ubuntu-advantage-tools_29.3.tar.xz: done.
  Uploading ubuntu-advantage-tools_29.3_source.buildinfo: done.
  Uploading ubuntu-advantage-tools_29.3_source.changes: done.
Successfully uploaded packages.

review: Approve
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Also uploaded to X/B/F/J/L.

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 1378858..308c1d7 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+ubuntu-advantage-tools (29.3) mantic; urgency=medium
7+
8+ * api: fix circular import that prevents enabled_services
9+ endpoint from being imported
10+
11+ -- Lucas Moura <lucas.moura@canonical.com> Fri, 25 Aug 2023 14:26:37 -0300
12+
13 ubuntu-advantage-tools (29.2) mantic; urgency=medium
14
15 * d/ubuntu-advantage-tools.postinst:
16diff --git a/features/api.feature b/features/api.feature
17index f7ce206..31a8691 100644
18--- a/features/api.feature
19+++ b/features/api.feature
20@@ -1,6 +1,39 @@
21 Feature: Client behaviour for the API endpoints
22
23 @series.all
24+ @uses.config.machine_type.any
25+ @uses.config.machine_type.lxd-container
26+ Scenario Outline: all API endpoints can be imported individually
27+ Given a `<release>` `<machine_type>` machine with ubuntu-advantage-tools installed
28+ When I run `python3 -c "from uaclient.api.u.pro.attach.auto.configure_retry_service.v1 import configure_retry_service"` as non-root
29+ When I run `python3 -c "from uaclient.api.u.pro.attach.auto.full_auto_attach.v1 import full_auto_attach"` as non-root
30+ When I run `python3 -c "from uaclient.api.u.pro.attach.auto.should_auto_attach.v1 import should_auto_attach"` as non-root
31+ When I run `python3 -c "from uaclient.api.u.pro.attach.magic.initiate.v1 import initiate"` as non-root
32+ When I run `python3 -c "from uaclient.api.u.pro.attach.magic.revoke.v1 import revoke"` as non-root
33+ When I run `python3 -c "from uaclient.api.u.pro.attach.magic.wait.v1 import wait"` as non-root
34+ When I run `python3 -c "from uaclient.api.u.pro.packages.summary.v1 import summary"` as non-root
35+ When I run `python3 -c "from uaclient.api.u.pro.packages.updates.v1 import updates"` as non-root
36+ When I run `python3 -c "from uaclient.api.u.pro.security.fix.cve.plan.v1 import plan"` as non-root
37+ When I run `python3 -c "from uaclient.api.u.pro.security.fix.usn.plan.v1 import plan"` as non-root
38+ When I run `python3 -c "from uaclient.api.u.pro.security.status.livepatch_cves.v1 import livepatch_cves"` as non-root
39+ When I run `python3 -c "from uaclient.api.u.pro.security.status.reboot_required.v1 import reboot_required"` as non-root
40+ When I run `python3 -c "from uaclient.api.u.pro.status.enabled_services.v1 import enabled_services"` as non-root
41+ When I run `python3 -c "from uaclient.api.u.pro.status.is_attached.v1 import is_attached"` as non-root
42+ When I run `python3 -c "from uaclient.api.u.pro.version.v1 import version"` as non-root
43+ When I run `python3 -c "from uaclient.api.u.security.package_manifest.v1 import package_manifest"` as non-root
44+ When I run `python3 -c "from uaclient.api.u.unattended_upgrades.status.v1 import status"` as non-root
45+ When I run `python3 -c "from uaclient.api.u.apt_news.current_news.v1 import current_news"` as non-root
46+
47+ Examples: ubuntu release
48+ | release | machine_type |
49+ | xenial | lxd-container |
50+ | bionic | lxd-container |
51+ | focal | lxd-container |
52+ | jammy | lxd-container |
53+ | lunar | lxd-container |
54+ | mantic | lxd-container |
55+
56+ @series.all
57 @uses.config.machine_type.lxd-container
58 Scenario Outline: API invalid endpoint or args
59 Given a `<release>` machine with ubuntu-advantage-tools installed
60diff --git a/uaclient/api/u/pro/status/enabled_services/v1.py b/uaclient/api/u/pro/status/enabled_services/v1.py
61index 3e2e398..440c1f2 100644
62--- a/uaclient/api/u/pro/status/enabled_services/v1.py
63+++ b/uaclient/api/u/pro/status/enabled_services/v1.py
64@@ -11,7 +11,6 @@ from uaclient.data_types import (
65 StringDataValue,
66 data_list,
67 )
68-from uaclient.entitlements.entitlement_status import UserFacingStatus
69
70
71 class EnabledService(DataObject):
72@@ -48,6 +47,7 @@ def enabled_services() -> EnabledServicesResult:
73
74 def _enabled_services(cfg: UAConfig) -> EnabledServicesResult:
75 from uaclient.entitlements import ENTITLEMENT_CLASSES
76+ from uaclient.entitlements.entitlement_status import UserFacingStatus
77
78 if not _is_attached(cfg).is_attached:
79 return EnabledServicesResult(enabled_services=[])
80diff --git a/uaclient/version.py b/uaclient/version.py
81index 5191f37..4d61635 100644
82--- a/uaclient/version.py
83+++ b/uaclient/version.py
84@@ -15,7 +15,7 @@ from uaclient.defaults import CANDIDATE_CACHE_PATH, UAC_RUN_PATH
85 from uaclient.exceptions import ProcessExecutionError
86 from uaclient.system import subp
87
88-__VERSION__ = "29.2"
89+__VERSION__ = "29.3"
90 PACKAGED_VERSION = "@@PACKAGED_VERSION@@"
91
92 CANDIDATE_REGEX = r"Candidate: (?P<candidate>.*?)\n"

Subscribers

People subscribed via source and target branches

to status/vote changes: