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(store-forward): Enable Custom Factory Registration #1051

Merged
merged 1 commit into from
Mar 8, 2022

Conversation

AlexCuse
Copy link
Contributor

@AlexCuse AlexCuse commented Mar 3, 2022

Move necessary contracts to public package. Introduce new
StoreClientFactory and store in dic so that it can be used
both in service initialization AND configuration updates.

Required moving store client initialization from the end of
service.Initialize to the beginning of service.MakeItRun so
there is a chance to register custom store implementations.

Fixes #1045

Signed-off-by: Alex Ullrich [email protected]

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/app-functions-sdk-go/blob/main/.github/CONTRIBUTING.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)
    feat(microservices): Custom Store/Forward Client Registration edgex-docs#706

Testing Instructions

New Dependency Instructions (If applicable)

@codecov-commenter
Copy link

Codecov Report

Merging #1051 (13ed8fe) into main (73b9dee) will decrease coverage by 0.02%.
The diff coverage is 56.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1051      +/-   ##
==========================================
- Coverage   68.23%   68.21%   -0.03%     
==========================================
  Files          35       36       +1     
  Lines        2827     2850      +23     
==========================================
+ Hits         1929     1944      +15     
- Misses        787      795       +8     
  Partials      111      111              
Impacted Files Coverage Δ
internal/app/configupdates.go 12.50% <0.00%> (ø)
internal/app/service.go 53.19% <0.00%> (-1.33%) ⬇️
internal/bootstrap/handlers/storeclient.go 0.00% <0.00%> (ø)
internal/runtime/storeforward.go 55.11% <100.00%> (ø)
internal/store/db/redis/models/storedobject.go 97.46% <100.00%> (ø)
internal/store/factory.go 100.00% <100.00%> (ø)

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 73b9dee...13ed8fe. Read the comment docs.

@AlexCuse AlexCuse requested a review from lenny-goodell March 5, 2022 13:16
internal/store/factory.go Outdated Show resolved Hide resolved
internal/app/service.go Outdated Show resolved Hide resolved
@AlexCuse AlexCuse force-pushed the register-custom-store branch 3 times, most recently from a93b789 to 7f2ee2d Compare March 8, 2022 11:51
Move necessary contracts to public package.  Required moving
store client initialization from the end of service.Initialize
to the beginning of service.MakeItRun so there is a chance to
register custom store implementations.

Fixes edgexfoundry#1045

Signed-off-by: Alex Ullrich <[email protected]>
@AlexCuse AlexCuse force-pushed the register-custom-store branch from 7f2ee2d to 8432a58 Compare March 8, 2022 12:02
@AlexCuse AlexCuse requested a review from lenny-goodell March 8, 2022 12:07
@AlexCuse
Copy link
Contributor Author

AlexCuse commented Mar 8, 2022

Thx for the feedback @lenny-intel I think this will be a bit simpler to live with. I rebased and force-pushed lmk if you see any other issues.

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. Nice final refactor!

@lenny-goodell lenny-goodell merged commit c4fff4f into edgexfoundry:main Mar 8, 2022
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.

Support Custom Clients for Store & Forward
3 participants