-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Adding gRPC dial capability for mercury #12560
Closed
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ec8d5e8
Adding grpc dial functionality with manually edited mercury_wsrpc.pb.go
patrickhuie19 daa40ea
Wiring Mercury.TLS.CertFile through to NewPool
patrickhuie19 302071f
WIP: contains non-priveleged key material
patrickhuie19 f554fd1
functioning unit test for choosing dial
patrickhuie19 4cfc450
WIP: working TestIntegration_MercuryV3
patrickhuie19 38da3ac
moved grpc metadata creation from consumer to within client and fixed…
patrickhuie19 5b35807
cleaning up mercury integration test file
patrickhuie19 cfab7c3
cleanup
patrickhuie19 cf7fedc
Implemented signature scheme for grpc requests
patrickhuie19 cc438a9
TestIntegration_MercuryV3 verifies grpc client signatures
patrickhuie19 8610e22
Fixing rebase errors. Tested TestIntegration_MercuryV3 still runs loc…
patrickhuie19 e6773d3
minor cleanup and adding signature to TestIntegration_MercuryGRPC
patrickhuie19 bd6865b
Adding kv pairs to metadata now only happens if client is in grpc mode
patrickhuie19 53a4ca0
fixing rebase
patrickhuie19 e9ba8a1
Merge branch 'develop' into feature/BCF-2872-mercury-grpc-dial-2
patrickhuie19 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,11 +161,17 @@ func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.G | |
|
||
loopRegistry := plugins.NewLoopRegistry(appLggr, cfg.Tracing()) | ||
|
||
// TOML config + env var protected usage of grpc mercury pool | ||
var mercuryTlsCertFile *string | ||
if os.Getenv("CHAINLINK_MERCURY_USE_GRPC") == "true" { | ||
tlsCertFile := cfg.Mercury().TLS().CertFile() | ||
mercuryTlsCertFile = &tlsCertFile | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to null check here similar to https://github.com/smartcontractkit/chainlink/pull/12560/files#diff-ca252fec8b919ed465bc5f042afca2b4f6be3f20640d327478983967563fb886R357-R359? |
||
} | ||
mercuryPool := wsrpc.NewPool(appLggr, cache.Config{ | ||
LatestReportTTL: cfg.Mercury().Cache().LatestReportTTL(), | ||
MaxStaleAge: cfg.Mercury().Cache().MaxStaleAge(), | ||
LatestReportDeadline: cfg.Mercury().Cache().LatestReportDeadline(), | ||
}) | ||
}, mercuryTlsCertFile) | ||
|
||
capabilitiesRegistry := capabilities.NewRegistry(appLggr) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better as a config variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is true now that many of our smoke tests are moving to using TOML.