mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 11:48:15 +00:00
Automatic merge from submit-queue (batch tested with PRs 38173, 38151, 38197, 38221) Include resource type headers in diff report **What this PR does / why we need it**: when checking for leaked resources, we report a failure only if there were additions to the diff - we don't want resources that were deleted during the run to count as a failure. The logic for this removes the resource type headers from the diff report, however, so it's harder to understand what leaked. For example, in https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/ci-kubernetes-e2e-gke-alpha-features-release-1.5/196/, the test failure shows ``` Error: 4 leaked resources +NAME REGION IP_ADDRESS IP_PROTOCOL TARGET +a66878dbaad1f11e695b342010af0002 us-central1 104.198.182.83 TCP us-central1/targetPools/a66878dbaad1f11e695b342010af0002 +NAME REGION SESSION_AFFINITY BACKUP HEALTH_CHECKS +a66878dbaad1f11e695b342010af0002 us-central1 a66878dbaad1f11e695b342010af0002 ``` but the [actual diff](https://storage.googleapis.com/kubernetes-jenkins/logs/ci-kubernetes-e2e-gke-alpha-features-release-1.5/196/artifacts/gcp-resources-diff.txt) contains more information: ``` --- /workspace/_artifacts/gcp-resources-before.txt 2016-12-01 14:39:14.260049037 -0800 +++ /workspace/_artifacts/gcp-resources-after.txt 2016-12-01 14:39:14.260049037 -0800 @@ -34,8 +34 @@ [ addresses ] -NAME REGION ADDRESS STATUS -a03d0e020a6bc11e6855f42010af0001 us-central1 104.197.135.88 RESERVED -a23f20a47a6a011e6829a42010af0004 us-central1 104.197.147.212 RESERVED -a32291b51a5e611e6b73342010af0002 us-central1 104.198.171.178 RESERVED -a3c93cf79a65811e6b7c242010af0001 us-central1 104.198.58.57 RESERVED -a9ac5bd1ba62811e68d1142010af0004 us-central1 104.154.134.135 RESERVED -adae4c1a7a69511e6b2df42010af0000 us-central1 104.198.182.83 RESERVED -adb4a80caa60311e689a942010af0001 us-central1 104.154.116.195 RESERVED + @@ -64 +57,2 @@ [ forwarding-rules ] - +NAME REGION IP_ADDRESS IP_PROTOCOL TARGET +a66878dbaad1f11e695b342010af0002 us-central1 104.198.182.83 TCP us-central1/targetPools/a66878dbaad1f11e695b342010af0002 @@ -68 +62,2 @@ [ target-pools ] - +NAME REGION SESSION_AFFINITY BACKUP HEALTH_CHECKS +a66878dbaad1f11e695b342010af0002 us-central1 a66878dbaad1f11e695b342010af0002 ``` This PR will include the `[ type header ]`s in the report if resources are leaked. cc @fejta