Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a Common MQTT Mapper #130

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

fuchendou
Copy link

@fuchendou fuchendou commented Sep 29, 2024

This PR introduces a universal MQTT Mapper designed to handle different serialization formats (JSON, YAML, and XML) during MQTT transmissions. The goal is to enhance flexibility and scalability for device communication.

Main Changes:

devicetype.go:
Improved ConfigData and VisitorConfigData structs to handle data before and after MQTT parsing.

driver.go:
Implemented methods for the ConfigData struct, including logic for serialization and parsing.

This PR fixes the issue: PR #链接(kubeedge/kubeedge#5765)

@kubeedge-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign luogangyi after the PR has been reviewed.
You can assign the PR to them by writing /assign @luogangyi in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 29, 2024
Copy link
Collaborator

@wbc6080 wbc6080 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this PR can't pass the CI check. Can you try to find the reason?

Prometheus-collab added 4 commits October 12, 2024 15:59
Signed-off-by: Prometheus-collab <[email protected]>
Signed-off-by: fuchendou <[email protected]>
Signed-off-by: Prometheus-collab <[email protected]>
Signed-off-by: fuchendou <[email protected]>
Signed-off-by: Prometheus-collab <[email protected]>
Signed-off-by: fuchendou <[email protected]>
Signed-off-by: Prometheus-collab <[email protected]>
Signed-off-by: fuchendou <[email protected]>
@fuchendou
Copy link
Author

fuchendou commented Oct 12, 2024 via email

Copy link
Collaborator

@wbc6080 wbc6080 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that there is still a problem with CI. I think it is due to a dependency mismatch caused by the existence of v1alpha2 and v1beta1 mappers in this directory. I suggest placing this mapper in the newly created directory mappers-go/mappers/device-v1beta1/, which should solve the current CI error problem.

@@ -0,0 +1,41 @@
module github.com/kubeedge/kubeedge-v1.17.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the package is incorrect. You should set the mapper name to mqtt instead of kubeedge-v1.17.0 when executing the make generate command to generate the mapper project.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your advice. I will remake a new mapper project using make generate.

Comment on lines 1 to 9
FROM golang:1.20.10-alpine3.18 AS builder

WORKDIR /build

ENV GO111MODULE=on \
GOPROXY=https://goproxy.cn,direct

COPY . .

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your advice. I will modify the file structure.

@fuchendou
Copy link
Author

fuchendou commented Oct 16, 2024 via email

@fuchendou
Copy link
Author

It seems that this PR can't pass the CI check. Can you try to find the reason?

@fuchendou fuchendou closed this Oct 17, 2024
@fuchendou fuchendou reopened this Oct 17, 2024
Copy link
Collaborator

@wbc6080 wbc6080 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! Thanks for your contribution!
/lgtm

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 17, 2024
@wbc6080 wbc6080 requested a review from luomengY October 17, 2024 08:28
@fuchendou
Copy link
Author

fuchendou commented Oct 18, 2024 via email

@fuchendou
Copy link
Author

fuchendou commented Oct 20, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants