Commit 5a200f0
committed
fix(provisioning): suppress CloudFront OriginGroups drift + cover deeper cache-behavior fields (review on #871)
Code + test review (no blockers) on the CloudFront readCurrentState PR:
- convertToCfnFormat unwraps only the TOP-LEVEL OriginGroups list; each origin
group's inner {Quantity,Items} wrappers (Members, FailoverCriteria.
StatusCodes) are not unwrapped (no revertOriginGroup), and convertToSdkFormat
is symmetrically unaware of them. Against the observed baseline both sides go
through the same readCurrentState so it never false-positives on a normal
deploy, but against the properties-fallback baseline the raw shape would diff
the bare-array template form. Rather than guess the OriginGroups inner shape
with no fixture to verify it (risking a wrong revertOriginGroup), add
DistributionConfig.OriginGroups to getDriftUnknownPaths so drift on origin
groups is suppressed until a dedicated fix lands a revertOriginGroup + a real
OriginGroups integ fixture. Documented in the changelog + a code comment.
- Add a unit test round-tripping the cache-behavior {Quantity,Items} fields the
main test missed: LambdaFunctionAssociations, FunctionAssociations,
ForwardedValues.QueryStringCacheKeys, and the 3-level
ForwardedValues.Cookies.WhitelistedNames (exercises unwrapQuantityAtPath's
multi-level recursion specifically). Update the getDriftUnknownPaths test for
the new OriginGroups entry.
Full suite 5924 tests pass. Happy-path re-verified by re-running the
s3-cloudfront integ (deploy + distribution-scoped drift clean/detect + clean
destroy, 0 orphans).1 parent 6faa501 commit 5a200f0
3 files changed
Lines changed: 79 additions & 3 deletions
File tree
- docs
- src/provisioning/providers
- tests/unit/provisioning
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
440 | 453 | | |
441 | 454 | | |
442 | 455 | | |
443 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
444 | 461 | | |
445 | 462 | | |
446 | 463 | | |
| |||
Lines changed: 60 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
875 | 929 | | |
876 | 930 | | |
877 | 931 | | |
| |||
941 | 995 | | |
942 | 996 | | |
943 | 997 | | |
944 | | - | |
| 998 | + | |
945 | 999 | | |
946 | 1000 | | |
947 | 1001 | | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
948 | 1007 | | |
949 | 1008 | | |
950 | 1009 | | |
| |||
0 commit comments