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

API returns different result than what's show in the SDK. #6603

Closed
SebRosander opened this issue Jan 5, 2020 · 11 comments
Closed

API returns different result than what's show in the SDK. #6603

SebRosander opened this issue Jan 5, 2020 · 11 comments
Assignees
Labels
Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@SebRosander
Copy link

Bug Report

  • import path of package in question:
    "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb"

  • SDK version:
    v36.3.0

  • output of go version:
    go version go1.13.5 darwin/amd64

  • What happened?
    The API returns "none" instead of "None"" as show in the SDK.

  • What did you expect or want to happen?
    Expected a return of "None" not "none".

  • How can we reproduce it?

https://github.com/SebRosander/terraform-provider-azurerm/blob/cosmosdb_gremlin_graph/azurerm/internal/services/cosmos/resource_arm_cosmosdb_gremlin_graph.go

Just run the test for the code. Found here:
https://github.com/SebRosander/terraform-provider-azurerm/blob/cosmosdb_gremlin_graph/azurerm/internal/services/cosmos/tests/resource_arm_cosmosdb_gremlin_graph_test.go

@ArcturusZhang ArcturusZhang added Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. Service Attention Workflow: This issue is responsible by Azure service team. labels Jan 6, 2020
@triage-new-issues triage-new-issues bot removed the triage label Jan 6, 2020
@ghost
Copy link

ghost commented Jan 6, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @kushagraThapar @srinathnarayanan @southpolesteve @shurd

1 similar comment
@ghost
Copy link

ghost commented Jan 6, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @kushagraThapar @srinathnarayanan @southpolesteve @shurd

@ArcturusZhang
Copy link
Member

Hi @SebRosander thanks for this issue.
I have tagged this issue so that the corresponding service team member will see.

@shurd
Copy link

shurd commented Jan 7, 2020

Hi @SebRosander thank you for opening this issue. We are still investigating the capitalization discrepancy. It looks like our service returns the indexing mode with the first letter capitalized and at some point it gets converted to lower-case. I will update once we decide how to proceed.

@shurd shurd self-assigned this Jan 7, 2020
@rnagpal
Copy link

rnagpal commented Jul 17, 2020

@shurd : Do you have any updated ETA for this?

@MehaKaushik
Copy link

Hey @SebRosander @rnagpal Apologies for the delay from our side. We are still investigating the issue. It looks like somewhere in the go sdk the capitalization is not being respected, we are working towards getting this triaged.

@SebRosander
Copy link
Author

No stress for me personally, I've have a workaround in place. Please just let me know when it's fixed and I'll be able to remove that workaround. Thanks for keeping us updated @MehaKaushik

@MehaKaushik
Copy link

Thanks for your understanding @SebRosander. To provide with you an update: We have reached out to the team which generates this sdk (from the specs specified azure-rest-api-specs) to look into what is causing this behavior. I will update once I have any more leads.

@MehaKaushik
Copy link

We have root caused the issue, a change at service end is needed. We plan to do so in the coming months. I dont have a fixed timeline yet, once I have it I will update here.

@MehaKaushik
Copy link

Hey @SebRosander looks like our Service is coded to have Indexingmode to start with small. To remain consistent with our data plane sdks, we will not change the behavior of the Service, instead we will fix the Swagger. Strictly speaking, we made a mistake while documenting the swagger. Since this will be a breaking change,we will make this change in the next stable apiVersion. To track this issue at one place, I will close this issue. Please track it here Azure/azure-rest-api-specs#11222

In my opinion, as long as you don't update your SDK you would have to use the work around you are using right now, we don't want to break any existing behaviors, hence the fix would be in the next stable apiVersion. Please feel free to ask any follow-ups you might have.

@MehaKaushik
Copy link

Just to update the fix will be released as a part of our upcoming apiVersion 2020-01-15

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

5 participants