Commit c25b36c
committed
fix(cli): only match prefixed overwrites on word boundaries in _parse_prefixed_args
The prefix detection in _parse_prefixed_args used startswith(prefix),
so any task argument whose parameter name merely starts with a reserved
prefix was rejected with a misleading error, e.g.:
ValueError: Run overwrites must start with 'run.'. Got runtime=3600
Task parameters named runtime, run_id, executors, plugins_dir, etc.
crashed every CLI invocation. Prefixed args are now only matched when
directly followed by a delimiter ('=', '.', '['); keyword arguments for
task parameters are passed through untouched. Bare tokens starting with
the prefix still raise the original error.
Additionally, only the leading prefix occurrence is stripped (previously
run.a.run.b=1 was mangled to ab=1, silently targeting the wrong
parameter) and values containing '=' are no longer truncated
(executor=k=v previously yielded value 'k').
Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>1 parent b85eb67 commit c25b36c
2 files changed
Lines changed: 76 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1659 | 1659 | | |
1660 | 1660 | | |
1661 | 1661 | | |
1662 | | - | |
1663 | | - | |
1664 | | - | |
1665 | | - | |
1666 | | - | |
1667 | | - | |
1668 | | - | |
1669 | | - | |
1670 | | - | |
1671 | | - | |
1672 | | - | |
1673 | | - | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
1674 | 1674 | | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
1675 | 1678 | | |
1676 | 1679 | | |
1677 | 1680 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
170 | 186 | | |
171 | 187 | | |
172 | 188 | | |
| |||
1163 | 1179 | | |
1164 | 1180 | | |
1165 | 1181 | | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
1166 | 1227 | | |
1167 | 1228 | | |
1168 | 1229 | | |
| |||
0 commit comments