posix-mq attributes cause review failure

Bug #2003814 reported by Daniel Manrique
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
review-tools
Fix Released
Undecided
Unassigned

Bug Description

The snap.yaml has this (abbreviated):

apps:
  something:
    command: bin/something.sh
    daemon: simple
    refresh-mode: endure
    restart-condition: never
    plugs:
    - posix-mq-ipc
plugs:
  posix-mq-ipc:
    interface: posix-mq
slots:
  msgque:
    interface: posix-mq
    posix-mq: posix-mq-ipc
    path: /hvp-queue
    permissions:
    - read
    - write
    - delete

slots.json has this:

{
  "posix-mq": {
    "allow-auto-connection": {
      "on-store": [
        "(some-store)"
      ],
      "plug-attributes": {
        "posix-mq": "$SLOT(posix-mq)"
      },
      "plug-publisher-id": [
        "$SLOT_PUBLISHER_ID"
      ]
    },
    "allow-installation": [
      {
        "on-store": [
          "(some-store)"
        ],
        "slot-attributes": {
          "path": [
            "/hvp-queue"
          ],
          "permissions": [
            "(read|write|delete)"
          ]
        }
      }
    ]
  }
}

snapd reports the snap installs and auto-connects properly, so that is working. But review-tools is unhappy:

Errors
------
 - declaration-snap-v2:slots_installation:msgque:posix-mq
 human review required due to 'allow-installation' constraint (interface attributes)
 - declaration-snap-v2:valid_slots:posix-mq:allow-installation_slot-attributes
 declaration malformed (wrong type '['/hvp-queue']' for attribute 'path')

This example doesn't need multiple elements in the path, but some others do, so I can't just make the path attribute a string. Even if I do, one error remains:

 - declaration-snap-v2:slots_installation:msgque:posix-mq
 human review required due to 'allow-installation' constraint (interface attributes)

 I tested this with commit 8295b7670e1a8128503591ae19d747c995ca90c9 of review-tools.

Related branches

Daniel Manrique (roadmr)
description: updated
Revision history for this message
Alex Murray (alexmurray) wrote :

The associated merge proposal has been merged and a new review-tools snap / tag is now available: https://git.launchpad.net/review-tools/commit/?h=20230206-2000UTC&id=76b09881c682c20ef22d71e0fc7d7a4b45f47b52

Changed in review-tools:
status: New → 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.