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

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Provide a Common MQTT Mapper #130

merged 1 commit into from
Oct 31, 2024

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 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?

@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

@wbc6080
Copy link
Collaborator

wbc6080 commented Oct 23, 2024

Could you please help review my proposal "Add a Proposal about Provide a Common MQTT Mapper" (PR #5765

I have leave some comments that you can refer to. @fuchendou

@fuchendou
Copy link
Author

fuchendou commented Oct 23, 2024 via email

@zhiyingfang2022
Copy link

/lgtm

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.

@WillardHu
Copy link

Rebase the commits git rebase -i HEAD~5

@kubeedge-bot kubeedge-bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 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.

@fuchendou
Copy link
Author

fuchendou commented Oct 30, 2024 via email

Copy link
Member

@fisherxu fisherxu left a comment

Choose a reason for hiding this comment

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

/approve
/assign @WillardHu @wbc6080

@kubeedge-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fisherxu

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 31, 2024
Signed-off-by: Prometheus-collab <[email protected]>
Signed-off-by: fuchendou <[email protected]>
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.

/lgtm

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 31, 2024
@kubeedge-bot kubeedge-bot merged commit 85fb6d1 into kubeedge:main Oct 31, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. 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.

6 participants