Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Web Test creation fails because of Azure locations #44260

Closed
BastienPerdriau opened this issue May 27, 2024 · 7 comments
Closed

[BUG] Web Test creation fails because of Azure locations #44260

BastienPerdriau opened this issue May 27, 2024 · 7 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed The Azure SDK team member assisting with this issue believes it to be addressed and ready to close. Mgmt This issue is related to a management-plane library. Monitor - ApplicationInsights Application Insights question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@BastienPerdriau
Copy link

Library name and version

Azure.ResourceManager.ApplicationInsights 1.0.0

Describe the bug

When creating a web test related to an App Insights component, it fails because of the Azure location.
My 2 cents: It uses a list of WebTestGeolocation with a Location property of type AzureLocation struct.

However, I created WebTest before using GenericResource and when setting locations for WebTest, it used location under format emea-fr-pra-edge (here for France Central).

Expected behavior

Web Test creation works, using desired locations.

Actual behavior

Message: 

Azure.RequestFailedException : Value cannot be null.
Parameter name: 'properties.Locations[0].Id' - 'northeurope' is not a supported location
Status: 400 (Bad Request)
ErrorCode: BadRequest

Content:

{
  "error": {
    "code": "BadRequest",
    "message": "Value cannot be null.\r\nParameter name: 'properties.Locations[0].Id' - 'northeurope' is not a supported location",
    "innererror": {
      "trace": [
        "System.ArgumentNullException"
      ]
    }
  }
}

Headers:

Cache-Control: no-cache
Pragma: no-cache
Request-Context: REDACTED
Access-Control-Expose-Headers: REDACTED
Strict-Transport-Security: REDACTED
X-Content-Type-Options: REDACTED
X-Powered-By: REDACTED
x-ms-ratelimit-remaining-subscription-writes: REDACTED
x-ms-request-id: 474e4b63-dfcf-4bb5-b9d6-42be499ce457
x-ms-correlation-request-id: REDACTED
x-ms-routing-request-id: REDACTED
X-Cache: REDACTED
X-MSEdge-Ref: REDACTED
Date: Mon, 27 May 2024 14:06:08 GMT
Content-Length: 278
Content-Type: application/json; charset=utf-8
Expires: -1

Reproduction Steps

await resourceGroup.GetApplicationInsightsWebTests().CreateOrUpdateAsync(
    WaitUntil.Completed,
    "mywebtestname",
    new ApplicationInsightsWebTestData(appInsights.Data.Location)
    {
        WebTestName = "mywebtestname",
        SyntheticMonitorId = "mywebtestname",
        IsEnabled = true,
        FrequencyInSeconds = 300,
        TimeoutInSeconds = 120,
        Kind = WebTestKind.Standard,
        IsRetryEnabled = true,
        Request = new WebTestRequest
        {
            RequestUri = new Uri("https://myuri/api/alive"),
            HttpVerb = "get",
            ParseDependentRequests = false
        },
        Locations =
        {
            new WebTestGeolocation { Location = AzureLocation.FranceCentral },
            new WebTestGeolocation { Location = AzureLocation.NorthEurope },
            new WebTestGeolocation { Location = AzureLocation.WestEurope },
            new WebTestGeolocation { Location = AzureLocation.UKSouth },
            new WebTestGeolocation { Location = AzureLocation.WestUS },
        },
        ValidationRules = new WebTestValidationRules
        {
            ExpectedHttpStatusCode = 200,
            CheckSsl = true,
            SslCertRemainingLifetimeCheck = 7
        },
        Tags =
        {
            { $"hidden-link:{appInsights.Id}", "Resource" }
        }
    },
    cancellationToken: cancellationToken);

Environment

dotnet --info
.NET SDK:
Version: 8.0.200
Commit: 438cab6a9d
Workload version: 8.0.200-manifests.e575128c

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.200\

IDE and version : Version 17.9.0

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 27, 2024
@jsquire jsquire added Mgmt This issue is related to a management-plane library. needs-team-attention This issue needs attention from Azure service team or SDK team Monitor - ApplicationInsights Application Insights and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels May 28, 2024
@jsquire
Copy link
Member

jsquire commented May 28, 2024

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@HarveyLink
Copy link
Member

Hi @BastienPerdriau , thank you for using Azure SDK for .Net.
Based on your descriptions, if other locations works for Web Test, leave only NorthEurope which throws a error. Then it looks like a service issue. Maybe the service self doesn't support such location, you could open an Azure support request for further help.

@HarveyLink HarveyLink added the issue-addressed The Azure SDK team member assisting with this issue believes it to be addressed and ready to close. label Jun 17, 2024
Copy link

Hi @BastienPerdriau. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

@github-actions github-actions bot removed the needs-team-attention This issue needs attention from Azure service team or SDK team label Jun 17, 2024
@BastienPerdriau
Copy link
Author

Hi @HarveyLink .

Sorry, my post wasn't clear enough, it doesn't work with any value.
The AzureLocation struct returns a string with "simplified" value (see the class here).

Or based on my previous experience, the service expects a string with the format emea-fr-pra-edge, which doesn't match.
So I think that it shouldn't accept AzureLocation type as parameter but something else, with expected string value.

Have a good day.

@HarveyLink
Copy link
Member

Hi @HarveyLink .

Sorry, my post wasn't clear enough, it doesn't work with any value. The AzureLocation struct returns a string with "simplified" value (see the class here).

Or based on my previous experience, the service expects a string with the format emea-fr-pra-edge, which doesn't match. So I think that it shouldn't accept AzureLocation type as parameter but something else, with expected string value.

Have a good day.

In that case, you could use it like new AzureLocation("us-fl-mia-edge") as a workaround.

Copy link

Hi @BastienPerdriau, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.

@BastienPerdriau
Copy link
Author

Hi @HarveyLink,

Sorry for the delayed answer. I confirm that the workaround works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed The Azure SDK team member assisting with this issue believes it to be addressed and ready to close. Mgmt This issue is related to a management-plane library. Monitor - ApplicationInsights Application Insights question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants