Commit f06da57
authored
fix: remove index-based immutability check that blocked demo deploy (#2091)
* fix: remove index-based immutability check that blocked cross-manifest applies
The validateImmutability function matched instruments and account types by
array index position, producing false "code changed" errors when applying
a manifest with different composition than the previously applied one
(e.g. energy manifest after banking manifest on demo deploy).
Codes are primary keys - identity is code-based, not position-based. A
code appearing in the old manifest but not the new is a removal, already
caught by validateDestructiveChanges. The index-based check is removed
and the function made a no-op.
* fix: update applier test expecting IMMUTABLE_FIELD_CHANGED
The applier integration test also expected IMMUTABLE_FIELD_CHANGED errors
from the now-removed index-based immutability check. Updated to verify no
such errors are produced.
---------
Co-authored-by: Ben Coombs <bjcoombs@users.noreply.github.com>1 parent c64e9da commit f06da57
4 files changed
Lines changed: 37 additions & 155 deletions
File tree
- services/control-plane/internal
- applier
- validator
Lines changed: 7 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | | - | |
| 538 | + | |
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
542 | | - | |
| 542 | + | |
| 543 | + | |
543 | 544 | | |
544 | 545 | | |
545 | 546 | | |
| |||
548 | 549 | | |
549 | 550 | | |
550 | 551 | | |
551 | | - | |
| 552 | + | |
552 | 553 | | |
553 | 554 | | |
554 | 555 | | |
555 | 556 | | |
556 | 557 | | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
| 558 | + | |
562 | 559 | | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
| 560 | + | |
| 561 | + | |
567 | 562 | | |
568 | | - | |
569 | 563 | | |
570 | 564 | | |
571 | 565 | | |
| |||
Lines changed: 8 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
101 | 105 | | |
102 | | - | |
103 | | - | |
104 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
105 | 109 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | 110 | | |
145 | 111 | | |
146 | 112 | | |
| |||
Lines changed: 10 additions & 64 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 169 | + | |
188 | 170 | | |
189 | 171 | | |
190 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
191 | 176 | | |
192 | 177 | | |
193 | 178 | | |
| 179 | + | |
194 | 180 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | 181 | | |
217 | 182 | | |
218 | 183 | | |
219 | 184 | | |
220 | 185 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | 186 | | |
239 | 187 | | |
| 188 | + | |
240 | 189 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 190 | + | |
| 191 | + | |
246 | 192 | | |
247 | 193 | | |
248 | 194 | | |
249 | 195 | | |
250 | 196 | | |
251 | | - | |
| 197 | + | |
252 | 198 | | |
253 | 199 | | |
254 | 200 | | |
| |||
Lines changed: 12 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
800 | | - | |
| 800 | + | |
801 | 801 | | |
802 | 802 | | |
803 | 803 | | |
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
| 811 | + | |
| 812 | + | |
816 | 813 | | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
| 814 | + | |
| 815 | + | |
823 | 816 | | |
824 | 817 | | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | 818 | | |
829 | 819 | | |
830 | | - | |
| 820 | + | |
831 | 821 | | |
832 | 822 | | |
833 | 823 | | |
| |||
838 | 828 | | |
839 | 829 | | |
840 | 830 | | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
| 831 | + | |
846 | 832 | | |
847 | | - | |
848 | | - | |
849 | | - | |
| 833 | + | |
| 834 | + | |
850 | 835 | | |
851 | 836 | | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | 837 | | |
856 | 838 | | |
857 | 839 | | |
| |||
2966 | 2948 | | |
2967 | 2949 | | |
2968 | 2950 | | |
2969 | | - | |
| 2951 | + | |
2970 | 2952 | | |
2971 | 2953 | | |
2972 | 2954 | | |
| |||
2975 | 2957 | | |
2976 | 2958 | | |
2977 | 2959 | | |
2978 | | - | |
2979 | | - | |
2980 | | - | |
| 2960 | + | |
2981 | 2961 | | |
2982 | | - | |
2983 | | - | |
2984 | | - | |
2985 | | - | |
| 2962 | + | |
2986 | 2963 | | |
2987 | | - | |
2988 | 2964 | | |
2989 | 2965 | | |
2990 | 2966 | | |
| |||
0 commit comments