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

Refactor DefaultCapConfig into multiple funcs #15882

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

vyzaldysanchez
Copy link
Contributor

Requires

Supports

Copy link
Contributor

github-actions bot commented Jan 9, 2025

AER Report: CI Core

aer_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 streams-trigger capability is missing. The system attempted to register the Decentralized Oracle Networks (DONs) but failed due to the absence of a trigger configuration for the specified capability.

Suggested fix: Ensure that the streams-trigger capability is properly configured with the necessary trigger settings before attempting to register the DONs.

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 streams-trigger capability lacks the necessary trigger configuration, causing the registration of DONs to fail.

Suggested fix: Verify and add the required trigger configuration for the streams-trigger capability before registering the DONs.

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 streams-trigger capability, leading to the failure in registering the DONs.

Suggested fix: Ensure that the streams-trigger capability is configured with the necessary trigger settings before attempting to register the DONs.

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

}

func FromCapabilitiesRegistryCapability(cap *capabilities_registry.CapabilitiesRegistryCapability, e deployment.Environment, registryChainSelector uint64) (*RegisteredCapability, error) {
type RegisteredCapabilityConfig struct {
DefaultConfig map[string]any
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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)
Copy link
Contributor

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) {
Copy link
Contributor

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.

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.

2 participants