Store request for argos-translate snap's argos-packages plug to greedily connect to available slots

My snap argos-translate currently has a plug called argos-packages that connects to a slot from argos-translate-base-langs. argos-translate-base-langs is the default provider and is currently auto installed and connected when argos-translate is installed. I want to maintain this behavior but have argos-translate greedily connect to any other argos-packages providing slots that are installed, for example argos-translate-de-en (but only auto install argos-translate-base-langs).

argos-translate:

plugs:
  argos-packages:
    interface: content
    content: argos-packages
    target: $SNAP/snap_custom/content_snap_packages
    default-provider: argos-translate-base-langs

content snaps:

slots:
  argos-packages:
    interface: content
    content: argos-packages
    source:
      read:
        - $SNAP/packages 

My understanding is that I need to do this through a store request?

Relevant forum post: Plug/slot declaration rules: greedy plugs
Code: https://github.com/argosopentech/argos-translate

Thanks!

Can someone please look at this? I think the store side code change I’m requesting is:

plugs:
  argos-packages:
    allow-auto-connection:
      slots-per-plug: "*"

@pedronis could you please review this request? @alexmurray added some notes on our tracking system. Thanks!

1 Like

the request seems alright but to refine what we allow, are these other packages expected to have the same publisher as argos-translate or could they come from other publishers?

the syntax needs some adjustment to work, but we can take care of that

Thanks! Either is fine but I don’t see any downside in allowing packages from other publishers. A name conflict seems unlikely with “argos” in the name.

This was now updated with the following rules:

plugs:
  content:
    allow-auto-connection:
      -
        plug-attributes:
          content: $SLOT(content)
        slot-attributes:
          content: argos-packages
        slot-publisher-id:
          - $PLUG_PUBLISHER_ID
        slots-per-plug: *
2 Likes