Please fill out the issue checklist below and provide ALL the requested information.
CF_TRACE=1
to help debug the issue.Describe the bug and the command you saw an issue with
In cloudfoundry/cloud_controller_ng#2227 we decided to set the X-Cf-Warnings
header when one of the services backing the /v3/processes/:guid/stats
endpoint has an error and we decide to return a partial response.
This is nice because the user will still get informed that something is not quite right by the cf cli
, but otherwise continue to see other information about their process. Using the cf7
CLI it looks like this warning is usually printed to stderr
, but for cf curl
it is being printed to stdout
and making the response difficult to parse.
What happened
When I use cf curl
to hit an endpoint that sets the X-Cf-Warnings
header the warning is printed to stdout
and makes the output no longer JSON parseable. Example:
cf curl /v3/processes/e9c6facc-7c9b-4cf6-9a7f-e5a4c908157c/stats
{
"resources": [
{
"type": "web",
"index": 0,
"state": "RUNNING",
"host": "127.0.0.1",
"uptime": 173624,
"mem_quota": null,
"disk_quota": null,
"fds_quota": 16384,
"isolation_segment": "placeholder",
"details": null,
"instance_ports": [
{
"external": 80,
"internal": 8080,
"external_tls_proxy_port": null,
"internal_tls_proxy_port": null
}
],
"usage": {}
}
]
}
Stats server temporarily unavailable.
Expected behavior
The X-Cf-Warnings
header would either be printed to stderr
or ignored and only displayed if the user requests it via the -i
(Include response headers in the output) flag.
Exact Steps To Reproduce
Steps to reproduce the behavior; include the exact CLI commands and verbose output:
bosh ssh doppler
sudo su -
monit stop log-cache
cf curl /v3/apps/$(cf app MY_APP --guid)/processes
to get the web
process guid for the appcf curl /v3/processes/:guid/stats
Provide more context
cf version 7.2.0+be4a5ce2b.2020-12-10
Related Issues and PRs
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4