-
Notifications
You must be signed in to change notification settings - Fork 367
Closed
Closed
Copy link
Description
Issue
/v2/apps/<guid>/summary does't return newly set env var unless app is restarted.
Context
Looks like a regression in capi-release v1.91.0 / cf-deployment 12.33.0.
Worked in capi-release v1.89.0 / cf-deployment 12.25.0
Steps to Reproduce
- Deploy a testapp. e.g. in a directory with an index.html file:
cf push testapp -m 128M -b binary_buildpack -c "python3 -m http.server 8080" --random-route
- Set an env var
cf set-env testapp HELLO WORLD
- Check that env var is set with /v2/apps/<guid>/env endpoint
cf curl /v2/apps/$(cf app testapp --guid)/env
{
...
"environment_json": {
"HELLO": "WORLD" <-- OK
},
"system_env_json": {
"VCAP_SERVICES": {}
},
"application_env_json": {
"VCAP_APPLICATION": {
...
"application_name": "testapp",
...
}
}
}
- Check that env var is set with /v2/apps/<guid>/summary endpoint
cf curl /v2/apps/$(cf app testapp --guid)/summary
{
"guid": "c2f01f96-8427-4d5e-bf00-1177249c1fe1",
"name": "testapp",
...
"buildpack": "binary_buildpack",
"detected_buildpack": "binary",
"detected_buildpack_guid": "27676514-5ef3-4789-8a15-a48cf2fb620b",
"environment_json": {}, <-- FAILURE: should not be empty
...
}
-
Restart app with
cf restart testapp -
Check that env var is set with /v2/apps/<guid>/summary endpoint
cf curl /v2/apps/$(cf app testapp --guid)/summary
{
"guid": "c2f01f96-8427-4d5e-bf00-1177249c1fe1",
"name": "testapp",
...
"buildpack": "binary_buildpack",
"detected_buildpack": "binary",
"detected_buildpack_guid": "27676514-5ef3-4789-8a15-a48cf2fb620b",
"environment_json": {
"HELLO": "WORLD" <-- OK
},
...
}
Expected result
environment_json in step 4 (summary endpoint) should contain HELLO var, i.e. show the same result as in step 6 after the restart or as in step 3 (env endpoint).
Current result
environment_json in step 4 (summary endpoint) is empty, i.e. the set env vars are missing.
Metadata
Metadata
Assignees
Labels
No labels