Clean up and improve upon the rbt patch JSON output.
Review Request #12173 — Created March 17, 2022 and submitted
The
rbt patch --jsonoutput has had some cleanups designed to help
identify failed patches, to avoid failure on warnings, and to add
consistency with other JSON updates.When a patch fails to apply,
failed_patch_numwill now be set to the
patch number. This can help with debugging the application of multiple
patches.The total number of patches is now recorded in
total_patches, rather
thann_patches.
review_requesthas been renamed toreview_request_id, and
review_request_urlhas been added.review_request_idis now
an integer, rather than a string.If the working directory is clean, we now warn, rather than erroring
out. Previously, the error would causestatusto befailed, even if
the patch was successful. Reducing this to a warning avoids this
problem.
Tested applying patches and triggering the various errors. Checked to
make sure I was getting the payloads I expected in each case.Tested with an unclean working directory. Verified I got a warning, but
it still completed successfully.
| Summary | ID |
|---|---|
| 3c5a3d7acd4aab0e74fb260eb7d83330e5a37c2c |
- Description:
-
The
rbt patch --jsonoutput has had some cleanups designed to helpidentify failed patches, to avoid failure on warnings, and to add consistency with other JSON updates. When a patch fails to apply,
failed_patch_numwill now be set to thepatch number. This can help with debugging the application of multiple patches. The total number of patches is now recorded in
total_patches, ratherthan n_patches.review_requesthas been renamed toreview_request_id, and~ review_request_urlhas been added.~ review_request_urlhas been added.review_request_idis now+ an integer, rather than a string. If the working directory is clean, we now warn, rather than erroring
out. Previously, the error would cause statusto befailed, even ifthe patch was successful. Reducing this to a warning avoids this problem.