Giter Site home page Giter Site logo

[BUG] com.azure.resourcemanager.mysqlflexibleserver.models.Server object always returns "Enabled" for publicNetworkAccess property about azure-sdk-for-java HOT 11 OPEN

gabrielspaulino avatar gabrielspaulino commented on September 8, 2024
[BUG] com.azure.resourcemanager.mysqlflexibleserver.models.Server object always returns "Enabled" for publicNetworkAccess property

from azure-sdk-for-java.

Comments (11)

github-actions avatar github-actions commented on September 8, 2024

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

from azure-sdk-for-java.

weidongxu-microsoft avatar weidongxu-microsoft commented on September 8, 2024

Hi @gabrielspaulino

Is it possible for you to enable logging and check the JSON response of the List after disabling the public access?
https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/resourcemanager#enabling-logging

PS: if you paste it in this issue, please redact any sensitive information.

I believe SDK here is directly return what it gets from backend in this JSON.
We will need to forward it to backend, if their response is wrong.

PS: if possible, please include version of azure-resourcemanager-mysqlflexibleserver lib

from azure-sdk-for-java.

gabrielspaulino avatar gabrielspaulino commented on September 8, 2024

Hi @weidongxu-microsoft

Sorry, logging is already enabled but how can I get the JSON response?

The version of azure-resourcemanager-mysqlflexibleserver lib that I'm using is 1.0.0-beta.2

from azure-sdk-for-java.

weidongxu-microsoft avatar weidongxu-microsoft commented on September 8, 2024

One thing I found is that the Network class does not have withPublicNetworkAccess. It could be that changing "publicNetworkAccess" is not supported in api-version of the 1.0.0-beta.2 SDK in Azure MySql backend.
https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-mysqlflexibleserver_1.0.0-beta.2/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Network.java#L32-L40

If you check latest 1.0.0-beta.5 SDK, the withPublicNetworkAccess API exists.
https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-mysqlflexibleserver_1.0.0-beta.5/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Network.java#L39-L59

from azure-sdk-for-java.

weidongxu-microsoft avatar weidongxu-microsoft commented on September 8, 2024

Where logging goes depends on the logging lib you use, and the config of it.

The output should be something like below:

09:56:01.172 INFO  [parallel-10]  - {"az.sdk.message":"HTTP request","method":"GET","url":"https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/providers/Microsoft.DBforMySQL/locations/westus3/azureAsyncOperation/2ba32795-15b5-4e55-b77b-f77160081a99?api-version=2023-12-30&t=REDACTED&c=REDACTED&s=REDACTED&h=REDACTED","tryCount":1,"Date":"Mon, 26 Aug 2024 01:56:01 GMT","x-ms-client-request-id":"3a2aabae-da0c-4706-942b-9a948077b89b","Accept":"application/json","User-Agent":"azsdk-java-com.azure.resourcemanager.mysqlflexibleserver/1.0.0-beta.5 (21.0.3; Windows 11; 10.0; auto-generated)","redactedHeaders":"Authorization"}
09:56:01.734 INFO  [reactor-http-nio-1]  - {"az.sdk.message":"HTTP response","statusCode":200,"url":"https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/providers/Microsoft.DBforMySQL/locations/westus3/azureAsyncOperation/2ba32795-15b5-4e55-b77b-f77160081a99?api-version=2023-12-30&t=REDACTED&c=REDACTED&s=REDACTED&h=REDACTED","durationMs":562,"content-length":264,"content-length":264,"body":"{\"name\":\"2ba32795-15b5-4e55-b77b-f77160081a99\",\"status\":\"Failed\",\"startTime\":\"2024-08-26T01:55:00.88Z\",\"error\":{\"code\":\"InternalServerError\",\"message\":\"An unexpected error occured while processing the request. Tracking ID: 'de1cc453-a8a6-476d-bece-f96f6b1ef1e9'\"}}"}

I am having problem creating MySql resource on my test subscription (as you can see on above log), hence I cannot verify whether 1.0.0-beta.5 is good on "publicNetworkAccess" in List.

from azure-sdk-for-java.

gabrielspaulino avatar gabrielspaulino commented on September 8, 2024

I tested updating to 1.0.0-beta.5 and it is also always returning "Enabled"

from azure-sdk-for-java.

weidongxu-microsoft avatar weidongxu-microsoft commented on September 8, 2024

Do you see the log?

from azure-sdk-for-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.