Commit 8a66571
Allow handover and redirection interceptors to cover additional service prefixes (#10963)
## What changed?
`NamespaceHandoverInterceptor` and `Redirection` short-circuit on the
`WorkflowService` prefix,
so requests to other frontend gRPC services skip handover gating and
cross-cell redirection. Add
two opt-in, default-no-op seams (WorkflowService behavior unchanged):
- `NamespaceHandoverInterceptor.WithAdditionalServicePrefixes(...)` —
gate additional service prefixes.
- `Redirection.WithRedirectResponses(...)` — register methods as
redirectable, keyed by full gRPC
method; namespace resolved via the existing
`NamespaceIDGetter`/`NamespaceNameGetter` path, fails closed.
Neither references any embedding service; callers inject the
prefix/response map.
## Why?
Workflow-scoped requests on other frontend services must observe the
same handover wait and
active-cluster redirection as `WorkflowService`, or they can be served
on a cell that no longer
owns the partition during/after a handover. The prefix short-circuit
made the interceptors no-ops
for anything but `WorkflowService`.
## How did you test it?
- [x] built
- [x] covered by existing tests
- [ ] run locally and tested manually
- [ ] added new unit test(s)
- [ ] added new functional test(s)
Existing tests confirm the default (no-op) behavior is unchanged; the
opt-in path is exercised by a downstream functional test.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent b33bfbd commit 8a66571
2 files changed
Lines changed: 60 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| |||
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
67 | 96 | | |
68 | 97 | | |
69 | 98 | | |
| |||
72 | 101 | | |
73 | 102 | | |
74 | 103 | | |
75 | | - | |
| 104 | + | |
76 | 105 | | |
77 | 106 | | |
78 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
184 | 188 | | |
185 | 189 | | |
186 | 190 | | |
| |||
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
218 | 235 | | |
219 | 236 | | |
220 | 237 | | |
| |||
224 | 241 | | |
225 | 242 | | |
226 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
227 | 257 | | |
228 | 258 | | |
229 | 259 | | |
| |||
0 commit comments