-
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
Refactor DefaultCapConfig
into multiple funcs
#15882
base: develop
Are you sure you want to change the base?
Refactor DefaultCapConfig
into multiple funcs
#15882
Conversation
AER Report: CI Coreaer_workflow , commit , Detect Changes , Clean Go Tidy & Generate , Scheduled Run Frequency , Core Tests (go_core_tests) , Core Tests (go_core_tests_integration) , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_fuzz) , Core Tests (go_core_race_tests) , GolangCI Lint (deployment) , test-scripts , lint , SonarQube Scan 1. File is not
|
} | ||
|
||
func FromCapabilitiesRegistryCapability(cap *capabilities_registry.CapabilitiesRegistryCapability, e deployment.Environment, registryChainSelector uint64) (*RegisteredCapability, error) { | ||
type RegisteredCapabilityConfig struct { | ||
DefaultConfig map[string]any |
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.
this doesn't seem right. is the config serialized to the chain?
ExecutableConfig *RegisteredCapabilityRemoteExecutableConfig | ||
} | ||
|
||
type RegisteredCapabilityRemoteTriggerConfig struct { |
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.
how are you determining this type? is there some more basic building-block type that we can use?
BatchCollectionPeriod time.Duration | ||
} | ||
|
||
type RegisteredCapabilityRemoteTargetConfig struct { |
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.
are these structs used?
RequestHashExcludedAttributes: []string{"signed_report.Signatures"}, // TODO: const defn in a common place | ||
}, | ||
func GetTriggerCapConfig(refresh time.Duration, expiry time.Duration, minResponsesToAggregate uint32, defaultCfg map[string]any) (*capabilitiespb.CapabilityConfig, error) { | ||
dCfg, err := values.WrapMap(defaultCfg) |
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.
better to have the caller pass a values.Map (or what ever the
}, nil | ||
} | ||
|
||
func GetConsensusCapConfig(defaultCfg map[string]any) (*capabilitiespb.CapabilityConfig, error) { |
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.
these functions are odd - they do very little and add little abstraction. why bother? the shouldn't be public, at minimum.
} | ||
|
||
func FromCapabilitiesRegistryCapability(cap *capabilities_registry.CapabilitiesRegistryCapability, e deployment.Environment, registryChainSelector uint64) (*RegisteredCapability, error) { | ||
func FromCapabilitiesRegistryCapability(capReg *capabilities_registry.CapabilitiesRegistryCapability, e deployment.Environment, registryChainSelector uint64, cfg []byte) (*RegisteredCapability, error) { |
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.
this should take the proto object and do the conversation to bytes rather then take bytes
Quality Gate failedFailed conditions See analysis details on SonarQube Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Requires
Supports