Skip to content

Remote Trigger Registration Checks#21366

Open
DylanTinianov wants to merge 106 commits intodevelopfrom
CRE-1520-remote-trigger-registration-checking
Open

Remote Trigger Registration Checks#21366
DylanTinianov wants to merge 106 commits intodevelopfrom
CRE-1520-remote-trigger-registration-checking

Conversation

@DylanTinianov
Copy link
Copy Markdown
Contributor

@DylanTinianov DylanTinianov commented Mar 2, 2026

Adds registration checks for Trigger Delivery Guarantees. The Publisher no longer expires registrations and instead send checks to the Subscriber to prompt for explicit unregisters. Also added additional don2don metrics to view traffic.

Also adds ackReplayCache to Subscriber, which is used to re-send ACKs for events that have already been ACKd by the engine. This is needed in case slow nodes miss receiving an ACK and keep resending the event, but would be stuck since Subscriber wont re-deliver to the engine.

Screenshot 2026-03-02 at 5 24 18 PM

@DylanTinianov DylanTinianov self-assigned this Mar 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2026

✅ No conflicts with other open PRs targeting develop

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2026

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented Mar 3, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Comment thread core/capabilities/remote/types/types.go Outdated
Comment thread core/capabilities/remote/trigger_publisher.go Outdated
Comment thread core/capabilities/remote/trigger_publisher.go Outdated
Comment thread core/capabilities/remote/trigger_subscriber.go Outdated
Comment thread core/capabilities/remote/trigger_subscriber.go Outdated
Comment thread core/capabilities/remote/trigger_subscriber.go
@fernandezlautaro
Copy link
Copy Markdown
Contributor

giving all the problems we had with the other PRs not being able to roll out one node at a time, will this change introduce a breaking deployment when releasing it?
(do we need a feature flag for it?)

Comment thread core/capabilities/remote/trigger_subscriber.go Outdated
Comment thread core/capabilities/remote/trigger_subscriber.go Outdated
Comment thread core/capabilities/launcher_test.go
Comment thread core/capabilities/remote/trigger_subscriber.go Outdated
Comment thread core/capabilities/remote/trigger_publisher.go
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 30, 2026

CORA - Pending Reviewers

Codeowners Entry Overall Num Files Owners
* 💬 5 @smartcontractkit/foundations, @smartcontractkit/core
/core/capabilities/ 💬 7 @smartcontractkit/keystone, @smartcontractkit/capabilities-team
/core/services/workflows/ 💬 2 @smartcontractkit/keystone
go.mod 💬 6 @smartcontractkit/core, @smartcontractkit/foundations
go.sum 💬 6 @smartcontractkit/core, @smartcontractkit/foundations
integration-tests/go.mod 💬 1 @smartcontractkit/core, @smartcontractkit/devex-tooling, @smartcontractkit/foundations
integration-tests/go.sum 💬 1 @smartcontractkit/core, @smartcontractkit/devex-tooling, @smartcontractkit/foundations

Legend: ✅ Approved | ❌ Changes Requested | 💬 Commented | 🚫 Dismissed | ⏳ Pending | ❓ Unknown

For more details, see the full review summary.

Comment thread core/services/workflows/v2/engine.go Outdated
Comment thread core/services/workflows/v2/engine.go Outdated
Comment thread core/capabilities/remote/trigger_publisher.go Outdated
CapabilityMethod: p.capMethodName,
Metadata: &types.MessageBody_TriggerEventMetadata{
TriggerEventMetadata: &types.TriggerEventMetadata{
WorkflowIds: workflowIDs,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great that we batch this! But is there a risk that we'll exceed some max message size?

Copy link
Copy Markdown
Contributor Author

@DylanTinianov DylanTinianov May 6, 2026

Choose a reason for hiding this comment

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

I guess that's possible in an extreme case. Just added chunking to avoid this, although the tradeoff is some additional traffic 😄

Seems fine on Staging with this change though, traffic is still low for the checks.

Comment thread plugins/plugins.private.yaml Outdated
Comment thread core/capabilities/remote/trigger_subscriber.go
}

p.mu.RLock()
totalRegistrations := len(p.registrations)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So the subscriber is still sending registrations in the same way. It looks like we only need to send checks for stuff that is old, correct? We can skip it if we received a fresh registration.

Copy link
Copy Markdown
Contributor Author

@DylanTinianov DylanTinianov May 6, 2026

Choose a reason for hiding this comment

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

Yeah that's true, but I don't think adding an optimization is necessary in this PR (don't want to delay this any more). Would need to add some additional complexity to hold onto timestamps of when last register occured.

@cl-sonarqube-production
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-publish Build and Publish image to SDLC release-preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants