Skip to content

Commit

Permalink
remove failed and repeated interactions in log
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmahou committed Mar 23, 2024
1 parent 0abbb6d commit 5f985aa
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 139 deletions.
4 changes: 2 additions & 2 deletions config/tests/samples/create/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ func NewHarness(ctx context.Context, t *testing.T) *Harness {
// Initialize VCR for TF requests
input := os.Getenv("VCR_MODE")
var VCRMode recorder.Mode
if input == "recording" {
if input == "record" {
VCRMode = recorder.ModeRecordOnly
} else if input == "replaying" {
} else if input == "replay" {
VCRMode = recorder.ModeReplayOnly
} else {
t.Fatalf("[VCR] Input mode is not supported.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3838530829430228066
7566824334709531536
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
version: 2
interactions:
Expand All @@ -20,61 +6,14 @@ interactions:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 0
transfer_encoding: []
trailer: {}
host: compute.googleapis.com
remote_addr: ""
request_uri: ""
body: ""
form: {}
headers:
Content-Type:
- application/json
url: https://compute.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc?alt=json
method: GET
response:
proto: HTTP/2.0
proto_major: 2
proto_minor: 0
transfer_encoding: []
trailer: {}
content_length: -1
uncompressed: true
body: |
{
"error": {
"code": 404,
"message": "The resource 'projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc' was not found",
"errors": [
{
"message": "The resource 'projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc' was not found",
"domain": "global",
"reason": "notFound",
"debugInfo": "fake debug info"
}
]
}
}
headers:
Content-Type:
- application/json; charset=UTF-8
status: 404 Not Found
code: 404
duration: 193.443983ms
- id: 1
request:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 409
content_length: 410
transfer_encoding: []
trailer: {}
host: compute.googleapis.com
remote_addr: ""
request_uri: ""
body: |
{"cpuOvercommitType":"NONE","description":"Node template for sole tenant nodes running in us-central1, with 96vCPUs and any amount of memory on any machine type.","name":"computenodetemplate-eh8yabhagpgc","nodeAffinityLabels":{"cnrm-test":"true","managed-by-cnrm":"true","memory_guarantee":"false"},"nodeTypeFlexibility":{"cpus":"96","memory":"any"},"region":"projects/cnrm-user/global/regions/us-central1"}
{"cpuOvercommitType":"NONE","description":"Node template for sole tenant nodes running in us-central1, with 96vCPUs and any amount of memory on any machine type.","name":"computenodetemplate-33a4ihmeg1u4l","nodeAffinityLabels":{"cnrm-test":"true","managed-by-cnrm":"true","memory_guarantee":"false"},"nodeTypeFlexibility":{"cpus":"96","memory":"any"},"region":"projects/cnrm-user/global/regions/us-central1"}
form: {}
headers:
Content-Type:
Expand All @@ -92,26 +31,26 @@ interactions:
body: |
{
"kind": "compute#operation",
"id": "5449225809889107670",
"name": "operation-1710825528762-613fc9bea1fe3-55490b87-cb1b4ec4",
"id": "2450955058046816700",
"name": "operation-1711173459145-6144d9e2e71fa-a2bdc85e-7750565b",
"operationType": "compute.nodeTemplates.insert",
"targetLink": "https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc",
"targetId": "2755123117236199126",
"targetLink": "https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1/nodeTemplates/computenodetemplate-33a4ihmeg1u4l",
"targetId": "3102467589298966972",
"status": "RUNNING",
"user": "[email protected]",
"progress": 0,
"insertTime": "2024-03-18T22:18:49.005-07:00",
"startTime": "2024-03-18T22:18:49.037-07:00",
"selfLink": "https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/operations/operation-1710825528762-613fc9bea1fe3-55490b87-cb1b4ec4",
"region": "https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1"
"insertTime": "2024-03-22T22:57:39.419-07:00",
"startTime": "2024-03-22T22:57:39.454-07:00",
"selfLink": "https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1/operations/operation-1711173459145-6144d9e2e71fa-a2bdc85e-7750565b",
"region": "https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1"
}
headers:
Content-Type:
- application/json; charset=UTF-8
status: 200 OK
code: 200
duration: 400.705161ms
- id: 2
duration: 405.258794ms
- id: 1
request:
proto: HTTP/1.1
proto_major: 1
Expand All @@ -127,7 +66,7 @@ interactions:
headers:
X-Goog-Api-Client:
- gl-go/1.21.5 gdcl/0.160.0
url: https://compute.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/operations/operation-1710825528762-613fc9bea1fe3-55490b87-cb1b4ec4?alt=json&prettyPrint=false
url: https://compute.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/operations/operation-1711173459145-6144d9e2e71fa-a2bdc85e-7750565b?alt=json&prettyPrint=false
method: GET
response:
proto: HTTP/2.0
Expand All @@ -137,14 +76,14 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"kind":"compute#operation","id":"5449225809889107670","name":"operation-1710825528762-613fc9bea1fe3-55490b87-cb1b4ec4","operationType":"compute.nodeTemplates.insert","targetLink":"https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc","targetId":"2755123117236199126","status":"DONE","user":"[email protected]","progress":100,"insertTime":"2024-03-18T22:18:49.005-07:00","startTime":"2024-03-18T22:18:49.037-07:00","endTime":"2024-03-18T22:18:49.286-07:00","selfLink":"https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/operations/operation-1710825528762-613fc9bea1fe3-55490b87-cb1b4ec4","region":"https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1"}'
body: '{"kind":"compute#operation","id":"2450955058046816700","name":"operation-1711173459145-6144d9e2e71fa-a2bdc85e-7750565b","operationType":"compute.nodeTemplates.insert","targetLink":"https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1/nodeTemplates/computenodetemplate-33a4ihmeg1u4l","targetId":"3102467589298966972","status":"DONE","user":"[email protected]","progress":100,"insertTime":"2024-03-22T22:57:39.419-07:00","startTime":"2024-03-22T22:57:39.454-07:00","endTime":"2024-03-22T22:57:39.734-07:00","selfLink":"https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1/operations/operation-1711173459145-6144d9e2e71fa-a2bdc85e-7750565b","region":"https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1"}'
headers:
Content-Type:
- application/json; charset=UTF-8
status: 200 OK
code: 200
duration: 140.878279ms
- id: 3
duration: 408.074853ms
- id: 2
request:
proto: HTTP/1.1
proto_major: 1
Expand All @@ -160,7 +99,7 @@ interactions:
headers:
Content-Type:
- application/json
url: https://compute.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc?alt=json
url: https://compute.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-33a4ihmeg1u4l?alt=json
method: GET
response:
proto: HTTP/2.0
Expand All @@ -173,18 +112,18 @@ interactions:
body: |
{
"kind": "compute#nodeTemplate",
"id": "2755123117236199126",
"creationTimestamp": "2024-03-18T22:18:49.012-07:00",
"name": "computenodetemplate-eh8yabhagpgc",
"id": "3102467589298966972",
"creationTimestamp": "2024-03-22T22:57:39.429-07:00",
"name": "computenodetemplate-33a4ihmeg1u4l",
"description": "Node template for sole tenant nodes running in us-central1, with 96vCPUs and any amount of memory on any machine type.",
"nodeAffinityLabels": {
"memory_guarantee": "false",
"cnrm-test": "true",
"managed-by-cnrm": "true"
},
"status": "READY",
"region": "https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1",
"selfLink": "https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc",
"region": "https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1",
"selfLink": "https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1/nodeTemplates/computenodetemplate-33a4ihmeg1u4l",
"nodeTypeFlexibility": {
"cpus": "96",
"memory": "any"
Expand All @@ -199,8 +138,8 @@ interactions:
- application/json; charset=UTF-8
status: 200 OK
code: 200
duration: 150.587478ms
- id: 4
duration: 301.137398ms
- id: 3
request:
proto: HTTP/1.1
proto_major: 1
Expand All @@ -216,7 +155,7 @@ interactions:
headers:
Content-Type:
- application/json
url: https://compute.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc?alt=json
url: https://compute.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-33a4ihmeg1u4l?alt=json
method: GET
response:
proto: HTTP/2.0
Expand All @@ -229,18 +168,18 @@ interactions:
body: |
{
"kind": "compute#nodeTemplate",
"id": "2755123117236199126",
"creationTimestamp": "2024-03-18T22:18:49.012-07:00",
"name": "computenodetemplate-eh8yabhagpgc",
"id": "3102467589298966972",
"creationTimestamp": "2024-03-22T22:57:39.429-07:00",
"name": "computenodetemplate-33a4ihmeg1u4l",
"description": "Node template for sole tenant nodes running in us-central1, with 96vCPUs and any amount of memory on any machine type.",
"nodeAffinityLabels": {
"memory_guarantee": "false",
"cnrm-test": "true",
"managed-by-cnrm": "true"
},
"status": "READY",
"region": "https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1",
"selfLink": "https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc",
"region": "https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1",
"selfLink": "https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1/nodeTemplates/computenodetemplate-33a4ihmeg1u4l",
"nodeTypeFlexibility": {
"cpus": "96",
"memory": "any"
Expand All @@ -255,8 +194,8 @@ interactions:
- application/json; charset=UTF-8
status: 200 OK
code: 200
duration: 151.268778ms
- id: 5
duration: 317.983635ms
- id: 4
request:
proto: HTTP/1.1
proto_major: 1
Expand All @@ -272,7 +211,7 @@ interactions:
headers:
Content-Type:
- application/json
url: https://compute.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc?alt=json
url: https://compute.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-33a4ihmeg1u4l?alt=json
method: GET
response:
proto: HTTP/2.0
Expand All @@ -285,18 +224,18 @@ interactions:
body: |
{
"kind": "compute#nodeTemplate",
"id": "2755123117236199126",
"creationTimestamp": "2024-03-18T22:18:49.012-07:00",
"name": "computenodetemplate-eh8yabhagpgc",
"id": "3102467589298966972",
"creationTimestamp": "2024-03-22T22:57:39.429-07:00",
"name": "computenodetemplate-33a4ihmeg1u4l",
"description": "Node template for sole tenant nodes running in us-central1, with 96vCPUs and any amount of memory on any machine type.",
"nodeAffinityLabels": {
"memory_guarantee": "false",
"cnrm-test": "true",
"managed-by-cnrm": "true"
"managed-by-cnrm": "true",
"memory_guarantee": "false"
},
"status": "READY",
"region": "https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1",
"selfLink": "https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc",
"region": "https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1",
"selfLink": "https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1/nodeTemplates/computenodetemplate-33a4ihmeg1u4l",
"nodeTypeFlexibility": {
"cpus": "96",
"memory": "any"
Expand All @@ -311,8 +250,8 @@ interactions:
- application/json; charset=UTF-8
status: 200 OK
code: 200
duration: 123.055182ms
- id: 6
duration: 217.899519ms
- id: 5
request:
proto: HTTP/1.1
proto_major: 1
Expand All @@ -328,7 +267,7 @@ interactions:
headers:
Content-Type:
- application/json
url: https://compute.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc?alt=json
url: https://compute.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-33a4ihmeg1u4l?alt=json
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -341,26 +280,26 @@ interactions:
body: |
{
"kind": "compute#operation",
"id": "3629097340760268500",
"name": "operation-1710825530847-613fc9c09ef32-c8cf95aa-6131eb7f",
"id": "243844507925467576",
"name": "operation-1711173463206-6144d9e6c69d7-83d25262-47f7ce48",
"operationType": "compute.nodeTemplates.delete",
"targetLink": "https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc",
"targetId": "2755123117236199126",
"targetLink": "https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1/nodeTemplates/computenodetemplate-33a4ihmeg1u4l",
"targetId": "3102467589298966972",
"status": "RUNNING",
"user": "[email protected]",
"progress": 0,
"insertTime": "2024-03-18T22:18:51.095-07:00",
"startTime": "2024-03-18T22:18:51.117-07:00",
"selfLink": "https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/operations/operation-1710825530847-613fc9c09ef32-c8cf95aa-6131eb7f",
"region": "https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1"
"insertTime": "2024-03-22T22:57:43.441-07:00",
"startTime": "2024-03-22T22:57:43.460-07:00",
"selfLink": "https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1/operations/operation-1711173463206-6144d9e6c69d7-83d25262-47f7ce48",
"region": "https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1"
}
headers:
Content-Type:
- application/json; charset=UTF-8
status: 200 OK
code: 200
duration: 402.865302ms
- id: 7
duration: 372.731313ms
- id: 6
request:
proto: HTTP/1.1
proto_major: 1
Expand All @@ -376,7 +315,7 @@ interactions:
headers:
X-Goog-Api-Client:
- gl-go/1.21.5 gdcl/0.160.0
url: https://compute.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/operations/operation-1710825530847-613fc9c09ef32-c8cf95aa-6131eb7f?alt=json&prettyPrint=false
url: https://compute.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/operations/operation-1711173463206-6144d9e6c69d7-83d25262-47f7ce48?alt=json&prettyPrint=false
method: GET
response:
proto: HTTP/2.0
Expand All @@ -386,10 +325,10 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"kind":"compute#operation","id":"3629097340760268500","name":"operation-1710825530847-613fc9c09ef32-c8cf95aa-6131eb7f","operationType":"compute.nodeTemplates.delete","targetLink":"https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/nodeTemplates/computenodetemplate-eh8yabhagpgc","targetId":"2755123117236199126","status":"DONE","user":"[email protected]","progress":100,"insertTime":"2024-03-18T22:18:51.095-07:00","startTime":"2024-03-18T22:18:51.117-07:00","endTime":"2024-03-18T22:18:51.451-07:00","selfLink":"https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1/operations/operation-1710825530847-613fc9c09ef32-c8cf95aa-6131eb7f","region":"https://www.googleapis.com/compute/beta/projects/cnrm-user/regions/us-central1"}'
body: '{"kind":"compute#operation","id":"243844507925467576","name":"operation-1711173463206-6144d9e6c69d7-83d25262-47f7ce48","operationType":"compute.nodeTemplates.delete","targetLink":"https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1/nodeTemplates/computenodetemplate-33a4ihmeg1u4l","targetId":"3102467589298966972","status":"DONE","user":"[email protected]","progress":100,"insertTime":"2024-03-22T22:57:43.441-07:00","startTime":"2024-03-22T22:57:43.460-07:00","endTime":"2024-03-22T22:57:43.787-07:00","selfLink":"https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1/operations/operation-1711173463206-6144d9e6c69d7-83d25262-47f7ce48","region":"https://www.googleapis.com/compute/beta/projects/cnrm-yuhou/regions/us-central1"}'
headers:
Content-Type:
- application/json; charset=UTF-8
status: 200 OK
code: 200
duration: 129.001311ms
duration: 150.689745ms
Loading

0 comments on commit 5f985aa

Please sign in to comment.