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

fix(meta): device yaml marshal to Json error #3683

Merged
merged 2 commits into from
Aug 25, 2021

Conversation

wangshihui
Copy link
Contributor

@wangshihui wangshihui commented Aug 25, 2021

when add some complex vaules to the attributes of deviceResources in the device profile, error happens. use gopkg.in/yaml.v3 instead of gopkg.in/yaml.v2

Fixes: #3682

Signed-off-by: wangshihui [email protected]

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/master/.github/Contributing.md.

What is the current behavior?

Issue Number:

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

New Imports

  • Yes
  • No

Specific Instructions

Are there any specific instructions or things that should be known prior to reviewing?

Other information

when add some complex vaules to the attributes of deviceResources in the device profile, error happens. use gopkg.in/yaml.v3 instead of gopkg.in/yaml.v2

Fixes: edgexfoundry#3682

Signed-off-by: wangshihui <[email protected]>
go.mod Outdated Show resolved Hide resolved
@cloudxxx8
Copy link
Member

once you remove gopkg.in/yaml.v2, please also remove it from Attribution.txt

remove gopkg.in/yaml.v2  use v3 instead

Fixes: edgexfoundry#3682

Signed-off-by: wangshihui <[email protected]>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

Codecov Report

Merging #3683 (99d79da) into main (e58d3ad) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3683   +/-   ##
=======================================
  Coverage   47.27%   47.27%           
=======================================
  Files         112      112           
  Lines        9180     9180           
=======================================
  Hits         4340     4340           
  Misses       4466     4466           
  Partials      374      374           
Impacted Files Coverage Δ
internal/io/reader.go 74.07% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ef23a9...99d79da. Read the comment docs.

Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

LGTM

@lenny-goodell lenny-goodell merged commit e89d87e into edgexfoundry:main Aug 25, 2021
@wangshihui wangshihui deleted the dev-yaml-issu branch August 26, 2021 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Device Profile with Yaml format Can't be marshal to Json in some case
4 participants