-
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
Create an empty registry if external registry is not connected #14174
Changes from 8 commits
d8fdb43
23d67f6
353a3de
e2bf80a
7b7c1a6
bb04293
2ab8d1c
49a9be9
4a13e54
7545bb6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"chainlink": patch | ||
--- | ||
|
||
#added Allow workflows to run without external registry configured |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ import ( | |
|
||
"github.com/smartcontractkit/chainlink-common/pkg/capabilities" | ||
"github.com/smartcontractkit/chainlink/v2/core/logger" | ||
p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" | ||
"github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" | ||
) | ||
|
||
|
@@ -199,3 +200,30 @@ func NewRegistry(lggr logger.Logger) *Registry { | |
lggr: lggr.Named("CapabilitiesRegistry"), | ||
} | ||
} | ||
|
||
// TestMetadataRegistry is a test implementation of the metadataRegistry | ||
// interface. It is used when ExternalCapabilitiesRegistry is not available. | ||
type TestMetadataRegistry struct{} | ||
|
||
func (t *TestMetadataRegistry) LocalNode(ctx context.Context) (capabilities.Node, error) { | ||
peerID := p2ptypes.PeerID{} | ||
workflowDON := capabilities.DON{ | ||
ID: 1, | ||
ConfigVersion: 1, | ||
Members: []p2ptypes.PeerID{ | ||
peerID, | ||
}, | ||
F: 0, | ||
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. I hope this won't cause any validation issues down the line. Are we ever going to look at these values in other componenets? 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.
Not planned atm. 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. Ah it would be nice if this was configurable: I need |
||
IsPublic: false, | ||
AcceptsWorkflows: true, | ||
} | ||
return capabilities.Node{ | ||
PeerID: &peerID, | ||
WorkflowDON: workflowDON, | ||
CapabilityDONs: []capabilities.DON{}, | ||
}, nil | ||
} | ||
|
||
func (t *TestMetadataRegistry) ConfigForCapability(ctx context.Context, capabilityID string, donID uint32) (registrysyncer.CapabilityConfiguration, error) { | ||
return registrysyncer.CapabilityConfiguration{}, nil | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,16 +75,16 @@ | |
github.com/smartcontractkit/chain-selectors v1.0.21 | ||
github.com/smartcontractkit/chainlink-automation v1.0.4 | ||
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240806144315-04ac101e9c95 | ||
github.com/smartcontractkit/chainlink-common v0.2.2-0.20240816204408-654165b6ee33 | ||
github.com/smartcontractkit/chainlink-common v0.2.2-0.20240821145706-0dd95151c097 | ||
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 | ||
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240801131703-fd75761c982f | ||
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 | ||
github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240806154405-8e5684f98564 | ||
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 | ||
github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7 | ||
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 | ||
github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 | ||
github.com/smartcontractkit/wsrpc v0.7.3 | ||
github.com/spf13/cast v1.6.0 | ||
github.com/stretchr/testify v1.9.0 | ||
github.com/test-go/testify v1.1.4 | ||
|
@@ -102,15 +102,15 @@ | |
go.opentelemetry.io/otel v1.28.0 | ||
go.uber.org/multierr v1.11.0 | ||
go.uber.org/zap v1.27.0 | ||
golang.org/x/crypto v0.25.0 | ||
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 | ||
golang.org/x/mod v0.19.0 | ||
golang.org/x/net v0.27.0 | ||
golang.org/x/sync v0.7.0 | ||
golang.org/x/term v0.22.0 | ||
golang.org/x/text v0.16.0 | ||
golang.org/x/crypto v0.26.0 | ||
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. are all these expected? 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. This is what showed up after 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. Ah, these are from Ryan bumping the deps for the generators (in common) |
||
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa | ||
golang.org/x/mod v0.20.0 | ||
golang.org/x/net v0.28.0 | ||
golang.org/x/sync v0.8.0 | ||
golang.org/x/term v0.23.0 | ||
golang.org/x/text v0.17.0 | ||
golang.org/x/time v0.5.0 | ||
golang.org/x/tools v0.23.0 | ||
golang.org/x/tools v0.24.0 | ||
gonum.org/v1/gonum v0.15.0 | ||
google.golang.org/grpc v1.65.0 | ||
google.golang.org/protobuf v1.34.2 | ||
|
@@ -336,7 +336,7 @@ | |
go.uber.org/ratelimit v0.3.0 // indirect | ||
golang.org/x/arch v0.8.0 // indirect | ||
golang.org/x/oauth2 v0.21.0 // indirect | ||
golang.org/x/sys v0.22.0 // indirect | ||
golang.org/x/sys v0.23.0 // indirect | ||
google.golang.org/api v0.188.0 // indirect | ||
google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d // indirect | ||
google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d // indirect | ||
|
@@ -355,7 +355,7 @@ | |
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 | ||
|
||
// until merged upstream: https://github.com/hashicorp/go-plugin/pull/257 | ||
github.com/hashicorp/go-plugin => github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 | ||
|
||
// until nolag updates merged upstream | ||
github.com/mitchellh/mapstructure => github.com/nolag/mapstructure v1.5.2-0.20240625151721-90ea83a3f479 | ||
|
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.
nit: I don't think it should be called "Test", maybe "Dummy" or "Default" or something similiar
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 agree with your sentiment. I had this discussion with @cedric-cordenier, too. Given that I am using it for testing at the moment and we don't have a clear product need,
Test
seems "calling it what it is".