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

feat: Add bootstrap handler to create Messaging Client with secure options #225

Merged
merged 5 commits into from
May 7, 2021

Conversation

lenny-goodell
Copy link
Member

@lenny-goodell lenny-goodell commented May 5, 2021

Other upcoming PRs for SDKs/Services and Core Data depend on this PR.

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/go-mod-bootstrap/blob/master/.github/Contributing.md.

What is the current behavior?

No common bootstrap handler exists

Issue Number: #224

What is the new behavior?

Common bootstrap handler now exists

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

Copy link
Contributor

@jim-wang-intel jim-wang-intel left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just some minor tweaks

Dockerfile.build Show resolved Hide resolved
bootstrap/interfaces/secret.go Show resolved Hide resolved
bootstrap/interfaces/secret.go Show resolved Hide resolved
bootstrap/messaging/messaging.go Outdated Show resolved Hide resolved
bootstrap/messaging/messaging.go Outdated Show resolved Hide resolved
bootstrap/messaging/messaging.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #225 (2345ebc) into master (66cc64d) will increase coverage by 5.52%.
The diff coverage is 92.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #225      +/-   ##
==========================================
+ Coverage   52.47%   58.00%   +5.52%     
==========================================
  Files          11       12       +1     
  Lines         646      750     +104     
==========================================
+ Hits          339      435      +96     
- Misses        293      300       +7     
- Partials       14       15       +1     
Impacted Files Coverage Δ
bootstrap/secret/insecure.go 71.87% <ø> (ø)
bootstrap/secret/secure.go 100.00% <ø> (ø)
bootstrap/messaging/messaging.go 92.30% <92.30%> (ø)

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 66cc64d...2345ebc. Read the comment docs.

@bnevis-i
Copy link
Collaborator

bnevis-i commented May 6, 2021

Unit test failed.

@lenny-goodell
Copy link
Member Author

Unit test failed.

@bnevis-i , THX! Fixed.

Copy link
Member

@iain-anderson iain-anderson left a comment

Choose a reason for hiding this comment

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

lgtm

defer wg.Done()
select {
case <-ctx.Done():
_ = msgClient.Disconnect()
Copy link
Member

Choose a reason for hiding this comment

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

it would be safer to write

if (msgClient != nil) {
  _ = msgClient.Disconnect()
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed.

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

@lenny-goodell lenny-goodell merged commit ae196fc into edgexfoundry:master May 7, 2021
@lenny-goodell lenny-goodell deleted the secure-bus branch May 7, 2021 17:18
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.

Add bootstrap handler to create Message Client with secure options
7 participants