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(metadata): device PATCH V2 API should check service and profile #2862

Merged
merged 1 commit into from
Nov 3, 2020
Merged

fix(metadata): device PATCH V2 API should check service and profile #2862

merged 1 commit into from
Nov 3, 2020

Conversation

weichou1229
Copy link
Member

Fix #2860

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?

The device PATCH V2 API doesn't check the service and profile whether is exists.

Issue Number: #2860

What is the new behavior?

If the serviceName or profileName doesn't exist in the DB, device PATCH V2 API should return 404 in the baseResponse

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

If the serviceName or profileName doesn't exist in the DB, device PATCH V2 API should return 404 in the baseResponse

Fix #2860

Signed-off-by: weichou <weichou1229@gmail.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 3, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov-io
Copy link

Codecov Report

Merging #2862 into master will increase coverage by 0.35%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2862      +/-   ##
==========================================
+ Coverage   39.33%   39.68%   +0.35%     
==========================================
  Files         166      166              
  Lines       13961    13636     -325     
==========================================
- Hits         5491     5411      -80     
+ Misses       8140     7897     -243     
+ Partials      330      328       -2     
Impacted Files Coverage Δ
internal/core/data/v2/controller/http/event.go 76.84% <0.00%> (-3.86%) ⬇️
internal/core/data/init.go 0.00% <0.00%> (ø)
internal/pkg/v2/infrastructure/redis/event.go 0.00% <0.00%> (ø)
internal/pkg/v2/infrastructure/redis/reading.go 0.00% <0.00%> (ø)
internal/core/data/v2/application/event.go 58.94% <0.00%> (+0.95%) ⬆️

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 0f1fe82...19ff294. Read the comment docs.

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

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 471572d into edgexfoundry:master Nov 3, 2020
@weichou1229 weichou1229 deleted the issue-2860 branch July 15, 2021 03:32
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.

[v2 metadata] Update device with non-existent serviceName or profileName
4 participants