Commit dc03b61
committed
Verify providers need upgrade before applying
If a user runs `upgrade plan` and the results show there are no
available upgrades, the expectation is they then do not attempt to apply
the plan. But nothing prevents them from doing so.
If a non-upgrade plan is applied, the current apply logic does not
handle the case where the "next version" is empty. To make this more
robust, and to protect against users trying to apply plans with no
available upgrades, this performs a quick validation on the plan
providers to make sure they have a version to upgrade to. If not, the
`upgrade apply` call ends up being a no-op and avoids potentially
confusing error output.
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>1 parent b09799f commit dc03b61
2 files changed
+46
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
178 | 187 | | |
179 | 188 | | |
180 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
1103 | 1140 | | |
1104 | 1141 | | |
1105 | 1142 | | |
| |||
0 commit comments