Add command-chain for hooks and start-timeout to review-tools

As per Proposal: support command-chain in apps and hooks both snapcraft and snapd support specifying a command-chain for both apps and hooks, however the reviewer-tools only seem to allow specifying command-chain for apps.

Additionally, support for start-timeout which was recently added to snapd (but doesn’t seem to have landed in snapcraft yet) is also not recognized. Relevant PR to snapd is here.

See example output of using the stable channel of the review tools:

$ review-tools.snap-review edgexfoundry_1.1.0-20190531+f51ed78c_amd64.snap 
Warnings
--------
 - lint-snap-v2:apps_unknown:cassandra
        unknown fields for app 'cassandra': 'start-timeout'
 - lint-snap-v2:apps_unknown:core-config-seed
        unknown fields for app 'core-config-seed': 'start-timeout'
 - lint-snap-v2:apps_unknown:edgexproxy
        unknown fields for app 'edgexproxy': 'start-timeout'
 - lint-snap-v2:apps_unknown:kong-daemon
        unknown fields for app 'kong-daemon': 'start-timeout'
 - lint-snap-v2:apps_unknown:mongo-worker
        unknown fields for app 'mongo-worker': 'start-timeout'
 - lint-snap-v2:apps_unknown:pkisetup
        unknown fields for app 'pkisetup': 'start-timeout'
 - lint-snap-v2:apps_unknown:vault-worker
        unknown fields for app 'vault-worker': 'start-timeout'
 - lint-snap-v2:hooks_unknown:configure
        unknown fields for hook 'configure': 'command-chain'
 - lint-snap-v2:hooks_unknown:install
        unknown fields for hook 'install': 'command-chain'
edgexfoundry_1.1.0-20190531+f51ed78c_amd64.snap: FAIL

An example snap.yaml (generated directly from a snapcraft.yaml) can be found here.

We have a few revisions of the edgexfoundry snap that are stuck waiting for manual review due to this…

Ping @jdstrand and @roadmr

I noticed this last week, fixed the tools and they are in prod as of a couple hours ago. edgexfoundry now passes automated review again.

1 Like