Commit 319038d
bug: Fix status subresource getting updated on Update when it is empty
Before this, Update and Patch requests will override to-level status fields for objects that have a status resource if the status was initially empty. This happens because the code to set the status to what we already have in the unupdated object converts the object into a `map[string]any` using json serialization/deserialization, copies the original `status` field, then converts back. The json deserializer unfortunatelly does not properly clear the target, allowing data to remain that is absent in the json serialization.1 parent 580f203 commit 319038d
2 files changed
+8
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
995 | 995 | | |
996 | 996 | | |
997 | 997 | | |
| 998 | + | |
998 | 999 | | |
999 | 1000 | | |
1000 | 1001 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1409 | 1409 | | |
1410 | 1410 | | |
1411 | 1411 | | |
1412 | | - | |
| 1412 | + | |
1413 | 1413 | | |
1414 | | - | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
| 1414 | + | |
1418 | 1415 | | |
1419 | 1416 | | |
1420 | 1417 | | |
1421 | 1418 | | |
1422 | | - | |
| 1419 | + | |
1423 | 1420 | | |
1424 | 1421 | | |
1425 | 1422 | | |
1426 | 1423 | | |
1427 | | - | |
| 1424 | + | |
1428 | 1425 | | |
1429 | 1426 | | |
1430 | 1427 | | |
| |||
1511 | 1508 | | |
1512 | 1509 | | |
1513 | 1510 | | |
1514 | | - | |
| 1511 | + | |
1515 | 1512 | | |
1516 | 1513 | | |
1517 | 1514 | | |
1518 | | - | |
1519 | | - | |
1520 | | - | |
1521 | | - | |
1522 | | - | |
1523 | 1515 | | |
1524 | 1516 | | |
1525 | 1517 | | |
1526 | 1518 | | |
1527 | | - | |
| 1519 | + | |
1528 | 1520 | | |
1529 | 1521 | | |
1530 | 1522 | | |
1531 | 1523 | | |
1532 | | - | |
| 1524 | + | |
1533 | 1525 | | |
1534 | 1526 | | |
1535 | 1527 | | |
| |||
0 commit comments