Skip to content

Always "No operation update required" published in te/errors when there is a change on /etc/tedge/operations/c8y #3252

@rina23q

Description

@rina23q

Describe the bug
Every time when there is a change on /etc/tedge/operations/c8y/, [te/errors] No operation update required is published. The message doesn't sound an error.

[c8y/s/us] 114,c8y_DeviceProfile,c8y_DownloadConfigFile,c8y_LogfileRequest,c8y_RelayArray,c8y_RemoteAccessConnect,c8y_Restart,c8y_SoftwareUpdate,c8y_UploadConfigFile
[te/errors] No operation update required
[c8y/s/us] 114,aaa,c8y_DeviceProfile,c8y_DownloadConfigFile,c8y_LogfileRequest,c8y_RelayArray,c8y_RemoteAccessConnect,c8y_Restart,c8y_SoftwareUpdate,c8y_UploadConfigFile
[te/errors] No operation update required

The corresponded code is here: https://github.com/thin-edge/thin-edge.io/blob/main/crates/extensions/c8y_mapper_ext/src/converter.rs#L174

    pub fn process_operation_update_message(&mut self, message: DiscoverOp) -> MqttMessage {
        let message_or_err = self.try_process_operation_update_message(&message);
        match message_or_err {
            Ok(Some(msg)) => msg,
            Ok(None) => MqttMessage::new(
                &self.get_mapper_config().errors_topic,
                "No operation update required",
            ),
            Err(err) => self.new_error_message(err),
        }
    }

Can we just get rid of this message?

To Reproduce
Just run this:

touch /etc/tedge/operations/c8y/foo

Then check the output of tedge mqtt sub "#"

[c8y/s/us] 114,c8y_DeviceProfile,c8y_DownloadConfigFile,c8y_LogfileRequest,c8y_RelayArray,c8y_RemoteAccessConnect,c8y_Restart,c8y_SoftwareUpdate,c8y_UploadConfigFile,foo
[te/errors] No operation update required

Expected behavior
I'm actually not sure what No operation update required is intended for. At least, I'm sure that it should not be published in te/errors.

Screenshots

Environment (please complete the following information):

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

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtheme:c8yTheme: Cumulocity related topics

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions