Skip to content

Make Nexus work OOTB with token-based callback routing#9513

Merged
bergundy merged 1 commit intomainfrom
nexus-working-ootb
Mar 13, 2026
Merged

Make Nexus work OOTB with token-based callback routing#9513
bergundy merged 1 commit intomainfrom
nexus-working-ootb

Conversation

@bergundy
Copy link
Copy Markdown
Member

@bergundy bergundy commented Mar 13, 2026

Summary

  • Use the system callback URL by default now that the previous minor supports it (1.30)
  • Extract system callback URL handling from routeRequest into a dedicated routeSystemCallbackRequest function that routes based on callback token namespace and active cluster
  • Update both components/callbacks and chasm/lib/callback packages to use namespace registry and callback token generator for routing decisions
  • Add unit tests for routeRequest and routeSystemCallbackRequest covering external targets, local/unknown cluster routing, nil headers, invalid tokens, namespace not found, and success paths

Test plan

  • Unit tests added for both components/callbacks and chasm/lib/callback packages
  • All 18 tests pass (9 per package)
  • make lint passes with no new issues

@bergundy bergundy requested review from a team as code owners March 13, 2026 18:34
Comment thread components/nexusoperations/config.go Outdated

// routeSystemCallbackRequest routes a system callback request to the appropriate frontend client
// based on the callback token's namespace and active cluster.
func routeSystemCallbackRequest(
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.

I'd prefer that we could export this function somewhere and call it in chasm/ and components/

not blocking

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, it's possible to remove some duplication here. The idea was to completely decouple the code as the HSM implementation will be deprecated soon and may stop receiving updates and diverge.

@bergundy bergundy force-pushed the nexus-working-ootb branch from 0c39da3 to 4840413 Compare March 13, 2026 20:38
Refactor system callback URL handling from routeRequest into a dedicated
routeSystemCallbackRequest function that routes based on callback token
namespace and active cluster. Update both components/callbacks and
chasm/lib/callback packages to use namespace registry and callback token
generator for routing decisions. Add unit tests covering external
targets, local/unknown cluster routing, nil headers, invalid tokens,
namespace not found, and success paths.
@bergundy bergundy force-pushed the nexus-working-ootb branch from 4840413 to 3f5ea56 Compare March 13, 2026 20:41
@bergundy bergundy merged commit bae0515 into main Mar 13, 2026
46 checks passed
@bergundy bergundy deleted the nexus-working-ootb branch March 13, 2026 21:09
birme pushed a commit to eyevinn-osaas/temporal that referenced this pull request Mar 23, 2026
## Summary
- Use the system callback URL by default now that the previous minor
supports it (1.30)
- Extract system callback URL handling from `routeRequest` into a
dedicated `routeSystemCallbackRequest` function that routes based on
callback token namespace and active cluster
- Update both `components/callbacks` and `chasm/lib/callback` packages
to use namespace registry and callback token generator for routing
decisions
- Add unit tests for `routeRequest` and `routeSystemCallbackRequest`
covering external targets, local/unknown cluster routing, nil headers,
invalid tokens, namespace not found, and success paths

## Test plan
- [x] Unit tests added for both `components/callbacks` and
`chasm/lib/callback` packages
- [x] All 18 tests pass (9 per package)
- [x] `make lint` passes with no new issues
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