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

[FEATURE REQ] Make Deserialize*** methods public instead of internal #25699

Closed
DBojsen opened this issue Dec 5, 2021 · 11 comments
Closed

[FEATURE REQ] Make Deserialize*** methods public instead of internal #25699

DBojsen opened this issue Dec 5, 2021 · 11 comments
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Synapse

Comments

@DBojsen
Copy link

DBojsen commented Dec 5, 2021

Library name

Azure.Analytics.Synapse.Artifacts

Please describe the feature.

Please change accessibility level of Deserialize methods such as DeserializeLinkedServiceResource & DeserializeLinkedService to public.
I find it unnecessary restricting to have these as internal methods.

I need to be able to take the json representations in my repo and deserialize to the corresponding objects - this is currently blocking me from doing so.
This is a big change from Data Factory to Synapse Pipelines, as I can easily deserialize ADF objects from json.

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 5, 2021
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Synapse labels Dec 6, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Dec 6, 2021
@jsquire
Copy link
Member

jsquire commented Dec 6, 2021

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

@DBojsen
Copy link
Author

DBojsen commented Dec 8, 2021

For now, I have cloned the repo - changed the access level of the functions I need and built it into a dll.
Will be using that instead of the nuget - but I find it unfortunate, that I need to go thru this just to be able to use this functionality

@annelo-msft
Copy link
Member

@DBojsen, Can you help me understand your application flow here? I'd like to understand why you're holding these objects as JSON in your repo. Thanks!

@DBojsen
Copy link
Author

DBojsen commented Dec 8, 2021 via email

@annelo-msft
Copy link
Member

Hi @DBojsen, thanks for this additional information! I'm looking into what precedents we have around making deserialization methods public in the Azure SDK (it isn't common practice), and working with the service team to understand this scenario better. I'll need more time to understand the options here, but I will reply to you on this issue with a plan once I have it. Thanks!

@DBojsen
Copy link
Author

DBojsen commented Dec 9, 2021 via email

@AtOMiCNebula
Copy link

@annelo-msft, see the issue I just referenced for another need for cross-library JSON deserialization. ResourceGraph SDK can be used to fetch JSON representing Azure resources, and the recommended way to use them is something like this:

ArmClient client = new(credential);
TenantCollection tenants = client.GetTenants();
await foreach (TenantResource tenant in tenants)
{
    QueryContent query = new(@"
Resources
| where type == ""microsoft.keyvault/vaults""
| order by name asc
");
    QueryResponse response = await tenant.ResourcesAsync(query);
    IList<IDictionary<string, JsonElement>> vaultDatas = response.Data.ToObjectFromJson<IList<IDictionary<string, JsonElement>>>();
}

It's super lousy to interact with IDictionary<string, JsonElement> instances though, compared to a proper type like KeyVaultData. I'm hacking around this by using a reflection-aware JsonConverter implementation (see referenced issue), but it'd be great if the Azure SDKs would just stop trying to hide their JSON serializer/deserializer methods. 😄

@annelo-msft
Copy link
Member

Hi @AtOMiCNebula -

Thanks for your inquiry! @m-nash can address questions regarding management plane libraries such as Azure.ResourceManager.KeyVault.

@m-nash
Copy link
Member

m-nash commented Jan 5, 2023

@annelo-msft I don't see any reason to have a separate answer here for management plane. Consistency across all azure sdks would be the priority. Once we have the results of your investigation from above lets make sure its compatible.

@annelo-msft annelo-msft removed their assignment Jan 5, 2023
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-net that referenced this issue Sep 18, 2023
ARG Query Generation API in 2023-09-01-preview (Azure#25699)

* Adds base for updating Microsoft.ResourceGraph from version stable/2022-10-01 to version 2023-09-01-preview

* Updates readme

* Updates API version in new specs and examples

* Updated ARG Swagger Specs by Adding Copilot Swagger.

* Updated ARG Copilot Swagger Spec with Linter Fix.

* Updated ARG Swagger Spec ReadMe with Avocado Fix.

* Updated ARG Swagger Specs to Handle Linter Issue.
Copy link

github-actions bot commented Mar 4, 2024

Hi @DBojsen, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

Copy link

github-actions bot commented Apr 3, 2024

Hi @DBojsen, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Synapse
Projects
None yet
Development

No branches or pull requests

6 participants
@jsquire @AtOMiCNebula @annelo-msft @DBojsen @m-nash and others