Commit b4c4984
Updates validation logic on pgBackRest backup options
Currently validation is run on backup options passed in with the --backup-opts
flag to reject unknown or blacklisted flags. This commit updates the validation
to only reject blacklisted flags and allow unknown flags to be passed into the
operator. This will make new pgBackRest features and flags easier to support by
relying on the builtin pgBackRest validation. Now new pgBackrest flags can be
used without updating the list of known flags.
The handleCustomParseErrors function now will take the unknown flag error and
check if the flag is blacklisted. If not, the error is ignored and nil is
returned.
A second level check is added to validate the parsedBackupOpts. Now the return
from handleCustomParseErrors is checked rather than immediately returned.1 parent 185a9e2 commit b4c4984
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| |||
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
186 | 192 | | |
187 | 193 | | |
188 | 194 | | |
| |||
205 | 211 | | |
206 | 212 | | |
207 | 213 | | |
208 | | - | |
| 214 | + | |
209 | 215 | | |
210 | 216 | | |
211 | 217 | | |
| |||
0 commit comments