Merge lp://staging/~michihenning/thumbnailer/snap into lp://staging/thumbnailer/devel

Proposed by Michi Henning
Status: Merged
Approved by: James Henstridge
Approved revision: 371
Merged at revision: 369
Proposed branch: lp://staging/~michihenning/thumbnailer/snap
Merge into: lp://staging/thumbnailer/devel
Diff against target: 127 lines (+90/-5)
4 files modified
.bzrignore (+5/-1)
snapcraft.yaml (+80/-0)
tests/copyright/check_copyright.sh (+1/-1)
tests/whitespace/CMakeLists.txt (+4/-3)
To merge this branch: bzr merge lp://staging/~michihenning/thumbnailer/snap
Reviewer Review Type Date Requested Status
James Henstridge Approve
unity-api-1-bot continuous-integration Approve
Review via email: mp+315538@code.staging.launchpad.net

Commit message

First stab at snapcraft.yaml.

Description of the change

First stab at snapcraft.yaml.

It's not clear yet whether we really want to use the generic DBus interface or add our own interface to snapd. For now, we use the generic one; this works, in that thumbnailer-admin can talk to the (hand-started) thumbnailer-service. Presumably, that's because both are in the same snap. Next step will be to try with thumbnailer-admin in a separate snap.

To try this (from the top-level dir):

$ snapcraft
$ thumbnailer.thumbnailer-service &
$ thumbnailer.thumbnailer-admin stats

To post a comment you must log in.
Revision history for this message
James Henstridge (jamesh) wrote :

One small problem, and a few questions.

review: Needs Fixing
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michi Henning (michihenning) wrote :

Replied inline, thanks!

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
James Henstridge (jamesh) wrote :

Looks good. I am a bit concerned about the "control" slot you're exposing though: the dbus interface auto connects, and I don't think we want this one auto-connecting.

Also, we don't ever acquire the name "com.canonical.ThumbnailerAdmin", so that doesn't sound quite right either.

I wonder if there is anything to allow snaps to communicate with other binaries from the same snap via dbus? If so, then we wouldn't even need this second slot.

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
James Henstridge (jamesh) wrote :

I've added a few inline comments.

These are the changes I made while testing out the snap: http://paste.ubuntu.com/23873664/. With those changes, I tried using my second snap to access the thumbnailer:

  $ sudo snap install --dangerous thumbnailer-admin-test_0.1_amd64.snap
  $ sudo connect thumbnailer-admin-test:thumbnailer thumbnailer:thumbnailer
  $ thumbnailer-admin-test.admin get-album Radiohead 'Ok Computer'
  thumbnailer-admin: Handler::createFinished(): could not get thumbnail for album: Radiohead/Ok Computer (0,0): ERROR

On the service side, I got the following:

  $ thumbnailer.thumbnailer-service
  thumbnailer-service: [15:57:10.144] Initializing
  thumbnailer-service: [15:57:10.440] image cache: 0 entries, 0 bytes, hit rate 0.00 (0/0), avg hit run 0.00, avg miss run 0.00
  thumbnailer-service: [15:57:10.440] thumbnail cache: 0 entries, 0 bytes, hit rate 0.00 (0/0), avg hit run 0.00, avg miss run 0.00
  thumbnailer-service: [15:57:10.440] failure cache: 0 entries, 0 bytes, hit rate 0.00 (0/0), avg hit run 0.00, avg miss run 0.00

  (process:13511): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/home/james/snap/thumbnailer/x1/.cache/gdk-pixbuf-loaders.cache': No such file or directory

  This likely means that your installation is broken.
  Try running the command
    gdk-pixbuf-query-loaders > /home/james/snap/thumbnailer/x1/.cache/gdk-pixbuf-loaders.cache
to make things work again for the time being.

  (process:13511): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/home/james/snap/thumbnailer/x1/.cache/gdk-pixbuf-loaders.cache': No such file or directory

  This likely means that your installation is broken.
  Try running the command
    gdk-pixbuf-query-loaders > /home/james/snap/thumbnailer/x1/.cache/gdk-pixbuf-loaders.cache
to make things work again for the time being.
  thumbnailer-service: [15:57:30.227] Warning: "Handler::createFinished(): could not get thumbnail for album: Radiohead/Ok Computer (0,0): ERROR"

So it is still not quite right. It looks like there is some support for gdk-pixbuf in the desktop-launch script, but it only comes into play if we ship gdk-pixbuf plus loaders as part of our snap.

review: Needs Fixing
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:371
https://jenkins.canonical.com/unity-api-1/job/lp-thumbnailer-ci/19/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1535
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1542
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1320
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1320/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1320
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1320/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1320
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1320/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1320
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1320/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1320
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1320/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1320
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1320/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-thumbnailer-ci/19/rebuild

review: Approve (continuous-integration)
Revision history for this message
James Henstridge (jamesh) wrote :

Okay, I'm now able to build a thumbnailer snap that can talk to the thumbnailer-admin-test snap without any post install fixups.

To make sure the new version of the part is used, I rebuilt with:

    snapcraft clean
    snapcraft update
    snapcraft

(The "update" operation downloads a new copy of parts.yaml).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: