From 58b67cb400493e47513982748a606fd38cf5b6d0 Mon Sep 17 00:00:00 2001 From: wiboris Date: Fri, 6 Oct 2023 15:57:54 -0700 Subject: [PATCH 01/13] adding an enviroment variable "RECORDING_DEFAULT_ClIENT_GUID" to support using the default string format for ClientID's in test recording mode --- .../Azure.Core.TestFramework/src/ProxyTransport.cs | 13 +++++++++++-- .../src/TestEnvironment.cs | 14 ++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs index 5b7099fb27238..84a413918b21a 100644 --- a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs +++ b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs @@ -18,6 +18,7 @@ public class ProxyTransport : HttpPipelineTransport private readonly TestRecording _recording; private readonly TestProxy _proxy; private readonly bool _isWebRequestTransport; + private readonly bool _useDefaultClientIDFormat; private const string DevCertIssuer = "CN=localhost"; private const string FiddlerCertIssuer = "CN=DO_NOT_TRUST_FiddlerRoot, O=DO_NOT_TRUST, OU=Created by http://www.fiddler2.com"; @@ -34,6 +35,7 @@ public ProxyTransport(TestProxy proxy, HttpPipelineTransport transport, TestReco _filter = filter; bool useFiddler = TestEnvironment.EnableFiddler; + _useDefaultClientIDFormat = TestEnvironment.DefaultClientGuidFormatInRecording; string certIssuer = useFiddler ? FiddlerCertIssuer : DevCertIssuer; _proxyHost = useFiddler ? "ipv4.fiddler" : TestProxy.IpAddress; @@ -135,8 +137,15 @@ public override Request CreateRequest() _recording.HasRequests = true; lock (_recording.Random) { - // Make sure ClientRequestId are the same across request and response - request.ClientRequestId = _recording.Random.NewGuid().ToString("N"); + if (_useDefaultClientIDFormat) + { + // User want the client format to use the default format + request.ClientRequestId = _recording.Random.NewGuid().ToString(); + }else + { + // Make sure ClientRequestId are the same across request and response + request.ClientRequestId = _recording.Random.NewGuid().ToString("N"); + } } return request; } diff --git a/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs b/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs index 791d52a6eb23c..6bd451b2154d9 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs @@ -571,6 +571,20 @@ internal static string GetSourcePath(Assembly assembly) /// public static bool GlobalIsRunningInCI => Environment.GetEnvironmentVariable("TF_BUILD") != null; + /// + /// Determines if during test recording if we should use the default guid format for clientID. + /// + public static bool DefaultClientGuidFormatInRecording + { + get + { + string guidDefaultFormat = Environment.GetEnvironmentVariable("RECORDING_DEFAULT_ClIENT_GUID"); + + bool.TryParse(guidDefaultFormat, out bool enableDefaultGuidFormat); + + return enableDefaultGuidFormat; + } + } /// /// Determines if the current global test mode. /// From e0933d0911cbcf0faddef337cfca4788236979de Mon Sep 17 00:00:00 2001 From: wiboris Date: Fri, 6 Oct 2023 18:01:43 -0700 Subject: [PATCH 02/13] changing code to support storing the enviroment variable into the test recordings variables --- .../src/ProxyTransport.cs | 2 +- .../src/TestRecording.cs | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs index 84a413918b21a..29c56dc7c7542 100644 --- a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs +++ b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs @@ -35,7 +35,7 @@ public ProxyTransport(TestProxy proxy, HttpPipelineTransport transport, TestReco _filter = filter; bool useFiddler = TestEnvironment.EnableFiddler; - _useDefaultClientIDFormat = TestEnvironment.DefaultClientGuidFormatInRecording; + _useDefaultClientIDFormat = _recording.DefaultClientRequestIGuid; string certIssuer = useFiddler ? FiddlerCertIssuer : DevCertIssuer; _proxyHost = useFiddler ? "ipv4.fiddler" : TestProxy.IpAddress; diff --git a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs index 25aec74da98aa..3bc67a08cf1de 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs @@ -16,6 +16,7 @@ namespace Azure.Core.TestFramework public class TestRecording : IAsyncDisposable { private const string RandomSeedVariableKey = "RandomSeed"; + private const string DefaultClientGuidFormatInRecordingKey = "DefaultClientGuidFormatInRecording"; private const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; // cspell: disable-next-line private const string charsLower = "abcdefghijklmnopqrstuvwxyz0123456789"; @@ -189,6 +190,35 @@ public TestRandom Random } } + private bool _defaultClientRequestIdGuid; + + /// + /// Retrieves the value for the enviroment variable RECORDING_DEFAULT_ClIENT_GUID + /// + public bool DefaultClientRequestIGuid + { + get + { + switch (Mode) + { + case RecordedTestMode.Live: + _defaultClientRequestIdGuid = false; + break; + case RecordedTestMode.Record: + _defaultClientRequestIdGuid = TestEnvironment.DefaultClientGuidFormatInRecording; + Variables[DefaultClientGuidFormatInRecordingKey] = _defaultClientRequestIdGuid.ToString(); + break; + case RecordedTestMode.Playback: + ValidateVariables(); + _defaultClientRequestIdGuid = bool.Parse(Variables[DefaultClientGuidFormatInRecordingKey]); + break; + default: + throw new ArgumentOutOfRangeException(); + } + return _defaultClientRequestIdGuid; + } + } + /// /// The moment in time that this test is being run. /// From 3ba3d0c28d69bdc24fb46fc1a6b9a06c47ffbb86 Mon Sep 17 00:00:00 2001 From: wiboris Date: Fri, 6 Oct 2023 19:29:25 -0700 Subject: [PATCH 03/13] handling the case if the variable is not present in the recording --- sdk/core/Azure.Core.TestFramework/src/TestRecording.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs index 3bc67a08cf1de..c6defd781bf31 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs @@ -210,7 +210,14 @@ public bool DefaultClientRequestIGuid break; case RecordedTestMode.Playback: ValidateVariables(); - _defaultClientRequestIdGuid = bool.Parse(Variables[DefaultClientGuidFormatInRecordingKey]); + try + { + _defaultClientRequestIdGuid = bool.Parse(Variables[DefaultClientGuidFormatInRecordingKey]); + } + catch (System.Collections.Generic.KeyNotFoundException) + { + _defaultClientRequestIdGuid = false; + } break; default: throw new ArgumentOutOfRangeException(); From 08b35e8cf5f9111a5794b00bfcacf7e9ded6920b Mon Sep 17 00:00:00 2001 From: wiboris Date: Mon, 9 Oct 2023 12:00:37 -0700 Subject: [PATCH 04/13] changing from enviroment var to property of RecordedTestBase --- .../Azure.Compute.Batch/package-lock.json | 6 + .../HelloWorldAsync.json | 559 ++++++++++++++++++ .../src/ProxyTransport.cs | 5 +- .../src/RecordedTestBase.cs | 6 + .../src/TestEnvironment.cs | 14 - .../src/TestRecording.cs | 37 -- 6 files changed, 572 insertions(+), 55 deletions(-) create mode 100644 sdk/batch/Azure.Compute.Batch/package-lock.json create mode 100644 sdk/batch/Azure.Compute.Batch/tests/SessionRecords/EndToEndIntegrationTests/HelloWorldAsync.json diff --git a/sdk/batch/Azure.Compute.Batch/package-lock.json b/sdk/batch/Azure.Compute.Batch/package-lock.json new file mode 100644 index 0000000000000..a6c4b13a2944a --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "Azure.Compute.Batch", + "lockfileVersion": 2, + "requires": true, + "packages": {} +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/SessionRecords/EndToEndIntegrationTests/HelloWorldAsync.json b/sdk/batch/Azure.Compute.Batch/tests/SessionRecords/EndToEndIntegrationTests/HelloWorldAsync.json new file mode 100644 index 0000000000000..d3ad5e2e43e77 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/SessionRecords/EndToEndIntegrationTests/HelloWorldAsync.json @@ -0,0 +1,559 @@ +{ + "Entries": [ + { + "RequestUri": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest?api-version=2023-05-01.17.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "client-request-id": "4f720e27-8b3d-dafc-31ec-25118b31c6b7", + "return-client-request-id": "true", + "traceparent": "00-07e617534540fe3ba15dc1acee76d572-5a13068b7f7ab9a3-00", + "User-Agent": "azsdk-net-Compute.Batch/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4f720e27-8b3d-dafc-31ec-25118b31c6b7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "client-request-id": "4f720e27-8b3d-dafc-31ec-25118b31c6b7", + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Sat, 07 Oct 2023 00:56:40 GMT", + "ETag": "0x8DBC55A11E1B6F7", + "Last-Modified": "Thu, 05 Oct 2023 04:18:04 GMT", + "request-id": "a11448a3-c05f-41b4-bbb5-135ba0ecce79", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/$metadata#pools/@Element", + "id": "wiboris-pooltest", + "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest", + "eTag": "0x8DBC55A11E1B6F7", + "lastModified": "2023-10-05T04:18:04.0790775Z", + "creationTime": "2023-10-05T04:18:04.0790775Z", + "state": "active", + "stateTransitionTime": "2023-10-05T04:18:04.0790775Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-10-05T04:22:07.1174739Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 1, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "startTask": { + "commandLine": "cmd /c hostname", + "environmentSettings": [ + { + "name": "key", + "value": "value" + } + ], + "userIdentity": { + "autoUser": { + "scope": "pool", + "elevationLevel": "nonadmin" + } + }, + "maxTaskRetryCount": 0, + "waitForSuccess": true + }, + "userAccounts": [ + { + "name": "BatchTestAdmin", + "elevationLevel": "admin", + "windowsUserConfiguration": { + "loginMode": "interactive" + } + }, + { + "name": "BatchTestNonAdmin", + "elevationLevel": "nonadmin", + "windowsUserConfiguration": { + "loginMode": "interactive" + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "cloudServiceConfiguration": { + "osFamily": "4", + "osVersion": "*" + }, + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools?api-version=2023-05-01.17.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "client-request-id": "223feb9b-d38b-78ab-4775-20a6bd7bd586", + "return-client-request-id": "true", + "User-Agent": "azsdk-net-Compute.Batch/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "223feb9b-d38b-78ab-4775-20a6bd7bd586", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "client-request-id": "223feb9b-d38b-78ab-4775-20a6bd7bd586", + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Sat, 07 Oct 2023 00:56:42 GMT", + "request-id": "8c226d94-6a77-4925-91b4-90292066a490", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/$metadata#pools", + "value": [ + { + "id": "test", + "displayName": "test", + "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/test", + "eTag": "0x8DBC5C998B86682", + "lastModified": "2023-10-05T17:36:24.4377218Z", + "creationTime": "2023-09-26T20:57:25.7684846Z", + "state": "active", + "stateTransitionTime": "2023-09-26T20:57:25.7684846Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-10-05T17:38:46.7207757Z", + "vmSize": "standard_d2s_v3", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 1, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Pack" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "microsoftwindowsserver", + "offer": "windowsserver", + "sku": "2012-datacenter", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.windows amd64", + "windowsConfiguration": { + "enableAutomaticUpdates": false + }, + "nodePlacementConfiguration": { + "policy": "Regional" + } + }, + "networkConfiguration": { + "dynamicVNetAssignmentScope": "none", + "publicIPAddressConfiguration": { + "provision": "BatchManaged" + }, + "enableAcceleratedNetworking": false + }, + "targetNodeCommunicationMode": "default", + "currentNodeCommunicationMode": "classic" + }, + { + "id": "test2", + "displayName": "test2", + "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/test2", + "eTag": "0x8DBBED33DD7F7FD", + "lastModified": "2023-09-26T20:57:48.7997949Z", + "creationTime": "2023-09-26T20:57:48.7997949Z", + "state": "active", + "stateTransitionTime": "2023-09-26T20:57:48.7997949Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-09-26T20:57:49.8008093Z", + "vmSize": "standard_d2s_v3", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 0, + "targetDedicatedNodes": 0, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Pack" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "microsoftwindowsserver", + "offer": "windowsserver", + "sku": "2012-datacenter", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.windows amd64", + "windowsConfiguration": { + "enableAutomaticUpdates": false + }, + "nodePlacementConfiguration": { + "policy": "Regional" + } + }, + "networkConfiguration": { + "dynamicVNetAssignmentScope": "none", + "publicIPAddressConfiguration": { + "provision": "BatchManaged" + }, + "enableAcceleratedNetworking": false + }, + "targetNodeCommunicationMode": "default" + }, + { + "id": "wiboris-pooltest", + "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest", + "eTag": "0x8DBC55A11E1B6F7", + "lastModified": "2023-10-05T04:18:04.0790775Z", + "creationTime": "2023-10-05T04:18:04.0790775Z", + "state": "active", + "stateTransitionTime": "2023-10-05T04:18:04.0790775Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-10-05T04:22:07.1174739Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 1, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "startTask": { + "commandLine": "cmd /c hostname", + "environmentSettings": [ + { + "name": "key", + "value": "value" + } + ], + "userIdentity": { + "autoUser": { + "scope": "pool", + "elevationLevel": "nonadmin" + } + }, + "maxTaskRetryCount": 0, + "waitForSuccess": true + }, + "userAccounts": [ + { + "name": "BatchTestAdmin", + "elevationLevel": "admin", + "windowsUserConfiguration": { + "loginMode": "interactive" + } + }, + { + "name": "BatchTestNonAdmin", + "elevationLevel": "nonadmin", + "windowsUserConfiguration": { + "loginMode": "interactive" + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "cloudServiceConfiguration": { + "osFamily": "4", + "osVersion": "*" + }, + "currentNodeCommunicationMode": "classic" + } + ] + } + }, + { + "RequestUri": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest?api-version=2023-05-01.17.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "client-request-id": "df5d90ab-8e98-ac8b-8168-218c2ce80623", + "return-client-request-id": "true", + "traceparent": "00-f1b09d88e1aae2daa2a97aae4b8396a4-ecd2b71ac5366684-00", + "User-Agent": "azsdk-net-Compute.Batch/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "df5d90ab-8e98-ac8b-8168-218c2ce80623", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "client-request-id": "df5d90ab-8e98-ac8b-8168-218c2ce80623", + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Sat, 07 Oct 2023 00:56:48 GMT", + "ETag": "0x8DBC55A11E1B6F7", + "Last-Modified": "Thu, 05 Oct 2023 04:18:04 GMT", + "request-id": "bf932b37-ce5c-416d-a9b1-29fbb5f173d8", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/$metadata#pools/@Element", + "id": "wiboris-pooltest", + "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest", + "eTag": "0x8DBC55A11E1B6F7", + "lastModified": "2023-10-05T04:18:04.0790775Z", + "creationTime": "2023-10-05T04:18:04.0790775Z", + "state": "active", + "stateTransitionTime": "2023-10-05T04:18:04.0790775Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-10-05T04:22:07.1174739Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 1, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "startTask": { + "commandLine": "cmd /c hostname", + "environmentSettings": [ + { + "name": "key", + "value": "value" + } + ], + "userIdentity": { + "autoUser": { + "scope": "pool", + "elevationLevel": "nonadmin" + } + }, + "maxTaskRetryCount": 0, + "waitForSuccess": true + }, + "userAccounts": [ + { + "name": "BatchTestAdmin", + "elevationLevel": "admin", + "windowsUserConfiguration": { + "loginMode": "interactive" + } + }, + { + "name": "BatchTestNonAdmin", + "elevationLevel": "nonadmin", + "windowsUserConfiguration": { + "loginMode": "interactive" + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "cloudServiceConfiguration": { + "osFamily": "4", + "osVersion": "*" + }, + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest?api-version=2023-05-01.17.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "client-request-id": "46f8ae2a-70ca-5317-62fa-07c86a561db6", + "return-client-request-id": "true", + "traceparent": "00-b61d5ebcbd8d5cf8c4f0a2e19e047d46-6a554b3b611b3a53-00", + "User-Agent": "azsdk-net-Compute.Batch/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "46f8ae2a-70ca-5317-62fa-07c86a561db6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "client-request-id": "46f8ae2a-70ca-5317-62fa-07c86a561db6", + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Sat, 07 Oct 2023 00:56:48 GMT", + "ETag": "0x8DBC55A11E1B6F7", + "Last-Modified": "Thu, 05 Oct 2023 04:18:04 GMT", + "request-id": "f8af4b83-1cc2-48ee-993c-f94d82084209", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/$metadata#pools/@Element", + "id": "wiboris-pooltest", + "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest", + "eTag": "0x8DBC55A11E1B6F7", + "lastModified": "2023-10-05T04:18:04.0790775Z", + "creationTime": "2023-10-05T04:18:04.0790775Z", + "state": "active", + "stateTransitionTime": "2023-10-05T04:18:04.0790775Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-10-05T04:22:07.1174739Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 1, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "startTask": { + "commandLine": "cmd /c hostname", + "environmentSettings": [ + { + "name": "key", + "value": "value" + } + ], + "userIdentity": { + "autoUser": { + "scope": "pool", + "elevationLevel": "nonadmin" + } + }, + "maxTaskRetryCount": 0, + "waitForSuccess": true + }, + "userAccounts": [ + { + "name": "BatchTestAdmin", + "elevationLevel": "admin", + "windowsUserConfiguration": { + "loginMode": "interactive" + } + }, + { + "name": "BatchTestNonAdmin", + "elevationLevel": "nonadmin", + "windowsUserConfiguration": { + "loginMode": "interactive" + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "cloudServiceConfiguration": { + "osFamily": "4", + "osVersion": "*" + }, + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest/nodes?api-version=2023-05-01.17.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "client-request-id": "fa659f16-e6d4-0c1e-5f93-a022b21f4c5f", + "return-client-request-id": "true", + "User-Agent": "azsdk-net-Compute.Batch/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "fa659f16-e6d4-0c1e-5f93-a022b21f4c5f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "client-request-id": "fa659f16-e6d4-0c1e-5f93-a022b21f4c5f", + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Sat, 07 Oct 2023 00:56:48 GMT", + "request-id": "4a2f7624-12e6-4ad2-96d1-f2ef885ad4cf", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/$metadata#nodes", + "value": [ + { + "id": "tvmps_a98dfc3d7affefa7d9ac0458d71da5011e5500f330e880bca48e105cf2bd3f5d_d", + "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest/nodes/tvmps_a98dfc3d7affefa7d9ac0458d71da5011e5500f330e880bca48e105cf2bd3f5d_d", + "state": "idle", + "schedulingState": "enabled", + "stateTransitionTime": "2023-10-05T04:27:43.318679Z", + "lastBootTime": "2023-10-05T04:27:40.56919Z", + "allocationTime": "2023-10-05T04:22:06.2934633Z", + "ipAddress": "10.218.0.4", + "affinityId": "TVM:tvmps_a98dfc3d7affefa7d9ac0458d71da5011e5500f330e880bca48e105cf2bd3f5d_d", + "vmSize": "standard_d1_v2", + "totalTasksRun": 0, + "totalTasksSucceeded": 0, + "runningTasksCount": 0, + "runningTaskSlotsCount": 0, + "startTask": { + "commandLine": "cmd /c hostname", + "environmentSettings": [ + { + "name": "key", + "value": "value" + } + ], + "userIdentity": { + "autoUser": { + "scope": "pool", + "elevationLevel": "nonadmin" + } + }, + "maxTaskRetryCount": 0, + "waitForSuccess": true + }, + "startTaskInfo": { + "state": "completed", + "startTime": "2023-10-05T04:27:43.14642Z", + "endTime": "2023-10-05T04:27:43.30267Z", + "exitCode": 0, + "result": "success", + "retryCount": 0 + }, + "certificateReferences": [], + "isDedicated": true, + "endpointConfiguration": { + "inboundEndpoints": [ + { + "name": "Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput", + "protocol": "tcp", + "frontendPort": 3389, + "backendPort": 20000 + } + ] + }, + "nodeAgentInfo": { + "lastUpdateTime": "2023-10-05T04:27:40.56919Z", + "version": "1.10.9" + }, + "virtualMachineInfo": {} + } + ] + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", + "CLIENT_ID": "b0f2ffd2-8956-4a40-a711-637d38d153cf", + "RandomSeed": "1941941796", + "TENANT_ID": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} diff --git a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs index 29c56dc7c7542..efd66bde55623 100644 --- a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs +++ b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs @@ -18,8 +18,6 @@ public class ProxyTransport : HttpPipelineTransport private readonly TestRecording _recording; private readonly TestProxy _proxy; private readonly bool _isWebRequestTransport; - private readonly bool _useDefaultClientIDFormat; - private const string DevCertIssuer = "CN=localhost"; private const string FiddlerCertIssuer = "CN=DO_NOT_TRUST_FiddlerRoot, O=DO_NOT_TRUST, OU=Created by http://www.fiddler2.com"; @@ -35,7 +33,6 @@ public ProxyTransport(TestProxy proxy, HttpPipelineTransport transport, TestReco _filter = filter; bool useFiddler = TestEnvironment.EnableFiddler; - _useDefaultClientIDFormat = _recording.DefaultClientRequestIGuid; string certIssuer = useFiddler ? FiddlerCertIssuer : DevCertIssuer; _proxyHost = useFiddler ? "ipv4.fiddler" : TestProxy.IpAddress; @@ -137,7 +134,7 @@ public override Request CreateRequest() _recording.HasRequests = true; lock (_recording.Random) { - if (_useDefaultClientIDFormat) + if (_recording.UseDefaultClientIDFormat) { // User want the client format to use the default format request.ClientRequestId = _recording.Random.NewGuid().ToString(); diff --git a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs index bf9d6306c5647..c706d84029856 100644 --- a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs +++ b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs @@ -149,6 +149,12 @@ public string ReplacementHost /// public bool CompareBodies { get; set; } = true; + /// + /// Determines if during test recording if we should use the default guid format for clientID. + /// The default value is false. + /// + public bool UseDefaultClientIDFormat { get; set; } = false; + /// /// Request headers whose values can change between recording and playback without causing request matching /// to fail. The presence or absence of the header itself is still respected in matching. diff --git a/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs b/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs index 6bd451b2154d9..791d52a6eb23c 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs @@ -571,20 +571,6 @@ internal static string GetSourcePath(Assembly assembly) /// public static bool GlobalIsRunningInCI => Environment.GetEnvironmentVariable("TF_BUILD") != null; - /// - /// Determines if during test recording if we should use the default guid format for clientID. - /// - public static bool DefaultClientGuidFormatInRecording - { - get - { - string guidDefaultFormat = Environment.GetEnvironmentVariable("RECORDING_DEFAULT_ClIENT_GUID"); - - bool.TryParse(guidDefaultFormat, out bool enableDefaultGuidFormat); - - return enableDefaultGuidFormat; - } - } /// /// Determines if the current global test mode. /// diff --git a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs index c6defd781bf31..25aec74da98aa 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs @@ -16,7 +16,6 @@ namespace Azure.Core.TestFramework public class TestRecording : IAsyncDisposable { private const string RandomSeedVariableKey = "RandomSeed"; - private const string DefaultClientGuidFormatInRecordingKey = "DefaultClientGuidFormatInRecording"; private const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; // cspell: disable-next-line private const string charsLower = "abcdefghijklmnopqrstuvwxyz0123456789"; @@ -190,42 +189,6 @@ public TestRandom Random } } - private bool _defaultClientRequestIdGuid; - - /// - /// Retrieves the value for the enviroment variable RECORDING_DEFAULT_ClIENT_GUID - /// - public bool DefaultClientRequestIGuid - { - get - { - switch (Mode) - { - case RecordedTestMode.Live: - _defaultClientRequestIdGuid = false; - break; - case RecordedTestMode.Record: - _defaultClientRequestIdGuid = TestEnvironment.DefaultClientGuidFormatInRecording; - Variables[DefaultClientGuidFormatInRecordingKey] = _defaultClientRequestIdGuid.ToString(); - break; - case RecordedTestMode.Playback: - ValidateVariables(); - try - { - _defaultClientRequestIdGuid = bool.Parse(Variables[DefaultClientGuidFormatInRecordingKey]); - } - catch (System.Collections.Generic.KeyNotFoundException) - { - _defaultClientRequestIdGuid = false; - } - break; - default: - throw new ArgumentOutOfRangeException(); - } - return _defaultClientRequestIdGuid; - } - } - /// /// The moment in time that this test is being run. /// From 836a04cc8caa3bf1c60b10940c02024e9b5c2d72 Mon Sep 17 00:00:00 2001 From: wiboris Date: Mon, 9 Oct 2023 12:03:00 -0700 Subject: [PATCH 05/13] removing files --- .../Azure.Compute.Batch/package-lock.json | 6 - .../HelloWorldAsync.json | 559 ------------------ 2 files changed, 565 deletions(-) delete mode 100644 sdk/batch/Azure.Compute.Batch/package-lock.json delete mode 100644 sdk/batch/Azure.Compute.Batch/tests/SessionRecords/EndToEndIntegrationTests/HelloWorldAsync.json diff --git a/sdk/batch/Azure.Compute.Batch/package-lock.json b/sdk/batch/Azure.Compute.Batch/package-lock.json deleted file mode 100644 index a6c4b13a2944a..0000000000000 --- a/sdk/batch/Azure.Compute.Batch/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Azure.Compute.Batch", - "lockfileVersion": 2, - "requires": true, - "packages": {} -} diff --git a/sdk/batch/Azure.Compute.Batch/tests/SessionRecords/EndToEndIntegrationTests/HelloWorldAsync.json b/sdk/batch/Azure.Compute.Batch/tests/SessionRecords/EndToEndIntegrationTests/HelloWorldAsync.json deleted file mode 100644 index d3ad5e2e43e77..0000000000000 --- a/sdk/batch/Azure.Compute.Batch/tests/SessionRecords/EndToEndIntegrationTests/HelloWorldAsync.json +++ /dev/null @@ -1,559 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest?api-version=2023-05-01.17.0", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "client-request-id": "4f720e27-8b3d-dafc-31ec-25118b31c6b7", - "return-client-request-id": "true", - "traceparent": "00-07e617534540fe3ba15dc1acee76d572-5a13068b7f7ab9a3-00", - "User-Agent": "azsdk-net-Compute.Batch/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "4f720e27-8b3d-dafc-31ec-25118b31c6b7", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "client-request-id": "4f720e27-8b3d-dafc-31ec-25118b31c6b7", - "Content-Type": "application/json; odata=minimalmetadata", - "DataServiceVersion": "3.0", - "Date": "Sat, 07 Oct 2023 00:56:40 GMT", - "ETag": "0x8DBC55A11E1B6F7", - "Last-Modified": "Thu, 05 Oct 2023 04:18:04 GMT", - "request-id": "a11448a3-c05f-41b4-bbb5-135ba0ecce79", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "odata.metadata": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/$metadata#pools/@Element", - "id": "wiboris-pooltest", - "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest", - "eTag": "0x8DBC55A11E1B6F7", - "lastModified": "2023-10-05T04:18:04.0790775Z", - "creationTime": "2023-10-05T04:18:04.0790775Z", - "state": "active", - "stateTransitionTime": "2023-10-05T04:18:04.0790775Z", - "allocationState": "steady", - "allocationStateTransitionTime": "2023-10-05T04:22:07.1174739Z", - "vmSize": "standard_d1_v2", - "resizeTimeout": "PT15M", - "currentDedicatedNodes": 1, - "targetDedicatedNodes": 1, - "currentLowPriorityNodes": 0, - "targetLowPriorityNodes": 0, - "enableAutoScale": false, - "enableInterNodeCommunication": false, - "startTask": { - "commandLine": "cmd /c hostname", - "environmentSettings": [ - { - "name": "key", - "value": "value" - } - ], - "userIdentity": { - "autoUser": { - "scope": "pool", - "elevationLevel": "nonadmin" - } - }, - "maxTaskRetryCount": 0, - "waitForSuccess": true - }, - "userAccounts": [ - { - "name": "BatchTestAdmin", - "elevationLevel": "admin", - "windowsUserConfiguration": { - "loginMode": "interactive" - } - }, - { - "name": "BatchTestNonAdmin", - "elevationLevel": "nonadmin", - "windowsUserConfiguration": { - "loginMode": "interactive" - } - } - ], - "taskSlotsPerNode": 1, - "taskSchedulingPolicy": { - "nodeFillType": "Spread" - }, - "cloudServiceConfiguration": { - "osFamily": "4", - "osVersion": "*" - }, - "currentNodeCommunicationMode": "classic" - } - }, - { - "RequestUri": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools?api-version=2023-05-01.17.0", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "client-request-id": "223feb9b-d38b-78ab-4775-20a6bd7bd586", - "return-client-request-id": "true", - "User-Agent": "azsdk-net-Compute.Batch/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "223feb9b-d38b-78ab-4775-20a6bd7bd586", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "client-request-id": "223feb9b-d38b-78ab-4775-20a6bd7bd586", - "Content-Type": "application/json; odata=minimalmetadata", - "DataServiceVersion": "3.0", - "Date": "Sat, 07 Oct 2023 00:56:42 GMT", - "request-id": "8c226d94-6a77-4925-91b4-90292066a490", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "odata.metadata": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/$metadata#pools", - "value": [ - { - "id": "test", - "displayName": "test", - "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/test", - "eTag": "0x8DBC5C998B86682", - "lastModified": "2023-10-05T17:36:24.4377218Z", - "creationTime": "2023-09-26T20:57:25.7684846Z", - "state": "active", - "stateTransitionTime": "2023-09-26T20:57:25.7684846Z", - "allocationState": "steady", - "allocationStateTransitionTime": "2023-10-05T17:38:46.7207757Z", - "vmSize": "standard_d2s_v3", - "resizeTimeout": "PT15M", - "currentDedicatedNodes": 1, - "targetDedicatedNodes": 1, - "currentLowPriorityNodes": 0, - "targetLowPriorityNodes": 0, - "enableAutoScale": false, - "enableInterNodeCommunication": false, - "taskSlotsPerNode": 1, - "taskSchedulingPolicy": { - "nodeFillType": "Pack" - }, - "virtualMachineConfiguration": { - "imageReference": { - "publisher": "microsoftwindowsserver", - "offer": "windowsserver", - "sku": "2012-datacenter", - "version": "latest" - }, - "nodeAgentSKUId": "batch.node.windows amd64", - "windowsConfiguration": { - "enableAutomaticUpdates": false - }, - "nodePlacementConfiguration": { - "policy": "Regional" - } - }, - "networkConfiguration": { - "dynamicVNetAssignmentScope": "none", - "publicIPAddressConfiguration": { - "provision": "BatchManaged" - }, - "enableAcceleratedNetworking": false - }, - "targetNodeCommunicationMode": "default", - "currentNodeCommunicationMode": "classic" - }, - { - "id": "test2", - "displayName": "test2", - "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/test2", - "eTag": "0x8DBBED33DD7F7FD", - "lastModified": "2023-09-26T20:57:48.7997949Z", - "creationTime": "2023-09-26T20:57:48.7997949Z", - "state": "active", - "stateTransitionTime": "2023-09-26T20:57:48.7997949Z", - "allocationState": "steady", - "allocationStateTransitionTime": "2023-09-26T20:57:49.8008093Z", - "vmSize": "standard_d2s_v3", - "resizeTimeout": "PT15M", - "currentDedicatedNodes": 0, - "targetDedicatedNodes": 0, - "currentLowPriorityNodes": 0, - "targetLowPriorityNodes": 0, - "enableAutoScale": false, - "enableInterNodeCommunication": false, - "taskSlotsPerNode": 1, - "taskSchedulingPolicy": { - "nodeFillType": "Pack" - }, - "virtualMachineConfiguration": { - "imageReference": { - "publisher": "microsoftwindowsserver", - "offer": "windowsserver", - "sku": "2012-datacenter", - "version": "latest" - }, - "nodeAgentSKUId": "batch.node.windows amd64", - "windowsConfiguration": { - "enableAutomaticUpdates": false - }, - "nodePlacementConfiguration": { - "policy": "Regional" - } - }, - "networkConfiguration": { - "dynamicVNetAssignmentScope": "none", - "publicIPAddressConfiguration": { - "provision": "BatchManaged" - }, - "enableAcceleratedNetworking": false - }, - "targetNodeCommunicationMode": "default" - }, - { - "id": "wiboris-pooltest", - "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest", - "eTag": "0x8DBC55A11E1B6F7", - "lastModified": "2023-10-05T04:18:04.0790775Z", - "creationTime": "2023-10-05T04:18:04.0790775Z", - "state": "active", - "stateTransitionTime": "2023-10-05T04:18:04.0790775Z", - "allocationState": "steady", - "allocationStateTransitionTime": "2023-10-05T04:22:07.1174739Z", - "vmSize": "standard_d1_v2", - "resizeTimeout": "PT15M", - "currentDedicatedNodes": 1, - "targetDedicatedNodes": 1, - "currentLowPriorityNodes": 0, - "targetLowPriorityNodes": 0, - "enableAutoScale": false, - "enableInterNodeCommunication": false, - "startTask": { - "commandLine": "cmd /c hostname", - "environmentSettings": [ - { - "name": "key", - "value": "value" - } - ], - "userIdentity": { - "autoUser": { - "scope": "pool", - "elevationLevel": "nonadmin" - } - }, - "maxTaskRetryCount": 0, - "waitForSuccess": true - }, - "userAccounts": [ - { - "name": "BatchTestAdmin", - "elevationLevel": "admin", - "windowsUserConfiguration": { - "loginMode": "interactive" - } - }, - { - "name": "BatchTestNonAdmin", - "elevationLevel": "nonadmin", - "windowsUserConfiguration": { - "loginMode": "interactive" - } - } - ], - "taskSlotsPerNode": 1, - "taskSchedulingPolicy": { - "nodeFillType": "Spread" - }, - "cloudServiceConfiguration": { - "osFamily": "4", - "osVersion": "*" - }, - "currentNodeCommunicationMode": "classic" - } - ] - } - }, - { - "RequestUri": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest?api-version=2023-05-01.17.0", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "client-request-id": "df5d90ab-8e98-ac8b-8168-218c2ce80623", - "return-client-request-id": "true", - "traceparent": "00-f1b09d88e1aae2daa2a97aae4b8396a4-ecd2b71ac5366684-00", - "User-Agent": "azsdk-net-Compute.Batch/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "df5d90ab-8e98-ac8b-8168-218c2ce80623", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "client-request-id": "df5d90ab-8e98-ac8b-8168-218c2ce80623", - "Content-Type": "application/json; odata=minimalmetadata", - "DataServiceVersion": "3.0", - "Date": "Sat, 07 Oct 2023 00:56:48 GMT", - "ETag": "0x8DBC55A11E1B6F7", - "Last-Modified": "Thu, 05 Oct 2023 04:18:04 GMT", - "request-id": "bf932b37-ce5c-416d-a9b1-29fbb5f173d8", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "odata.metadata": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/$metadata#pools/@Element", - "id": "wiboris-pooltest", - "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest", - "eTag": "0x8DBC55A11E1B6F7", - "lastModified": "2023-10-05T04:18:04.0790775Z", - "creationTime": "2023-10-05T04:18:04.0790775Z", - "state": "active", - "stateTransitionTime": "2023-10-05T04:18:04.0790775Z", - "allocationState": "steady", - "allocationStateTransitionTime": "2023-10-05T04:22:07.1174739Z", - "vmSize": "standard_d1_v2", - "resizeTimeout": "PT15M", - "currentDedicatedNodes": 1, - "targetDedicatedNodes": 1, - "currentLowPriorityNodes": 0, - "targetLowPriorityNodes": 0, - "enableAutoScale": false, - "enableInterNodeCommunication": false, - "startTask": { - "commandLine": "cmd /c hostname", - "environmentSettings": [ - { - "name": "key", - "value": "value" - } - ], - "userIdentity": { - "autoUser": { - "scope": "pool", - "elevationLevel": "nonadmin" - } - }, - "maxTaskRetryCount": 0, - "waitForSuccess": true - }, - "userAccounts": [ - { - "name": "BatchTestAdmin", - "elevationLevel": "admin", - "windowsUserConfiguration": { - "loginMode": "interactive" - } - }, - { - "name": "BatchTestNonAdmin", - "elevationLevel": "nonadmin", - "windowsUserConfiguration": { - "loginMode": "interactive" - } - } - ], - "taskSlotsPerNode": 1, - "taskSchedulingPolicy": { - "nodeFillType": "Spread" - }, - "cloudServiceConfiguration": { - "osFamily": "4", - "osVersion": "*" - }, - "currentNodeCommunicationMode": "classic" - } - }, - { - "RequestUri": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest?api-version=2023-05-01.17.0", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "client-request-id": "46f8ae2a-70ca-5317-62fa-07c86a561db6", - "return-client-request-id": "true", - "traceparent": "00-b61d5ebcbd8d5cf8c4f0a2e19e047d46-6a554b3b611b3a53-00", - "User-Agent": "azsdk-net-Compute.Batch/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "46f8ae2a-70ca-5317-62fa-07c86a561db6", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "client-request-id": "46f8ae2a-70ca-5317-62fa-07c86a561db6", - "Content-Type": "application/json; odata=minimalmetadata", - "DataServiceVersion": "3.0", - "Date": "Sat, 07 Oct 2023 00:56:48 GMT", - "ETag": "0x8DBC55A11E1B6F7", - "Last-Modified": "Thu, 05 Oct 2023 04:18:04 GMT", - "request-id": "f8af4b83-1cc2-48ee-993c-f94d82084209", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "odata.metadata": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/$metadata#pools/@Element", - "id": "wiboris-pooltest", - "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest", - "eTag": "0x8DBC55A11E1B6F7", - "lastModified": "2023-10-05T04:18:04.0790775Z", - "creationTime": "2023-10-05T04:18:04.0790775Z", - "state": "active", - "stateTransitionTime": "2023-10-05T04:18:04.0790775Z", - "allocationState": "steady", - "allocationStateTransitionTime": "2023-10-05T04:22:07.1174739Z", - "vmSize": "standard_d1_v2", - "resizeTimeout": "PT15M", - "currentDedicatedNodes": 1, - "targetDedicatedNodes": 1, - "currentLowPriorityNodes": 0, - "targetLowPriorityNodes": 0, - "enableAutoScale": false, - "enableInterNodeCommunication": false, - "startTask": { - "commandLine": "cmd /c hostname", - "environmentSettings": [ - { - "name": "key", - "value": "value" - } - ], - "userIdentity": { - "autoUser": { - "scope": "pool", - "elevationLevel": "nonadmin" - } - }, - "maxTaskRetryCount": 0, - "waitForSuccess": true - }, - "userAccounts": [ - { - "name": "BatchTestAdmin", - "elevationLevel": "admin", - "windowsUserConfiguration": { - "loginMode": "interactive" - } - }, - { - "name": "BatchTestNonAdmin", - "elevationLevel": "nonadmin", - "windowsUserConfiguration": { - "loginMode": "interactive" - } - } - ], - "taskSlotsPerNode": 1, - "taskSchedulingPolicy": { - "nodeFillType": "Spread" - }, - "cloudServiceConfiguration": { - "osFamily": "4", - "osVersion": "*" - }, - "currentNodeCommunicationMode": "classic" - } - }, - { - "RequestUri": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest/nodes?api-version=2023-05-01.17.0", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "client-request-id": "fa659f16-e6d4-0c1e-5f93-a022b21f4c5f", - "return-client-request-id": "true", - "User-Agent": "azsdk-net-Compute.Batch/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "fa659f16-e6d4-0c1e-5f93-a022b21f4c5f", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "client-request-id": "fa659f16-e6d4-0c1e-5f93-a022b21f4c5f", - "Content-Type": "application/json; odata=minimalmetadata", - "DataServiceVersion": "3.0", - "Date": "Sat, 07 Oct 2023 00:56:48 GMT", - "request-id": "4a2f7624-12e6-4ad2-96d1-f2ef885ad4cf", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "odata.metadata": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/$metadata#nodes", - "value": [ - { - "id": "tvmps_a98dfc3d7affefa7d9ac0458d71da5011e5500f330e880bca48e105cf2bd3f5d_d", - "url": "https://dotnotsdkbatchaccount.eastus.batch.azure.com/pools/wiboris-pooltest/nodes/tvmps_a98dfc3d7affefa7d9ac0458d71da5011e5500f330e880bca48e105cf2bd3f5d_d", - "state": "idle", - "schedulingState": "enabled", - "stateTransitionTime": "2023-10-05T04:27:43.318679Z", - "lastBootTime": "2023-10-05T04:27:40.56919Z", - "allocationTime": "2023-10-05T04:22:06.2934633Z", - "ipAddress": "10.218.0.4", - "affinityId": "TVM:tvmps_a98dfc3d7affefa7d9ac0458d71da5011e5500f330e880bca48e105cf2bd3f5d_d", - "vmSize": "standard_d1_v2", - "totalTasksRun": 0, - "totalTasksSucceeded": 0, - "runningTasksCount": 0, - "runningTaskSlotsCount": 0, - "startTask": { - "commandLine": "cmd /c hostname", - "environmentSettings": [ - { - "name": "key", - "value": "value" - } - ], - "userIdentity": { - "autoUser": { - "scope": "pool", - "elevationLevel": "nonadmin" - } - }, - "maxTaskRetryCount": 0, - "waitForSuccess": true - }, - "startTaskInfo": { - "state": "completed", - "startTime": "2023-10-05T04:27:43.14642Z", - "endTime": "2023-10-05T04:27:43.30267Z", - "exitCode": 0, - "result": "success", - "retryCount": 0 - }, - "certificateReferences": [], - "isDedicated": true, - "endpointConfiguration": { - "inboundEndpoints": [ - { - "name": "Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput", - "protocol": "tcp", - "frontendPort": 3389, - "backendPort": 20000 - } - ] - }, - "nodeAgentInfo": { - "lastUpdateTime": "2023-10-05T04:27:40.56919Z", - "version": "1.10.9" - }, - "virtualMachineInfo": {} - } - ] - } - } - ], - "Variables": { - "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", - "CLIENT_ID": "b0f2ffd2-8956-4a40-a711-637d38d153cf", - "RandomSeed": "1941941796", - "TENANT_ID": "72f988bf-86f1-41af-91ab-2d7cd011db47" - } -} From c0a6b66390e466d69f81fc952babdf241d911e80 Mon Sep 17 00:00:00 2001 From: wiboris Date: Mon, 9 Oct 2023 12:04:24 -0700 Subject: [PATCH 06/13] whitespace fix --- sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs index efd66bde55623..4725ff77201ea 100644 --- a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs +++ b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs @@ -18,6 +18,7 @@ public class ProxyTransport : HttpPipelineTransport private readonly TestRecording _recording; private readonly TestProxy _proxy; private readonly bool _isWebRequestTransport; + private const string DevCertIssuer = "CN=localhost"; private const string FiddlerCertIssuer = "CN=DO_NOT_TRUST_FiddlerRoot, O=DO_NOT_TRUST, OU=Created by http://www.fiddler2.com"; From 73d7e5e14bed6164504c7a2c379cfb508d9f419f Mon Sep 17 00:00:00 2001 From: wiboris Date: Mon, 9 Oct 2023 12:22:27 -0700 Subject: [PATCH 07/13] update --- sdk/core/Azure.Core.TestFramework/src/TestRecording.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs index 25aec74da98aa..c8e319c278e9d 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs @@ -199,6 +199,8 @@ public TestRandom Random public string RecordingId { get; private set; } + public bool UseDefaultClientIDFormat { get { return _recordedTestBase.UseDefaultClientIDFormat; } } + /// /// Gets the moment in time that this test is being run. This is useful /// for any test recordings that capture the current time. From 6b5baea2e89ac29f12c8c5014ee120b0d5c56a64 Mon Sep 17 00:00:00 2001 From: wiboris Date: Mon, 9 Oct 2023 12:30:33 -0700 Subject: [PATCH 08/13] recovered deleted file --- .../src/RecordedTestBase.cs | 2 +- .../src/TestRecording.cs | 30 ++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs index c706d84029856..23328c8c3d29b 100644 --- a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs +++ b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs @@ -153,7 +153,7 @@ public string ReplacementHost /// Determines if during test recording if we should use the default guid format for clientID. /// The default value is false. /// - public bool UseDefaultClientIDFormat { get; set; } = false; + public bool UseDefaultClientRequestIdFormat { get; set; } = false; /// /// Request headers whose values can change between recording and playback without causing request matching diff --git a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs index c8e319c278e9d..bb138bad7ac2f 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs @@ -16,6 +16,7 @@ namespace Azure.Core.TestFramework public class TestRecording : IAsyncDisposable { private const string RandomSeedVariableKey = "RandomSeed"; + private const string DefaultClientGuidFormatInRecordingKey = "DefaultClientGuidFormatInRecording"; private const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; // cspell: disable-next-line private const string charsLower = "abcdefghijklmnopqrstuvwxyz0123456789"; @@ -199,7 +200,34 @@ public TestRandom Random public string RecordingId { get; private set; } - public bool UseDefaultClientIDFormat { get { return _recordedTestBase.UseDefaultClientIDFormat; } } + private bool _useDefaultClientRequestIdFormat; + + /// + /// Retrieves the value for the enviroment variable RECORDING_DEFAULT_ClIENT_GUID + /// + public bool UseDefaultClientRequestIdFormat + { + get + { + switch (Mode) + { + case RecordedTestMode.Live: + _useDefaultClientRequestIdFormat = false; + break; + case RecordedTestMode.Record: + _useDefaultClientRequestIdFormat = _recordedTestBase.UseDefaultClientRequestIdFormat; + Variables[DefaultClientGuidFormatInRecordingKey] = _useDefaultClientRequestIdFormat.ToString(); + break; + case RecordedTestMode.Playback: + ValidateVariables(); + _useDefaultClientRequestIdFormat = bool.Parse(Variables[DefaultClientGuidFormatInRecordingKey]); + break; + default: + throw new ArgumentOutOfRangeException(); + } + return _useDefaultClientRequestIdFormat; + } + } /// /// Gets the moment in time that this test is being run. This is useful From d6ca0fec256d8c787b85d79638447faa8748c872 Mon Sep 17 00:00:00 2001 From: wiboris Date: Mon, 9 Oct 2023 12:34:28 -0700 Subject: [PATCH 09/13] restored deleted code --- sdk/core/Azure.Core.TestFramework/src/TestRecording.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs index bb138bad7ac2f..191a18e4d2b1c 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs @@ -220,7 +220,14 @@ public bool UseDefaultClientRequestIdFormat break; case RecordedTestMode.Playback: ValidateVariables(); - _useDefaultClientRequestIdFormat = bool.Parse(Variables[DefaultClientGuidFormatInRecordingKey]); + try + { + _useDefaultClientRequestIdFormat = bool.Parse(Variables[DefaultClientGuidFormatInRecordingKey]); + } + catch (System.Collections.Generic.KeyNotFoundException) + { + _useDefaultClientRequestIdFormat = false; + } break; default: throw new ArgumentOutOfRangeException(); From 99006b96c68f2c27ac50469a711286a53f88d4d2 Mon Sep 17 00:00:00 2001 From: wiboris Date: Mon, 9 Oct 2023 12:37:34 -0700 Subject: [PATCH 10/13] fix --- sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs index 4725ff77201ea..a45944fb7b45b 100644 --- a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs +++ b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs @@ -135,7 +135,7 @@ public override Request CreateRequest() _recording.HasRequests = true; lock (_recording.Random) { - if (_recording.UseDefaultClientIDFormat) + if (_recording.UseDefaultClientRequestIdFormat) { // User want the client format to use the default format request.ClientRequestId = _recording.Random.NewGuid().ToString(); From 5a05a766beb534bf1eae5a8a4183096d71fcad84 Mon Sep 17 00:00:00 2001 From: wiboris Date: Mon, 9 Oct 2023 14:07:31 -0700 Subject: [PATCH 11/13] feedback (cherry picked from commit 240efa7ad801712117eb3624791431f92aa132d6) --- .../src/ProxyTransport.cs | 5 +-- .../src/RecordedTestBase.cs | 5 +-- .../src/TestRecording.cs | 32 +++---------------- 3 files changed, 10 insertions(+), 32 deletions(-) diff --git a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs index a45944fb7b45b..61c8abdf0f227 100644 --- a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs +++ b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs @@ -135,11 +135,12 @@ public override Request CreateRequest() _recording.HasRequests = true; lock (_recording.Random) { - if (_recording.UseDefaultClientRequestIdFormat) + if (_recording.UseDefaultGuidFormatForClientRequestId) { // User want the client format to use the default format request.ClientRequestId = _recording.Random.NewGuid().ToString(); - }else + } + else { // Make sure ClientRequestId are the same across request and response request.ClientRequestId = _recording.Random.NewGuid().ToString("N"); diff --git a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs index 23328c8c3d29b..038fe523e5c77 100644 --- a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs +++ b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs @@ -150,10 +150,11 @@ public string ReplacementHost public bool CompareBodies { get; set; } = true; /// - /// Determines if during test recording if we should use the default guid format for clientID. + /// Determines if the ClientRequestId that is sent as part of a request while in Record mode + /// should use the default Guid format. The default Guid format contains hyphens. /// The default value is false. /// - public bool UseDefaultClientRequestIdFormat { get; set; } = false; + public bool UseDefaultGuidFormatForClientRequestId { get; set; } = false; /// /// Request headers whose values can change between recording and playback without causing request matching diff --git a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs index 191a18e4d2b1c..81a8affa14652 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs @@ -200,39 +200,15 @@ public TestRandom Random public string RecordingId { get; private set; } - private bool _useDefaultClientRequestIdFormat; - /// - /// Retrieves the value for the enviroment variable RECORDING_DEFAULT_ClIENT_GUID + /// Determines if the ClientRequestId that is sent as part of a request while in Record mode + /// should use the default Guid format. The default Guid format contains hyphens. /// - public bool UseDefaultClientRequestIdFormat + public bool UseDefaultGuidFormatForClientRequestId { get { - switch (Mode) - { - case RecordedTestMode.Live: - _useDefaultClientRequestIdFormat = false; - break; - case RecordedTestMode.Record: - _useDefaultClientRequestIdFormat = _recordedTestBase.UseDefaultClientRequestIdFormat; - Variables[DefaultClientGuidFormatInRecordingKey] = _useDefaultClientRequestIdFormat.ToString(); - break; - case RecordedTestMode.Playback: - ValidateVariables(); - try - { - _useDefaultClientRequestIdFormat = bool.Parse(Variables[DefaultClientGuidFormatInRecordingKey]); - } - catch (System.Collections.Generic.KeyNotFoundException) - { - _useDefaultClientRequestIdFormat = false; - } - break; - default: - throw new ArgumentOutOfRangeException(); - } - return _useDefaultClientRequestIdFormat; + return _recordedTestBase.UseDefaultGuidFormatForClientRequestId; } } From b2e6062df74fbf456286aea9ec40b64d72798993 Mon Sep 17 00:00:00 2001 From: wiboris Date: Mon, 9 Oct 2023 14:10:39 -0700 Subject: [PATCH 12/13] removed dead code --- sdk/core/Azure.Core.TestFramework/src/TestRecording.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs index 81a8affa14652..fcb5b007d4e12 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs @@ -16,7 +16,6 @@ namespace Azure.Core.TestFramework public class TestRecording : IAsyncDisposable { private const string RandomSeedVariableKey = "RandomSeed"; - private const string DefaultClientGuidFormatInRecordingKey = "DefaultClientGuidFormatInRecording"; private const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; // cspell: disable-next-line private const string charsLower = "abcdefghijklmnopqrstuvwxyz0123456789"; From 5d1259189fcc983ac8264bc352e88b1db22e4615 Mon Sep 17 00:00:00 2001 From: wiboris Date: Mon, 9 Oct 2023 14:39:20 -0700 Subject: [PATCH 13/13] whitespace --- sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs | 2 +- sdk/core/Azure.Core.TestFramework/src/TestRecording.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs index 038fe523e5c77..7161f0b06aca3 100644 --- a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs +++ b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs @@ -150,7 +150,7 @@ public string ReplacementHost public bool CompareBodies { get; set; } = true; /// - /// Determines if the ClientRequestId that is sent as part of a request while in Record mode + /// Determines if the ClientRequestId that is sent as part of a request while in Record mode /// should use the default Guid format. The default Guid format contains hyphens. /// The default value is false. /// diff --git a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs index fcb5b007d4e12..bc36ff3936de3 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs @@ -200,7 +200,7 @@ public TestRandom Random public string RecordingId { get; private set; } /// - /// Determines if the ClientRequestId that is sent as part of a request while in Record mode + /// Determines if the ClientRequestId that is sent as part of a request while in Record mode /// should use the default Guid format. The default Guid format contains hyphens. /// public bool UseDefaultGuidFormatForClientRequestId