Merge lp:~ted/ubuntu-app-launch/dont-check-snapd into lp:ubuntu-app-launch/16.10

Proposed by Ted Gould
Status: Merged
Approved by: Charles Kerr
Approved revision: 256
Merged at revision: 263
Proposed branch: lp:~ted/ubuntu-app-launch/dont-check-snapd
Merge into: lp:ubuntu-app-launch/16.10
Diff against target: 43 lines (+11/-1)
3 files modified
libubuntu-app-launch/application-impl-snap.cpp (+5/-0)
libubuntu-app-launch/snapd-info.cpp (+5/-0)
tests/libual-cpp-test.cc (+1/-1)
To merge this branch: bzr merge lp:~ted/ubuntu-app-launch/dont-check-snapd
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
unity-api-1-bot continuous-integration Approve
Review via email: mp+306669@code.launchpad.net

Commit message

Make sure we don't check snapd if we know it won't return useful results

Description of the change

More cleaning of warnings

** (process:8522): WARNING **: Unable to get snap information for '': snapd HTTP server returned an error: Couldn't connect to server

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:256
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/105/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/764
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/770
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/578
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/578/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/578
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/578/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/578
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/578/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/578
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/578/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/578
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/578/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/578
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/578/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/578
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/578/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/578
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/578/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/578
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/578/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/105/rebuild

review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libubuntu-app-launch/application-impl-snap.cpp'
2--- libubuntu-app-launch/application-impl-snap.cpp 2016-08-25 17:56:40 +0000
3+++ libubuntu-app-launch/application-impl-snap.cpp 2016-09-23 20:38:55 +0000
4@@ -285,6 +285,11 @@
5 */
6 bool Snap::hasAppId(const AppID& appId, const std::shared_ptr<Registry>& registry)
7 {
8+ if (appId.package.value().empty() || appId.version.value().empty())
9+ {
10+ return false;
11+ }
12+
13 if (!std::regex_match(appId.appname.value(), appnameRegex))
14 {
15 return false;
16
17=== modified file 'libubuntu-app-launch/snapd-info.cpp'
18--- libubuntu-app-launch/snapd-info.cpp 2016-08-26 21:05:26 +0000
19+++ libubuntu-app-launch/snapd-info.cpp 2016-09-23 20:38:55 +0000
20@@ -74,6 +74,11 @@
21 return {};
22 }
23
24+ if (package.value().empty())
25+ {
26+ return {};
27+ }
28+
29 try
30 {
31 auto snapnode = snapdJson("/v2/snaps/" + package.value());
32
33=== modified file 'tests/libual-cpp-test.cc'
34--- tests/libual-cpp-test.cc 2016-08-29 14:29:50 +0000
35+++ tests/libual-cpp-test.cc 2016-09-23 20:38:55 +0000
36@@ -767,7 +767,7 @@
37 TEST_F(LibUAL, ApplicationList)
38 {
39 #ifdef ENABLE_SNAPPY
40- SnapdMock snapd{SNAPD_TEST_SOCKET, {u8Package, u8Package, u8Package, interfaces, u8Package}};
41+ SnapdMock snapd{SNAPD_TEST_SOCKET, {u8Package, interfaces, u8Package}};
42 registry = std::make_shared<ubuntu::app_launch::Registry>();
43 #endif
44

Subscribers

People subscribed via source and target branches