-
Notifications
You must be signed in to change notification settings - Fork 283
Initial CosmosDB crate #1773
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
Initial CosmosDB crate #1773
Conversation
Looking forward to taking a look at this, but it will probably be a couple of days. Don't block on my review please. |
daf6f67
to
9483c78
Compare
a49227f
to
f805580
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an expert, but LGTM
Marking this ready for final review. There are a few outstanding things I could use some assistance with:
|
Up to @kurtzeborn and @weshaggard but I don't think service teams should be language-specific e.g., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I think this looks great! Nice job! There are a few open questions, and a few minor changes I listed so far like using underscores for feature names as well. I'd love to hear feedback on that as well, but I added that to guidelines yesterday to use underscores uniformly. Personally, I hate having to guess at whether to use -
or _
and get errors 50% of the time. That's USB-A. I'm shooting for USB-C. 😉
d9b2683
to
c8b0dc7
Compare
c8b0dc7
to
884a533
Compare
* implement initial CosmosClient, DatabaseClient and "read database" API * updates after rebase * fix some warnings and test issues * rename "adhoc" sample to "connect" * add CODEOWNERS for CosmosDB * use 'cosmosdb' as example prefix * fix spacing * a few more tidy-ups * switch to a team in the cosmos CODEOWNERS * clippy and lint fixes * spelling updates * auth policy test updates * doc comment updates * switch to using Model derive macro * a couple build fixes * ok that one was my bad * fix conditional imports * omit CODEOWNERS from cspell check * use direct mentions in CODEOWNERS for now * pr feedback * fix derive macro broken during refactoring * use dictionary file and update Cosmos to "Cosmos DB"
This PR creates a new crate for the Azure Cosmos DB client in the track2 branch. It includes only a single operation, the Get Database operation which returns the "properties" of a database, primarily its ID and other "system" properties (like
_etag
,_self
,_rid
, and_ts
).There's a single sample,
cosmosdb_connect
(following the convention for prefixing examples with the service name). It can be run with the following command in the root of the repo (hence why the service name prefix is useful, example names are a "global" scope for the repo):This is a draft PR, because there are some things I intend to do before this is fully ready for review. However, there are some core elements I want to call out and get initial feedback on. I've made inline comments to point those out.
TODO
These are the things I already intend to do, so if you notice they're missing, hang tight for the next iteration ;).
CosmosClient
and friends.feature/track2
when Derive Macro fortypespec_client_core::http::Model
#1772 is merged, and replace use ofjson_model!
with the derive macro.