Commit d13b586
authored
Compare tags using common tag type (#399)
Implements aws-controllers-k8s/community#1658
Description of changes:
Instead of comparing tag fields using the standard `reflect.DeepEquals`, this PR updates the code-generator to convert the tags to the common `acktags.Tag` type and then compare those as maps. This ensures that changes in ordering do not result in false positive deltas.
Controllers that rely on custom tag delta functions also typically use a function to determine which tags are being added and which are being removed. Using the same trick as this PR, a method can be added to the common runtime to deduce those - resulting in far less duplicated and verbose custom hook code. Those changes are not included in this PR, though.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.1 parent 8dc09b7 commit d13b586
File tree
6 files changed
+93
-10
lines changed- pkg
- generate/code
- model
- testdata/models/apis
- lambda/0000-00-00
- s3/0000-00-00
- templates/pkg/resource
6 files changed
+93
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
102 | 107 | | |
103 | 108 | | |
104 | 109 | | |
| |||
147 | 152 | | |
148 | 153 | | |
149 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
150 | 163 | | |
151 | 164 | | |
152 | 165 | | |
153 | | - | |
| 166 | + | |
154 | 167 | | |
155 | 168 | | |
156 | 169 | | |
| |||
520 | 533 | | |
521 | 534 | | |
522 | 535 | | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
523 | 576 | | |
524 | 577 | | |
525 | 578 | | |
| |||
551 | 604 | | |
552 | 605 | | |
553 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
554 | 612 | | |
555 | 613 | | |
556 | 614 | | |
| |||
572 | 630 | | |
573 | 631 | | |
574 | 632 | | |
575 | | - | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
576 | 636 | | |
577 | 637 | | |
578 | 638 | | |
| |||
583 | 643 | | |
584 | 644 | | |
585 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
586 | 653 | | |
587 | 654 | | |
588 | 655 | | |
| |||
604 | 671 | | |
605 | 672 | | |
606 | 673 | | |
| 674 | + | |
607 | 675 | | |
608 | 676 | | |
609 | 677 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
| |||
333 | 340 | | |
334 | 341 | | |
335 | 342 | | |
336 | | - | |
| 343 | + | |
337 | 344 | | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | 345 | | |
343 | 346 | | |
344 | 347 | | |
| |||
490 | 493 | | |
491 | 494 | | |
492 | 495 | | |
493 | | - | |
| 496 | + | |
494 | 497 | | |
495 | 498 | | |
496 | 499 | | |
| |||
539 | 542 | | |
540 | 543 | | |
541 | 544 | | |
542 | | - | |
| 545 | + | |
543 | 546 | | |
544 | 547 | | |
545 | 548 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
0 commit comments