Clean up and improve upon the rbt patch JSON output.
Review Request #12173 — Created March 17, 2022 and submitted
The
rbt patch --json
output 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_num
will 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_request
has been renamed toreview_request_id
, and
review_request_url
has been added.review_request_id
is now
an integer, rather than a string.If the working directory is clean, we now warn, rather than erroring
out. Previously, the error would causestatus
to 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 --json
output 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_num
will 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_request
has been renamed toreview_request_id
, and~ review_request_url
has been added.~ review_request_url
has been added.review_request_id
is 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 status
to befailed
, even ifthe patch was successful. Reducing this to a warning avoids this problem.