Skip to content

AzureEngine fails to parse nested (child) resource IDs in App Components #324

Description

@Barnistic

When an Azure Load Testing resource has a child resource configured as an App Component (e.g. an Azure SQL Database, which lives under a SQL Server), the engine throws a ValueInstantiationException because the resource ID has more path segments than the expected regex supports. I get this error message:

Failed to run WorkItemWorkflow: Cannot construct instance of `us.abstracta.jmeter.javadsl.azure.api.AppComponents$AppComponent`, problem: Provided resources id has not expected format. Check that it matches ^/subscriptions/([^/]+)/resourceGroups/([^/]+)/providers/([^/]+)/([^/]+)/([^/?]+)$ and if it doesn't and is still valid, please create an issue in JMeter DSL GitHub repository.
 at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 300] (through reference chain: us.abstracta.jmeter.javadsl.azure.api.AppComponents["components"]->java.util.LinkedHashMap["/subscriptions/(guid)/resourceGroups/(resourceGroupName)/providers/Microsoft.Sql/servers/orm/elasticpools/(dbName)"])
Exception in thread "main" com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot construct instance of `us.abstracta.jmeter.javadsl.azure.api.AppComponents$AppComponent`, problem: Provided resources id has not expected format. Check that it matches ^/subscriptions/([^/]+)/resourceGroups/([^/]+)/providers/([^/]+)/([^/]+)/([^/?]+)$ and if it doesn't and is still valid, please create an issue in JMeter DSL GitHub repository.
 at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 300] (through reference chain: us.abstracta.jmeter.javadsl.azure.api.AppComponents["components"]->java.util.LinkedHashMap["/subscriptions/(subscriptionGuid)/resourceGroups/(resourceGroupName)/providers/Microsoft.Sql/servers/orm/elasticpools/(dbName)])

Child resource IDs should be parsed correctly, or at minimum gracefully skipped/ignored rather than crashing the entire test run.

Version: jmeter-java-dsl-azure 2.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions