Skip to content

device_profile skip field is documented but unimplemented #3137

@reubenmiller

Description

@reubenmiller

Describe the bug

In the Device Profile Documentation refers to the skip field that can be used to skip a specific item within the device profile payload:

The "skip" field is optional and the value is false, by default. It can be used to skip any operations during the development/testing phase, without fully deleting the entry from the profile.

However, in thin-edge.io 1.3.0, the setting skip to true has no effect on the processing of the item (it is processed regardless of the skip value).

To Reproduce

  1. Create a local device_profile thin-edge.io operation via the local MQTT broker

    tedge mqtt pub -r 'te/device/main///cmd/device_profile/1234' '{
    "status": "init",
    "name": "prod-profile",
    "version": "v2",
    "operations": [
        {
        "operation": "software_update",
        "skip": true,
        "payload": {
            "updateList": [
            {
                "type": "apt",
                "modules": [
                {
                    "name": "tedge",
                    "version": "latest",
                    "action": "install"
                }
                ]
            }
            ]
        }
        }
    ]
    }'
  2. Wait until the command has finished

    tedge mqtt sub -r te/device/main///cmd/software_update/local-test001

    The operation should be set to a final status (e.g. successful or failed). The expected status depends on the implementation direction whether erroneous data formats should be rejected (and set to failed), or ignored (and set to successful).

  3. Check the workflow log output. The default location is under /var/log/tedge/agent/workflow*device_profile*

    ls -ltr /var/log/tedge/agent/workflow*device_profile*

    There should not be a software_update state in the log as it should have been skipped

Expected behavior

The skip field in the device_profile payload should be honoured and the tedge-agent should skip the given operation.

Screenshots

Environment (please complete the following information):

  • OS [incl. version]: any
  • Hardware [incl. revision]: any
  • System-Architecture [e.g. result of "uname -a"]: any
  • thin-edge.io version [e.g. 0.1.0]: 1.3.0

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtheme:profileDevice Profile

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions