Skip to content

Comments

add registration status timeout to remote trigger config#1819

Open
ettec wants to merge 1 commit intomainfrom
trigger-request-response-wait-time
Open

add registration status timeout to remote trigger config#1819
ettec wants to merge 1 commit intomainfrom
trigger-request-response-wait-time

Conversation

@ettec
Copy link
Contributor

@ettec ettec commented Feb 4, 2026

Required for this change: smartcontractkit/chainlink#20973

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

✅ API Diff Results - No breaking changes


📄 View full apidiff report

@ettec ettec force-pushed the trigger-request-response-wait-time branch from 578cb99 to 3d086a0 Compare February 5, 2026 10:06
@ettec ettec force-pushed the trigger-request-response-wait-time branch from 9d1adc8 to 7fea19a Compare February 9, 2026 13:35
@ettec ettec force-pushed the trigger-request-response-wait-time branch from 7fea19a to 17e6dc6 Compare February 11, 2026 12:38
@ettec ettec force-pushed the trigger-request-response-wait-time branch from 17e6dc6 to e393dd4 Compare February 23, 2026 15:12
@ettec ettec force-pushed the trigger-request-response-wait-time branch from e393dd4 to 623f82b Compare February 25, 2026 11:25
@ettec ettec force-pushed the trigger-request-response-wait-time branch from be22f3e to e00cf58 Compare February 25, 2026 14:23
@ettec ettec marked this pull request as ready for review February 25, 2026 14:24
@ettec ettec requested a review from a team as a code owner February 25, 2026 14:24
Copilot AI review requested due to automatic review settings February 25, 2026 14:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new remote-trigger configuration field to control a “registration status update” timeout, wiring it through the protobuf schema and the capabilities registry client/server config translation layer.

Changes:

  • Extend RemoteTriggerConfig (proto + Go struct) with registrationStatusUpdateTimeout / RegistrationStatusUpdateTimeout.
  • Serialize/deserialize the new duration field in ConfigForCapability responses (both top-level and per-method remote trigger configs).
  • Regenerate protobuf Go bindings to include the new field and accessor.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
pkg/loop/internal/core/services/capability/capabilities_registry.go Maps the new timeout field between internal capabilities.RemoteTriggerConfig and protobuf RemoteTriggerConfig for both capability-level and method-level configs.
pkg/capabilities/pb/registry.proto Adds registrationStatusUpdateTimeout to RemoteTriggerConfig message.
pkg/capabilities/pb/registry.pb.go Generated output reflecting the new proto field and getter.
pkg/capabilities/capabilities.go Adds the new field to the Go RemoteTriggerConfig and attempts to apply a default for it.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +431 to 435
MessageExpiry: durationpb.New(cc.RemoteTriggerConfig.MessageExpiry),
MaxBatchSize: cc.RemoteTriggerConfig.MaxBatchSize,
BatchCollectionPeriod: durationpb.New(cc.RemoteTriggerConfig.BatchCollectionPeriod),
RegistrationStatusUpdateTimeout: durationpb.New(cc.RemoteTriggerConfig.RegistrationStatusUpdateTimeout),
},
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new RegistrationStatusUpdateTimeout field is now serialized into the top-level remote trigger config, but there isn’t a focused test that verifies a non-zero value round-trips through the registry client/server conversion. Add a unit test that sets this field to a non-zero duration and asserts it is preserved after ConfigForCapability.

Copilot uses AI. Check for mistakes.
Comment on lines +472 to 477
MinResponsesToAggregate: mConfig.RemoteTriggerConfig.MinResponsesToAggregate,
MessageExpiry: durationpb.New(mConfig.RemoteTriggerConfig.MessageExpiry),
MaxBatchSize: mConfig.RemoteTriggerConfig.MaxBatchSize,
BatchCollectionPeriod: durationpb.New(mConfig.RemoteTriggerConfig.BatchCollectionPeriod),
RegistrationStatusUpdateTimeout: durationpb.New(mConfig.RemoteTriggerConfig.RegistrationStatusUpdateTimeout),
},
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new RegistrationStatusUpdateTimeout field is now serialized for method-level remote trigger configs as well, but there isn’t a test asserting that a non-zero value round-trips correctly for CapabilityMethodConfig entries. Extend existing registry tests to cover a method config with a non-zero timeout and verify it survives encode/decode.

Copilot uses AI. Check for mistakes.
Comment on lines +614 to +617

if c.RegistrationStatusUpdateTimeout == 0 {
c.RegistrationStatusUpdateTimeout = DefaultRegistrationStatusUpdateTimeout
}
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefaultRegistrationStatusUpdateTimeout is defined as 0 and ApplyDefaults() assigns it when the field is 0, which is a no-op and makes it unclear whether 0 is meant to be a real default or an “unset/disabled” sentinel. Consider either (a) removing the constant + defaulting block entirely if 0 is the intended default, or (b) setting a non-zero default here (and documenting whether callers can explicitly disable by setting 0).

Suggested change
if c.RegistrationStatusUpdateTimeout == 0 {
c.RegistrationStatusUpdateTimeout = DefaultRegistrationStatusUpdateTimeout
}

Copilot uses AI. Check for mistakes.
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.

1 participant