ubuntu store snap click-review error

Bug #1654451 reported by Alvaro Luis Bustamante
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Click Reviewers tools (obsolete)
Fix Released
High
Jamie Strandboge
Software Center Agent
Invalid
Undecided
Unassigned

Bug Description

I cannot publish snap packages in the Ubuntu store as the server automatically rejects my snap. It does not provide too much information:

Automated review for version 1.1.4: failed
 1 Fail
Unexpected output from click-review. click-review

I have tried to run the click-review on my own, and this is the output (NOTICE the RUNTIME ERROR):

$ click-review -v thinger-maker-server_1.1.4_amd64.snap
Info
----
 - security-snap-v2:app_plug_safe:thingerd:network
        OK
 - security-snap-v2:app_plug_safe:thingerd:network-bind
        OK
 - security-snap-v2:policy-vendor
        OK
 - security-snap-v2:policy-version
        OK
 - security-snap-v2:profile_name_length:thingerd
        OK
 - security-snap-v2:squashfs_repack_checksum
        OK
thinger-maker-server_1.1.4_amd64.snap: RUNTIME ERROR

If I run the same click-review with --sdk argument, this is the output:

$ click-review --sdk thinger-maker-server_1.1.4_amd64.snap
= click,snap.v1_bin_path =
{
  "error": {},
  "info": {},
  "warn": {}
}
= click,snap.v1_content_hub =
{
  "error": {},
  "info": {},
  "warn": {}
}
= click,snap.v1_desktop =
{
  "error": {},
  "info": {},
  "warn": {}
}
= click,snap.v1_framework =
{
  "error": {},
  "info": {},
  "warn": {}
}
= click,snap.v1_functional =
{
  "error": {},
  "info": {},
  "warn": {}
}
= click,snap.v1_lint =
{
  "error": {},
  "info": {},
  "warn": {}
}
= click,snap.v1_online_accounts =
{
  "error": {},
  "info": {},
  "warn": {}
}
= click,snap.v1_push_helper =
{
  "error": {},
  "info": {},
  "warn": {}
}
= click,snap.v1_scope =
{
  "error": {},
  "info": {},
  "warn": {}
}
= click,snap.v1_security =
{
  "error": {},
  "info": {},
  "warn": {}
}
= click,snap.v1_systemd =
{
  "error": {},
  "info": {},
  "warn": {}
}
= click,snap.v1_url_dispatcher =
{
  "error": {},
  "info": {},
  "warn": {}
}
= snap.v2_security =
{
  "error": {},
  "info": {
    "security-snap-v2:app_plug_safe:thingerd:network": {
      "manual_review": false,
      "text": "OK"
    },
    "security-snap-v2:app_plug_safe:thingerd:network-bind": {
      "manual_review": false,
      "text": "OK"
    },
    "security-snap-v2:policy-vendor": {
      "manual_review": false,
      "text": "OK"
    },
    "security-snap-v2:policy-version": {
      "manual_review": false,
      "text": "OK"
    },
    "security-snap-v2:profile_name_length:thingerd": {
      "manual_review": false,
      "text": "OK"
    },
    "security-snap-v2:squashfs_repack_checksum": {
      "manual_review": false,
      "text": "OK"
    }
  },
  "warn": {}
}

Everything seems to be ok, so, what is the problem??

Michael Vogt (mvo)
Changed in snappy:
status: New → Triaged
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Alvaro, the store 'click-review' and the click-review available in debs are at different versions. Running from a fresh checkout:

$ PYTHONPATH=./ ./bin/click-review ~/Desktop/thinger_1.snap
Caught exception (setting rc=1 and continuing):
Traceback (most recent call last):
  File "./bin/click-review", line 105, in _run_module_checks
    review.do_checks()
  File "/home/jamie/bzr-pulls/click-reviewers-tools.trunk/clickreviews/common.py", line 329, in do_checks
    func()
  File "/home/jamie/bzr-pulls/click-reviewers-tools.trunk/clickreviews/sr_lint.py", line 561, in check_apps_stop_timeout
    self.snap_yaml['apps'][app][key]
TypeError: %d format: a number is required, not str
/home/jamie/Desktop/thinger_1.snap: RUNTIME ERROR

Your snap.yaml has:

apps:
  thingerd:
    command: command-thingerd.wrapper
    daemon: forking
    plugs:
    - network
    - network-bind
    restart-condition: always
    stop-timeout: 120s

It looks like the snap format changed incompatibly with the review tools based on https://github.com/snapcore/snapd/wiki/Snap-format:

      # Optional time to wait for daemon to stop.
      stop-timeout: <n>ns | <n>us | <n>ms | <n>s | <n>m

These are now required to be strings with a suffix.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Moving to the proper project. I'll get this fixed up in the review tools right away.

affects: snappy → click-reviewers-tools
Changed in click-reviewers-tools:
assignee: nobody → Jamie Strandboge (jdstrand)
importance: Undecided → High
status: Triaged → In Progress
Changed in software-center-agent:
status: New → Invalid
Changed in click-reviewers-tools:
status: In Progress → Fix Committed
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This is fixed in trunk and I've requested the store to pull in the fixes.

Revision history for this message
Alvaro Luis Bustamante (alvarolb) wrote :

Nice! Thanks for the fix! :)

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

The store has had this fix for some time.

Changed in click-reviewers-tools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.