Add -vvv JSON response tracing to the remote client #15
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The remote client accepts repeated
-vflags, but-vvvcurrently behaves exactly like-vv.Confirmed implementation points:
client/lib/printout.py::build_client_parserdefines-v/--verbosewithaction="count".client/ccwget-local.py::configure_loggingmaps every verbosity value greater than or equal to two tologging.DEBUG.client/lib/http.py::ServiceHttpClient.requestlogs the HTTP method and endpoint, while Requests/urllib3 debug logging shows connection and response status details.client/ccwget-remote.py::show_job_status, but are not logged../ccwget-remote.py -status JOB_ID -vvshows transport activity and formatted status fields without the original JSON response.This limits API troubleshooting because operators cannot compare the backend JSON contract with the rendered client output. JSON tracing must remain explicit and must not leak the bearer token or dump binary object responses.
Proposed approach
-v: user-facing operation and progress information.-vv: existing HTTP transport diagnostics.-vvv: HTTP diagnostics plus decoded JSON response bodies.client/lib/http.py::ServiceHttpClientand enable it only when parsed verbosity is at least three./getobjectpayload bodies.-vv, normal output, quiet mode, API polling, object download, and server behavior unchanged.This requires client code, tests, documentation, and a short release-note update. No server, configuration, queue, database, or deployment migration is required.
Scope
client/lib/http.pywith opt-in JSON response tracing.client/ccwget-remote.py.client/lib/printout.py, while documenting the third verbosity level.-vvdoes not print JSON and-vvvdoes.documentation/customer-commands.md,documentation/operator-runbook.md, andrelease_notes.md.Acceptance criteria
./ccwget-remote.py -status JOB_ID -vvvprints the decoded JSON returned byGET /jobs/JOB_IDin addition to existing HTTP diagnostics and formatted status output.-vvvtraces JSON for successful and error API responses.-vvretains current output and does not print response JSON.-v, default mode, and-qbehavior remain unchanged unless-vvvis explicitly supplied./getobjectresponse bytes are never logged as JSON or text.-vvvmay expose returned search metadata in terminal logs.Dependencies
None identified.