Commit 7c2041a
fix(preview-gated): chain-constrain dependencies to the previous stage's deploy
Chain-wide `dependencies` (a built Docker image, an AMI) previously carried
only whatever `passed` the caller set on them directly -- typically their own
build job. Nothing tied them to the PREVIOUS STAGE's deploy the way
`pulumi_code` already is via `passed_from`, so an image built after a stage's
own build step, but never actually deployed to the environment before it,
was still eligible to trigger and be approved there. Confirmed against
ol-infrastructure's generated pipelines (PR mitodl/ol-infrastructure#5600):
QA's preview job for the `concourse` AMI accepted any AMI that passed the
packer build, not specifically the one that deployed to CI.
Append the previous stage's deploy job to each chain-wide dependency's
`passed`, same guarantee `pulumi_code` gets, stacked on top of (not
replacing) whatever `passed` the caller already set. Copied, not mutated in
place, so this doesn't reintroduce the deploy-chained mutation trap this
topology exists to avoid. `custom_dependencies` is untouched -- those are
index-scoped and the caller already sets `passed` there explicitly.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019mvaFgGzBYBL2aatAZ2mJG1 parent 2fe26bb commit 7c2041a
2 files changed
Lines changed: 87 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
198 | 202 | | |
199 | | - | |
| 203 | + | |
| 204 | + | |
200 | 205 | | |
201 | 206 | | |
202 | 207 | | |
| |||
738 | 743 | | |
739 | 744 | | |
740 | 745 | | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
741 | 753 | | |
742 | 754 | | |
743 | 755 | | |
| |||
824 | 836 | | |
825 | 837 | | |
826 | 838 | | |
827 | | - | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
828 | 856 | | |
829 | 857 | | |
830 | | - | |
| 858 | + | |
831 | 859 | | |
832 | 860 | | |
833 | 861 | | |
834 | 862 | | |
835 | 863 | | |
836 | 864 | | |
837 | | - | |
838 | 865 | | |
839 | 866 | | |
840 | 867 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
730 | 779 | | |
731 | 780 | | |
732 | 781 | | |
| |||
902 | 951 | | |
903 | 952 | | |
904 | 953 | | |
905 | | - | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
906 | 959 | | |
907 | 960 | | |
908 | | - | |
| 961 | + | |
909 | 962 | | |
910 | 963 | | |
911 | 964 | | |
| |||
0 commit comments