Skip to content

Add bridge-cache fallback for UseConnectionManager bridge tasks - #23695

Open
denis-chernov-smartcontract wants to merge 1 commit into
developfrom
DS/useConenctionManager-fallback-to-use-observation-cache
Open

Add bridge-cache fallback for UseConnectionManager bridge tasks#23695
denis-chernov-smartcontract wants to merge 1 commit into
developfrom
DS/useConenctionManager-fallback-to-use-observation-cache

Conversation

@denis-chernov-smartcontract

Copy link
Copy Markdown
Contributor

Summary

Bridge tasks that use the connection-manager (UseConnectionManager) previously returned an error immediately when the in-memory observation was unavailable or expired. This PR makes them fall back to the persisted bridge response cache, matching the behavior of the HTTP bridge path.

Changes

  • core/services/pipeline/task.bridge.go

    • Reuse the existing resolveFailureOrCache helper for connection-manager failures instead of duplicating cache fallback logic.
    • Persist successful connection-manager responses to the bridge cache when cacheTTL > 0, so subsequent failures can fall back to them.
    • Emit telemetry after the fallback decision so LocalCacheHit and ResponseData reflect the final response.
  • core/services/pipeline/task.bridge_test.go

    • Add TestBridgeTask_UsesBridgeConnManagerCacheFallback to verify that a missing observation is resolved from the seeded bridge cache and that telemetry reports the cache hit.

Testing

  • go test ./core/services/pipeline -run TestBridgeTask_ passes.
  • go test ./core/services/pipeline passes.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

👋 denis-chernov-smartcontract, 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 9, 2026

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@trunk-io

trunk-io Bot commented Sep 9, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@denis-chernov-smartcontract
denis-chernov-smartcontract force-pushed the DS/useConenctionManager-fallback-to-use-observation-cache branch from 111eb7c to 5c33a93 Compare September 9, 2026 23:36
@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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant