Skip to content

[CRE-6175] routed trigger event - #23608

Merged
agparadiso merged 3 commits into
developfrom
CRE-6175_routed_trigger_event
Sep 2, 2026
Merged

[CRE-6175] routed trigger event#23608
agparadiso merged 3 commits into
developfrom
CRE-6175_routed_trigger_event

Conversation

@agparadiso

@agparadiso agparadiso commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Description

This pr implements the logic around the deadline field. Before this change the way we used to determine if an event was expired was to calculate the elapsed time and compare it against the queue timeout settings at dequeue time. This implies that an expired event consumes queue resources, makes the rest wait to then be discarded. It also means that an event that was already enqueue with a particular timeout expectation might be expired if the settings changes before the dequeue.

Thats the main reason of this change, to set a deadline per event, so no settings changes can affect what "was agreed" at the beginning. We could potentially also define different deadlines to different org events.
CRE-6175

Requires

Supports

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

👋 agparadiso, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@cl-sonarqube-production

Copy link
Copy Markdown

@trunk-io

trunk-io Bot commented Sep 1, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@agparadiso
agparadiso enabled auto-merge September 1, 2026 18:40

// Stamp the deadline once at dispatch: observedAt + queue timeout.
// If ObservedAt is not set, use the current time.
if event.ObservedAt.IsZero() {

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.

@agparadiso What is the correct behaviour here? I would expect that we control both sides of the interface here, inside two components of the core node -- i.e. we should either always be setting it, or never set it here.

If it's missing when it shouldn't be, let's treat it as a validation error.

if event.ObservedAt.IsZero() {
event.ObservedAt = e.cfg.Clock.Now()
}
queueTimeout, err := e.cfg.LocalLimiters.TriggerEventQueueTime.Limit(ctx)

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.

Nit: consider calling this ...QueueTimeout to be consistent with the variable name

@agparadiso
agparadiso added this pull request to the merge queue Sep 2, 2026
Merged via the queue into develop with commit 6a48da7 Sep 2, 2026
215 checks passed
@agparadiso
agparadiso deleted the CRE-6175_routed_trigger_event branch September 2, 2026 12:20
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.

3 participants