Merge lp:~kissiel/checkbox/converged-fixes into lp:checkbox

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Maciej Kisielewski
Approved revision: 4295
Merged at revision: 4296
Proposed branch: lp:~kissiel/checkbox/converged-fixes
Merge into: lp:checkbox
Diff against target: 58 lines (+9/-3)
3 files modified
checkbox-touch/get-libs (+4/-2)
plainbox/plainbox/impl/secure/plugins.py (+1/-1)
plainbox/plainbox/impl/session/assistant.py (+4/-0)
To merge this branch: bzr merge lp:~kissiel/checkbox/converged-fixes
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+290907@code.launchpad.net

Description of the change

This MR adds python3-requests-oauthlib

and makes it easier for the future to find out there are missing libs, instead of just showing cryptic 'test plan missing' pop-up.

7b01cdc plainbox:secure:plugins: don't mark plugincollection as loaded unless it is
322c5e3 plainbox:session:assistant: log-error problems from loading providers
dcb3b46 checkbox-touch: add python3-requests-oauthlib to get-libs

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

I don't see where python3-requests-oauthlib actually gets used here, maybe it was always a missing dep? How was this tested and can I also test it?

review: Needs Information
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

> I don't see where python3-requests-oauthlib actually gets used here, maybe it
> was always a missing dep? How was this tested and can I also test it?

It's a dependency of plainbox. On the device, when the providers are being loaded, the pkg_resources finds this lib missing it stops loading the provider mid-way. No test plans are available afterwards.

To test it, build checkbox-converged and run it on a device.

Simplest way:

cd checkbox-touch
./get-libs
./build-me --install

Revision history for this message
Paul Larson (pwlars) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox-touch/get-libs'
2--- checkbox-touch/get-libs 2015-11-16 10:20:39 +0000
3+++ checkbox-touch/get-libs 2016-04-04 18:35:25 +0000
4@@ -72,7 +72,8 @@
5 'python3-extras', 'python3-evdev']
6 packages = ['libpython3.4', 'pyotherside', 'python3-xlsxwriter',
7 'python3-jinja2', 'python3-markupsafe', 'python3-padme',
8- 'python3-requests', 'python3-urllib3', 'python3-guacamole']
9+ 'python3-requests', 'python3-urllib3', 'python3-guacamole',
10+ 'python3-requests-oauthlib']
11 if get_autopilot:
12 packages += ap_packages
13 # uris will serve as a database of uris from which to download packages
14@@ -220,7 +221,8 @@
15 # ./usr/lib/python3/dist-packages are copied to ./lib/py.
16 python3_libs = ['python3-xlsxwriter', 'python3-jinja2',
17 'python3-markupsafe', 'python3-padme', 'python3-requests',
18- 'python3-urllib3', 'python3-guacamole']
19+ 'python3-urllib3', 'python3-guacamole',
20+ 'python3-requests-oauthlib']
21
22 # additional libs needed to support autopilot tests. these were obtained by
23 # running apt-cache depends on python3-autopilot
24
25=== modified file 'plainbox/plainbox/impl/secure/plugins.py'
26--- plainbox/plainbox/impl/secure/plugins.py 2015-02-06 15:30:54 +0000
27+++ plainbox/plainbox/impl/secure/plugins.py 2016-04-04 18:35:25 +0000
28@@ -480,7 +480,6 @@
29 """
30 if self._loaded:
31 return
32- self._loaded = True
33 start_time = now()
34 entry_point_list = list(self._get_entry_points())
35 entry_point_list.sort(key=lambda ep: ep.name)
36@@ -495,6 +494,7 @@
37 else:
38 self.wrap_and_add_plugin(
39 entry_point.name, obj, now() - start_time)
40+ self._loaded = True
41
42 def _get_entry_points(self):
43 """
44
45=== modified file 'plainbox/plainbox/impl/session/assistant.py'
46--- plainbox/plainbox/impl/session/assistant.py 2016-03-02 14:01:49 +0000
47+++ plainbox/plainbox/impl/session/assistant.py 2016-04-04 18:35:25 +0000
48@@ -564,6 +564,10 @@
49 self._manager = SessionManager.create(self._repo)
50 self._context = self._manager.add_local_device_context()
51 for provider in self._selected_providers:
52+ if provider.problem_list:
53+ _logger.error(
54+ "Problems encountered when loading %s provider: %s",
55+ provider.name, provider.problem_list)
56 self._context.add_provider(provider)
57 self._metadata = self._context.state.metadata
58 self._metadata.app_id = self._app_id

Subscribers

People subscribed via source and target branches