diff --git a/src/spring/HISTORY.md b/src/spring/HISTORY.md index 1fafa9ab910..111889261d6 100644 --- a/src/spring/HISTORY.md +++ b/src/spring/HISTORY.md @@ -1,5 +1,11 @@ Release History =============== +1.1.11 +--- +* Add command `az spring app deployment enable-remote-debugging`. +* Add command `az spring app deployment disable-remote-debugging`. +* Add command `az spring app deployment get-remote-debugging-config`. + 1.1.10 --- * Remove `Preview` tag for user-assigned identities of apps. diff --git a/src/spring/azext_spring/_help.py b/src/spring/azext_spring/_help.py index 7b40a18c4bd..fe0c8314bee 100644 --- a/src/spring/azext_spring/_help.py +++ b/src/spring/azext_spring/_help.py @@ -216,6 +216,21 @@ short-summary: Restart instances of the app, default to production deployment. """ +helps['spring app enable-remote-debugging'] = """ + type: command + short-summary: Enable remote debugging for a deployment. +""" + +helps['spring app disable-remote-debugging'] = """ + type: command + short-summary: Disable remote debugging for a deployment. +""" + +helps['spring app get-remote-debugging-config'] = """ + type: command + short-summary: Get the remote debugging configuration of a deployment. +""" + helps['spring app deploy'] = """ type: command short-summary: Deploy source code or pre-built binary to an app and update related configurations. diff --git a/src/spring/azext_spring/_params.py b/src/spring/azext_spring/_params.py index 5eac04615e4..adb97a22cf2 100644 --- a/src/spring/azext_spring/_params.py +++ b/src/spring/azext_spring/_params.py @@ -13,7 +13,8 @@ validate_vnet, validate_vnet_required_parameters, validate_node_resource_group, validate_tracing_parameters_asc_create, validate_tracing_parameters_asc_update, validate_app_insights_parameters, validate_instance_count, validate_java_agent_parameters, - validate_ingress_timeout, validate_jar, validate_ingress_send_timeout, validate_ingress_session_max_age) + validate_ingress_timeout, validate_remote_debugging_port, validate_jar, validate_ingress_send_timeout, + validate_ingress_session_max_age) from ._validators_enterprise import (only_support_enterprise, validate_builder_resource, validate_builder_create, validate_builder_update, validate_build_pool_size, validate_git_uri, validate_acs_patterns, validate_config_file_patterns, @@ -287,6 +288,18 @@ def load_arguments(self, _): c.argument('deployment', options_list=[ '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) + for scope in ['spring app disable-remote-debugging', 'spring app get-remote-debugging-config']: + with self.argument_context(scope) as c: + c.argument('deployment', options_list=[ + '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) + + with self.argument_context('spring app enable-remote-debugging') as c: + c.argument('deployment', options_list=[ + '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) + c.argument('remote_debugging_port', options_list=['--port', '-p'], type=int, default=5005, + help='Remote debugging port, the value should be from 1024 to 65536, default value is 5005', + validator=validate_remote_debugging_port) + with self.argument_context('spring app unset-deployment') as c: c.argument('name', name_type, help='Name of app.', validator=active_deployment_exist) diff --git a/src/spring/azext_spring/_validators.py b/src/spring/azext_spring/_validators.py index e33491ed997..7de18dce789 100644 --- a/src/spring/azext_spring/_validators.py +++ b/src/spring/azext_spring/_validators.py @@ -218,6 +218,12 @@ def validate_ingress_timeout(namespace): raise InvalidArgumentValueError("Invalid value: Ingress read timeout must be in the range [1,1800].") +def validate_remote_debugging_port(namespace): + if namespace.remote_debugging_port is not None and (namespace.remote_debugging_port < 1024 or + namespace.remote_debugging_port > 65535): + raise InvalidArgumentValueError("Invalid value: remote debugging port must be in the range [1024,65535].") + + def validate_ingress_send_timeout(namespace): if namespace.ingress_send_timeout is not None and (namespace.ingress_read_timeout < 1 or namespace.ingress_read_timeout > 1800): diff --git a/src/spring/azext_spring/commands.py b/src/spring/azext_spring/commands.py index 18c8dff7c54..1b96b49de38 100644 --- a/src/spring/azext_spring/commands.py +++ b/src/spring/azext_spring/commands.py @@ -149,6 +149,9 @@ def load_command_table(self, _): g.custom_command('append-persistent-storage', 'app_append_persistent_storage') g.custom_command('append-loaded-public-certificate', 'app_append_loaded_public_certificate') g.custom_command('connect', 'app_connect') + g.custom_command('enable-remote-debugging', 'deployment_enable_remote_debugging', supports_no_wait=True) + g.custom_command('disable-remote-debugging', 'deployment_disable_remote_debugging', supports_no_wait=True) + g.custom_command('get-remote-debugging-config', 'deployment_get_remote_debugging') with self.command_group('spring app identity', custom_command_type=app_managed_identity_command, exception_handler=handle_asc_exception) as g: diff --git a/src/spring/azext_spring/custom.py b/src/spring/azext_spring/custom.py index ea5672558e8..28682f5cf3a 100644 --- a/src/spring/azext_spring/custom.py +++ b/src/spring/azext_spring/custom.py @@ -26,6 +26,7 @@ from .vendored_sdks.appplatform.v2022_01_01_preview import models as models_20220101preview from .vendored_sdks.appplatform.v2022_05_01_preview import models as models_20220501preview from .vendored_sdks.appplatform.v2020_07_01.models import _app_platform_management_client_enums as AppPlatformEnums +from .vendored_sdks.appplatform.v2022_09_01_preview import models as models_20220901preview from .vendored_sdks.appplatform.v2020_11_01_preview import ( AppPlatformManagementClient as AppPlatformManagementClient_20201101preview ) @@ -315,6 +316,23 @@ def app_stop(cmd, client, resource_group, service, name, deployment.name) +def deployment_enable_remote_debugging(cmd, client, resource_group, service, name, remote_debugging_port=None, deployment=None, no_wait=False): + logger.warning("Enable remote debugging for the app '{}', deployment '{}'".format(name, deployment.name)) + remote_debugging_payload = models_20220901preview.RemoteDebuggingPayload(port=remote_debugging_port) + return sdk_no_wait(no_wait, client.deployments.begin_enable_remote_debugging, + resource_group, service, name, deployment.name, remote_debugging_payload) + + +def deployment_disable_remote_debugging(cmd, client, resource_group, service, name, deployment=None, no_wait=False): + logger.warning("Disable remote debugging for the app '{}', deployment '{}'".format(name, deployment.name)) + return sdk_no_wait(no_wait, client.deployments.begin_disable_remote_debugging, + resource_group, service, name, deployment.name) + + +def deployment_get_remote_debugging(cmd, client, resource_group, service, name, deployment=None): + return client.deployments.get_remote_debugging_config(resource_group, service, name, deployment.name) + + def app_restart(cmd, client, resource_group, service, diff --git a/src/spring/azext_spring/tests/latest/recordings/test_remote_debugging.yaml b/src/spring/azext_spring/tests/latest/recordings/test_remote_debugging.yaml new file mode 100644 index 00000000000..2468b8feb35 --- /dev/null +++ b/src/spring/azext_spring/tests/latest/recordings/test_remote_debugging.yaml @@ -0,0 +1,1348 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview + response: + body: + string: '{"error":{"code":"NotFound","message":"App was not found","target":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","details":null}}' + headers: + cache-control: + - no-cache + content-length: + - '235' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:43:28 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","zoneRedundant":false,"version":3,"serviceId":"f7d4a4626c344bbd95266264a8882c19","networkProfile":{"outboundIPs":{"publicIPs":["20.244.73.9","20.244.73.29"]},"outboundType":"loadBalancer"},"powerState":"Running","fqdn":"cli-unittest.azuremicroservices.io"},"type":"Microsoft.AppPlatform/Spring","sku":{"name":"S0","tier":"Standard"},"location":"centralindia","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest","name":"cli-unittest","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:25:28.7260805Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:39:48.8667057Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '800' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:43:29 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: '{"properties": {"public": false, "httpsOnly": false, "temporaryDisk": {"sizeInGB": + 5, "mountPath": "/tmp"}, "enableEndToEndTLS": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + Content-Length: + - '136' + Content-Type: + - application/json + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Creating","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:30.4560313Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:30.4560313Z"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547?api-version=2022-09-01-preview + cache-control: + - no-cache + content-length: + - '884' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:43:30 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationResults/7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547/Spring/test-remote-debugging?api-version=2022-09-01-preview + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '1199' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547","name":"7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547","status":"Running","startTime":"2022-10-15T03:43:30.9301919Z"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:43:30 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547","name":"7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547","status":"Succeeded","startTime":"2022-10-15T03:43:30.9301919Z","endTime":"2022-10-15T03:43:38.783783Z"}' + headers: + cache-control: + - no-cache + content-length: + - '370' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:43:41 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Succeeded","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:30.4560313Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:30.4560313Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '987' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:43:42 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11998' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: '{"properties": {"source": {"type": "Jar", "relativePath": "", + "runtimeVersion": "Java_8"}, "deploymentSettings": {"resourceRequests": {"cpu": + "1", "memory": "1Gi"}}, "active": true}, "sku": {"name": "S0", "tier": "Standard", + "capacity": 1}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + Content-Length: + - '249' + Content-Type: + - application/json + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90},"provisioningState":"Creating","status":"Running","active":true,"instances":null,"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:46.3936757Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:46.3936757Z"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview + cache-control: + - no-cache + content-length: + - '836' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:43:47 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationResults/0ce06d04-bce5-43a6-911a-472209f91483/Spring/default?api-version=2022-09-01-preview + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '1199' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 201 + message: Created +- request: + body: '{"properties": {"public": false, "httpsOnly": false, "enableEndToEndTLS": + false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + Content-Length: + - '81' + Content-Type: + - application/json + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Updating","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:30.4560313Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:47.5343128Z"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/90f2fec1-d813-4768-a3b9-a0972d3b47e8?api-version=2022-09-01-preview + cache-control: + - no-cache + content-length: + - '986' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:43:47 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationResults/90f2fec1-d813-4768-a3b9-a0972d3b47e8/Spring/test-remote-debugging?api-version=2022-09-01-preview + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '1198' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/90f2fec1-d813-4768-a3b9-a0972d3b47e8?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/90f2fec1-d813-4768-a3b9-a0972d3b47e8","name":"90f2fec1-d813-4768-a3b9-a0972d3b47e8","status":"Running","startTime":"2022-10-15T03:43:47.9214433Z"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:43:48 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Running","startTime":"2022-10-15T03:43:47.1905897Z"}' + headers: + cache-control: + - no-cache + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:43:58 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/90f2fec1-d813-4768-a3b9-a0972d3b47e8?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/90f2fec1-d813-4768-a3b9-a0972d3b47e8","name":"90f2fec1-d813-4768-a3b9-a0972d3b47e8","status":"Succeeded","startTime":"2022-10-15T03:43:47.9214433Z","endTime":"2022-10-15T03:43:54.9306385Z"}' + headers: + cache-control: + - no-cache + content-length: + - '371' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:43:58 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Succeeded","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:30.4560313Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:47.5343128Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '987' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:43:59 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Running","startTime":"2022-10-15T03:43:47.1905897Z"}' + headers: + cache-control: + - no-cache + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:44:08 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Running","startTime":"2022-10-15T03:43:47.1905897Z"}' + headers: + cache-control: + - no-cache + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:44:18 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Running","startTime":"2022-10-15T03:43:47.1905897Z"}' + headers: + cache-control: + - no-cache + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:44:28 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Running","startTime":"2022-10-15T03:43:47.1905897Z"}' + headers: + cache-control: + - no-cache + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:44:38 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Running","startTime":"2022-10-15T03:43:47.1905897Z"}' + headers: + cache-control: + - no-cache + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:44:49 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Succeeded","startTime":"2022-10-15T03:43:47.1905897Z","endTime":"2022-10-15T03:44:50.9697693Z"}' + headers: + cache-control: + - no-cache + content-length: + - '357' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:45:00 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-68546d98fb-62gxg","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-15T03:43:54Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:46.3936757Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:46.3936757Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '1353' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:45:03 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Succeeded","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:30.4560313Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:47.5343128Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '987' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:45:07 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11998' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments?api-version=2022-09-01-preview + response: + body: + string: '{"value":[{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-68546d98fb-62gxg","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-15T03:43:54Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:46.3936757Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:46.3936757Z"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '1365' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:45:10 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11998' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app enable-remote-debugging + Connection: + - keep-alive + ParameterSetName: + - -n -g -s -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-05-01-preview + response: + body: + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-68546d98fb-62gxg","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-15T03:43:54Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:46.3936757Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:46.3936757Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '1353' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:45:15 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: '{"port": 5005}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app enable-remote-debugging + Connection: + - keep-alive + Content-Length: + - '14' + Content-Type: + - application/json + ParameterSetName: + - -n -g -s -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment/enableRemoteDebugging?api-version=2022-09-01-preview + response: + body: + string: '{"error":{"code":"InvalidArgument","message":"Only java applications + support remote debugging","target":null,"details":null}}' + headers: + cache-control: + - no-cache + content-length: + - '125' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:45:16 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 400 + message: Bad Request +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app disable-remote-debugging + Connection: + - keep-alive + ParameterSetName: + - -n -g -s -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-05-01-preview + response: + body: + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-68546d98fb-62gxg","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-15T03:43:54Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:46.3936757Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:46.3936757Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '1353' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:45:20 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app disable-remote-debugging + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g -s -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment/disableRemoteDebugging?api-version=2022-09-01-preview + response: + body: + string: '{"port":5005,"enabled":false}' + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:45:20 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app get-remote-debugging-config + Connection: + - keep-alive + ParameterSetName: + - -n -g -s -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-05-01-preview + response: + body: + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-68546d98fb-62gxg","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-15T03:43:54Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:46.3936757Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:46.3936757Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '1353' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:45:24 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app get-remote-debugging-config + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g -s -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment/getRemoteDebuggingConfig?api-version=2022-09-01-preview + response: + body: + string: '{"port":5005,"enabled":false}' + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 15 Oct 2022 03:45:29 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +version: 1 diff --git a/src/spring/azext_spring/tests/latest/test_asa_scenario.py b/src/spring/azext_spring/tests/latest/test_asa_scenario.py index bd6ab2c6834..8f169cfff38 100644 --- a/src/spring/azext_spring/tests/latest/test_asa_scenario.py +++ b/src/spring/azext_spring/tests/latest/test_asa_scenario.py @@ -231,6 +231,36 @@ def test_app_deploy_container(self): self.check('properties.source.customContainer.languageFramework', 'springboot'), ]) + +class RemoteDebuggingTest(ScenarioTest): + def test_remote_debugging(self): + py_path = os.path.abspath(os.path.dirname(__file__)) + file_path = os.path.join(py_path, 'files/test.jar').replace("\\", "/") + self.kwargs.update({ + 'app': 'test-remote-debugging', + 'serviceName': 'cli-unittest', + 'resourceGroup': 'cli', + 'location': 'centralindia', + 'deployment': 'default', + 'file': file_path + }) + + self.cmd('spring app create -s {serviceName} -g {resourceGroup} -n {app}') + + # remote debugging can only be supported for jar, here will throw exception for default banner + self.cmd( + 'spring app enable-remote-debugging -n {app} -g {resourceGroup} -s {serviceName} -d {deployment}', expect_failure=True) + + self.cmd( + 'spring app disable-remote-debugging -n {app} -g {resourceGroup} -s {serviceName} -d {deployment}') + + self.cmd( + 'spring app get-remote-debugging-config -n {app} -g {resourceGroup} -s {serviceName} -d {deployment}', + checks=[ + self.check('enabled', False) + ]) + + class AppConnectTest(ScenarioTest): def test_app_connect(self): diff --git a/src/spring/setup.py b/src/spring/setup.py index d0b7418d84e..aa89b509d53 100644 --- a/src/spring/setup.py +++ b/src/spring/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '1.1.10' +VERSION = '1.1.11' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers