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

Cosmos Samples issues #12571

Closed
Melanie-Ma opened this issue Jun 28, 2020 · 8 comments
Closed

Cosmos Samples issues #12571

Melanie-Ma opened this issue Jun 28, 2020 · 8 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. cosmos:v4-item Indicates this feature will be shipped as part of V4 release train Cosmos question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@Melanie-Ma
Copy link
Contributor

Melanie-Ma commented Jun 28, 2020

Section Link:
image
Reason:
image
Suggestion:
Update the code:
CosmosAsyncClient cosmosAsyncClient = new CosmosClientBuilder().buildAsyncClient();
to:
CosmosAsyncClient cosmosAsyncClient = new CosmosClientBuilder() .endpoint(TestConfigurations.HOST) .key(TestConfigurations.MASTER_KEY) .buildAsyncClient();

@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 Jun 28, 2020
@Melanie-Ma
Copy link
Contributor Author

@jongio , for notification.

@kushagraThapar kushagraThapar self-assigned this Jun 29, 2020
@kushagraThapar
Copy link
Member

@Melanie-Ma - these are not samples - but rather just the code snippets used in documentation.
They are not designed to run, but just designed to tag in the code documentation.
For samples, please refer to : https://github.com/Azure-Samples/azure-cosmos-java-sql-api-samples

@joshfree joshfree added Client This issue points to a problem in the data-plane of the library. Cosmos cosmos:v4-item Indicates this feature will be shipped as part of V4 release train and removed customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Jun 30, 2020
@Melanie-Ma
Copy link
Contributor Author

@kushagraThapar - I agree that the code snippets are used in documentation. However, I think that the code documentation also need right example for users ′ reference. Therefore, I think the issue need to be fixed.

@kushagraThapar
Copy link
Member

@Melanie-Ma - For your #1 issue -> The reason we cannot use endpoints and keys in code snippets is because we cannot have real endpoints in the documentation.
Also, the documentation only refers to the tagged code not the overall code - see below :

image

Regarding #2 -> @moderakh - please take a look at the analytical storage issue.

@jongio
Copy link
Member

jongio commented Jul 3, 2020

Howdy - Sample code should be copy and paste-able. We aren't suggesting an actual endpoint, just code that will work if the user tries to use it.

@Melanie-Ma - Would be great to see a PR for your suggestions. For the first issue.

Can you open another issue for the second issue you found so we can track that separately?

Thanks,
Jon

@tzhanl

@jongio jongio reopened this Jul 3, 2020
@kushagraThapar
Copy link
Member

@jongio - I think the argument is incorrect here. At first place, this is not sample code, this is code snippet.
Samples are here: https://github.com/Azure-Samples/azure-cosmos-java-sql-api-samples

To treat code snippets as samples is incorrect in my opinion. Because the relative part of the code snippet that is present in the docs works correctly.

We don't want users to look at these code snippets directly through source code, but rather through documentation. I think the directory structure is making it a wrong impression, because it says samples.

@srnagar @alzimmermsft - thoughts ?

@Melanie-Ma
Copy link
Contributor Author

@jongio - I have opened another issue for the second issue. Please review.

@moderakh
Copy link
Contributor

moderakh commented Jul 6, 2020

2 is not an issue in the SDK. you need to enable the feature on the service side before attempting to use it.
@srchi is the PM who can help on enabling analytical store in the account.

openapi-sdkautomation bot referenced this issue in AzureSDKAutomation/azure-sdk-for-java Jan 25, 2021
Added examples for Microsoft.Solutions 2018-06-01 for S360 item. (#12571)

* Added examples for Microsoft.Solutions 2018-06-01 for S360 item.

* Added examples for Microsoft.Solutions 2018-06-01 for S360 item.
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
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. cosmos:v4-item Indicates this feature will be shipped as part of V4 release train Cosmos 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

5 participants