Issue with daemon after/before keywords

Hello,
I am trying to use the snapcraft app after/before keywords to define the order of my daemons. According to The snap format it should be available but when I use it I get an error

someapp:
    command: bin/app.py 
    daemon: simple
    after:
      - anotherapp

The issue is:

Issues while validating snapcraft.yaml: The 'apps/someapp' property does not match the required schema: Additional properties are not allowed ('after' was unexpected)

My snapcraft version is 2.43.1

Is this feature just available in snapcraft 3? Or am I doing something wrong here?

Thanks

I’m not sure which snapcraft release proper support for after is supposed to go into, but you can also use passthrough in 2.43 like so:

someapp:
    command: bin/app.py 
    daemon: simple
    passthrough:
        after:
          - anotherapp

Where is after documented, designed or announced?
@mvo I do not see a bug for this nor a ping on my side, maybe I missed it?

It looks like the feature is about a year old:

https://github.com/snapcore/snapd/pull/4372
https://github.com/snapcore/snapd/pull/4357
https://github.com/snapcore/snapd/pull/4373

There have been a few forum posts about it in snapd topic, i.e. Service ordering

I will wait for either a specific bug task or for them to be properly documented. Along the topic’s thread it is easy to see how hard it is to know if something is implemented or not, which is my concern. This should not be a blocker as passthrough exists.

FYI, the review-tools were updated for this on 2018-06-05 so there should be no issues wrt store uploads (please report back if you see them).

They are documented in The snap format topic. Let me know if you need anything else. I’ll try to remember to ping you in the PRs adding more of these options in the future.

1 Like