Commit 8579474
Feature/4890 detect fail early upgrade (#5864)
* feature(4890): added shouldUpgrade function in the upgrade cli file
* feature(4890): added shouldUpgrade check into the upgrade command
* feature(4890): ran gofmt
* feature(4890): added a "force" flag, marked it as hidden
* feature(4890): removed dpkg, rpm and container logic
* feature(4890): ran gofmt
* feature(4890): updated the function signature of the upgrade command, updated tests, added new tests
* feature(4890): update comments
* feature(4890): added changelog fragment
* feature(4890): added fatal log in case there is an error while marking force flag as hidden
* feature(4890): added error checks in tests
* feature(4890): updated the summary in the changelog fragment
* feature(4890): removed the shorthand flag for the force flag
* feature(4890): updated synchronization in the tests
* Update internal/pkg/agent/cmd/upgrade_test.go
Co-authored-by: Paolo Chilà <[email protected]>
* feature(4890): using streams err output instead of defaulting to stderr
* feature(4890): use EXPECT instead of On
* feature(4890): moved unconfirmed upgrade error to a package var
* feature(4890): removed confirmation from upgrade check for when force flag is set
* Update internal/pkg/agent/cmd/upgrade.go
Co-authored-by: Paolo Chilà <[email protected]>
* Update internal/pkg/agent/cmd/upgrade.go
Co-authored-by: Paolo Chilà <[email protected]>
* feature(4890): fix errors
* Update internal/pkg/agent/cmd/upgrade.go
Co-authored-by: Craig MacKenzie <[email protected]>
* feature(4890): update test
* fearure(4890): replace ageninfo with state call
- updated agentinfo proto
- updated relevant generated code
- implemented state call in the upgrade cmd
* feature(4890): updated proto, client and server implementation
* feature(4890): fix struct tag
* feature(4890): added skip-verify checks
* feature(4890): ran addLicenseHeaders
* feature(4890): ran mage clean
* feature(4890): fix typo
* feature(4890): added timeout to connection
* feature(4890): changed condition check order
* feature(4890): fix unit tests
* feature(4890): refactored tests, using mock client
* Update internal/pkg/agent/cmd/upgrade.go
Co-authored-by: Andrzej Stencel <[email protected]>
* feature(4890): use lower case "f" in error messages to be more consistent
* feature(4890): remove duplicate line
* feature(4890): ran mage controlProto with correct protoc version
---------
Co-authored-by: Paolo Chilà <[email protected]>
Co-authored-by: Craig MacKenzie <[email protected]>
Co-authored-by: Andrzej Stencel <[email protected]>1 parent 5ac225d commit 8579474
File tree
10 files changed
+556
-216
lines changed- changelog/fragments
- internal/pkg/agent
- application
- coordinator
- info
- cmd
- pkg/control/v2
- client
- cproto
- server
10 files changed
+556
-216
lines changedLines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1304 | 1304 | | |
1305 | 1305 | | |
1306 | 1306 | | |
1307 | | - | |
| 1307 | + | |
1308 | 1308 | | |
1309 | 1309 | | |
1310 | 1310 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
| |||
168 | 167 | | |
169 | 168 | | |
170 | 169 | | |
171 | | - | |
172 | 170 | | |
173 | 171 | | |
174 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
| |||
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| 52 | + | |
43 | 53 | | |
44 | 54 | | |
45 | 55 | | |
| |||
53 | 63 | | |
54 | 64 | | |
55 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
56 | 72 | | |
57 | 73 | | |
58 | 74 | | |
59 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
60 | 85 | | |
61 | 86 | | |
62 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
63 | 121 | | |
64 | 122 | | |
65 | | - | |
66 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
67 | 158 | | |
68 | 159 | | |
69 | | - | |
| 160 | + | |
70 | 161 | | |
71 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
72 | 178 | | |
73 | | - | |
74 | 179 | | |
75 | 180 | | |
76 | 181 | | |
| |||
80 | 185 | | |
81 | 186 | | |
82 | 187 | | |
83 | | - | |
84 | 188 | | |
85 | 189 | | |
86 | 190 | | |
| |||
122 | 226 | | |
123 | 227 | | |
124 | 228 | | |
125 | | - | |
| 229 | + | |
126 | 230 | | |
127 | 231 | | |
0 commit comments