-
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?
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) , GolangCI Lint (deployment) , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_fuzz) , Core Tests (go_core_race_tests) , test-scripts , lint , SonarQube Scan 1. No trigger config found for streams-trigger:[TestSetupTestEnv]Source of Error:Run tests 2025-01-09T16:11:44.4781961Z failed to configure contracts: failed to configure registry: failed to register DONS: no trigger config found for {{streams-trigger 1.0.0 0 0 0x0000000000000000000000000000000000000000} [30 166 232 93 251 142 187 8 183 205 130 180 42 180 101 84 41 168 174 17 109 81 59 224 214 138 125 118 97 102 122 138] {map[] {<nil> <nil> <nil>}}} Why: The error indicates that the configuration for the Suggested fix: Ensure that the 2. No trigger config found for streams-trigger:[Test_UpdateAllowedDons_WithMCMS]Source of Error:Run tests 2025-01-09T16:11:44.5006434Z failed to configure contracts: failed to configure registry: failed to register DONS: no trigger config found for {{streams-trigger 1.0.0 0 0 0x0000000000000000000000000000000000000000} [30 166 232 93 251 142 187 8 183 205 130 180 42 180 101 84 41 168 174 17 109 81 59 224 214 138 125 118 97 102 122 138] {map[] {<nil> <nil> <nil>}}} Why: Similar to the previous error, this indicates that the Suggested fix: Verify and add the required trigger configuration for the 3. No trigger config found for streams-trigger:[Test_UpdateAuthorizedAddresses_WithMCMS]Source of Error:Run tests 2025-01-09T16:11:44.5230047Z failed to configure contracts: failed to configure registry: failed to register DONS: no trigger config found for {{streams-trigger 1.0.0 0 0 0x0000000000000000000000000000000000000000} [30 166 232 93 251 142 187 8 183 205 130 180 42 180 101 84 41 168 174 17 109 81 59 224 214 138 125 118 97 102 122 138] {map[] {<nil> <nil> <nil>}}} Why: This error also points to the absence of a trigger configuration for the Suggested fix: Ensure that the AER Report: Operator UI CI ran successfully ✅ |
Quality Gate passedIssues Measures |
} | ||
|
||
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.
Requires
Supports