Commit 18f6179
Allow for automated call graph generation to keep contexts unique (#249)
* Allow for automated call graph generation to keep contexts unique within
StdCallbackContext for replay deduping. Now developers do not need to
provide a name when calling services. There is a unique call graph
context maintained for each service call made. The context is request
aware, so different requests made will have their own independent
context for dedupe
Dedupe identical requests
```java
ProgressEvent<Model, StdCallbackContext> result =
initiator.translateToServiceRequest(m -> createRepository)
.makeServiceCall((r, c) ->
c.injectCredentialsAndInvokeV2(
r, c.client()::createRepository))
.success();
ProgressEvent<Model, StdCallbackContext> result_2 =
// make same request call
initiator.translateToServiceRequest(m -> createRepository)
.makeServiceCall((r, c) ->
c.injectCredentialsAndInvokeV2(
r, c.client()::createRepository))
.success();
assertThat(result).isEqualsTo(result_2);
```
* Prevent ConcurrentModificationExceptions in stabilize calls if they
access the map and attempt to modify it
Co-authored-by: diwakar <diwakar@amazon.com>1 parent 52114e3 commit 18f6179
File tree
6 files changed
+257
-18
lines changed- src
- main/java/software/amazon/cloudformation/proxy
- test/java/software/amazon/cloudformation/proxy
- service
6 files changed
+257
-18
lines changedLines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
172 | 179 | | |
173 | 180 | | |
174 | 181 | | |
| |||
192 | 199 | | |
193 | 200 | | |
194 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
195 | 207 | | |
196 | 208 | | |
197 | 209 | | |
| |||
234 | 246 | | |
235 | 247 | | |
236 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
237 | 265 | | |
238 | 266 | | |
239 | 267 | | |
| |||
315 | 343 | | |
316 | 344 | | |
317 | 345 | | |
| 346 | + | |
| 347 | + | |
318 | 348 | | |
319 | 349 | | |
320 | 350 | | |
| |||
377 | 407 | | |
378 | 408 | | |
379 | 409 | | |
| 410 | + | |
380 | 411 | | |
381 | 412 | | |
382 | 413 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
Lines changed: 61 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
| 40 | + | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
272 | 276 | | |
273 | 277 | | |
274 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
275 | 312 | | |
276 | 313 | | |
277 | 314 | | |
278 | 315 | | |
279 | | - | |
280 | | - | |
281 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
282 | 340 | | |
283 | 341 | | |
284 | 342 | | |
| |||
0 commit comments