Commit 0dcc2d1
authored
fix(operator): strip stage prefix on private API GW integrations (#1283)
Private (VPC_LINK) HTTP API integrations forward the stage-prefixed
request path to the backend by default (e.g. `/prod/webhook/telegram`
instead of `/webhook/telegram`), per AWS's documented behavior for
private integrations. OpenAB's webhook router matches the exact
configured path, so every request 404s at the container despite the
VPC Link, Cloud Map, and route wiring all being otherwise correct.
Found via live E2E testing against a real deployed Telegram bot: the
integration, route, and Cloud Map instance all checked out correctly
via the AWS API, and API Gateway access logs confirmed the route was
matched and the integration invoked ($context.integrationStatus=404),
but the request never reached openab's handler. Earlier scratch tests
with an echo-image backend didn't catch this because that image
doesn't do path-based routing.
Fix: set `overwrite:path=$request.path` on the integration's request
parameters when creating it, and self-heal existing integrations
created before this fix by patching the parameter in on the next
`oabctl apply` (no manual intervention or service recreate needed).
Verified live: 404 reproduced on a fresh deploy, manually patching the
parameter via the AWS CLI immediately fixed it, then re-ran two full
apply/delete cycles with the fixed binary — both created the
integration with the override baked in automatically and returned
200 OK end-to-end (API Gateway -> VPC Link -> Cloud Map -> Fargate).
Co-authored-by: chaodu-agent <chaodu-agent@users.noreply.github.com>1 parent a35fa46 commit 0dcc2d1
2 files changed
Lines changed: 78 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
272 | 285 | | |
273 | 286 | | |
274 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
146 | 160 | | |
147 | 161 | | |
148 | 162 | | |
| |||
733 | 747 | | |
734 | 748 | | |
735 | 749 | | |
736 | | - | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
737 | 767 | | |
738 | 768 | | |
739 | 769 | | |
| |||
743 | 773 | | |
744 | 774 | | |
745 | 775 | | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
746 | 783 | | |
747 | 784 | | |
748 | 785 | | |
| |||
752 | 789 | | |
753 | 790 | | |
754 | 791 | | |
| 792 | + | |
755 | 793 | | |
756 | 794 | | |
757 | 795 | | |
| |||
882 | 920 | | |
883 | 921 | | |
884 | 922 | | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
885 | 948 | | |
886 | 949 | | |
887 | 950 | | |
| |||
0 commit comments