Skip to content

Document Cosmos changes in 9.0 - #4812

Merged
roji merged 1 commit into
dotnet:mainfrom
roji:Cosmos
Sep 26, 2024
Merged

roji merged 1 commit into
dotnet:mainfrom
roji:Cosmos

Conversation

@roji

@roji roji commented Sep 22, 2024 •

Copy link
Copy Markdown
Member

This is a pretty huge PR which takes care of the Cosmos documentation for 9.0. There's tons of new content and reorganization of existing content - some reviewing from everyone would be appreciate to catch issues etc.

  • Added notes for the Cosmos breaking change and separated them out to a separate Cosmos section.
  • Add documentation for partition keys, pagination, vector search, FromSql, and lots of other stuff.
  • Completed the Cosmos what's new section, reorganized and cut down the existing content there; linked to the proper docs page for more details.
  • Moved querying docs out of index.md to their own "querying" page, merged the function mapping page into it.
  • Added links from function mappings to the Cosmos docs for each function.
  • Moved modeling docs out of index.md to their own "modeling" page.

Closes #4808
Part of #4805 (new function translations for Cosmos)

@roji
roji requested a review from a team September 22, 2024 11:58
@roji
roji force-pushed the Cosmos branch 3 times, most recently from 612025f to 04b50eb Compare September 22, 2024 13:43
@roji
roji force-pushed the Cosmos branch 4 times, most recently from 31269c1 to e25d9bc Compare September 22, 2024 14:08
@roji
roji marked this pull request as ready for review September 22, 2024 14:09
@SamMonoRT

Copy link
Copy Markdown
Member

@Pilchie - fyi

@Pilchie

Pilchie commented Sep 22, 2024

Copy link
Copy Markdown
Member

Also tagging @jcocchi and @kirankumarkolli here.

| [Undefined results are now automatically filtered from query results](#cosmos-undefined-filtering) | Medium |
| [Incorrectly translated queries are no longer translated](#cosmos-incorrect-translations) | Medium |
| [`HasIndex` now throws instead of being ignored](#cosmos-hasindex-throws) | Low |
| [`IncludeRootDiscriminatorInJsonId` was renamed to `HasRootDiscriminatorInJsonId` after 9.0.0-rc.2](#cosmos-IncludeRootDiscriminatorInJsonId-rename) | Low |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding #4804 as well

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, didn't notice that one... But will leave it for you :)

Comment on lines +128 to +131
At this point, if you wish, you can also update all your documents to use the new `$type` naming.

TODO: Cosmos SDK code sample for updating the documents

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

@roji roji Sep 26, 2024 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To really help people out with these two high-impact breaking changes, we should ideally include some code with the Cosmos SDK (not EF) to just rename Discriminator -> $type, and remove the discriminator from id... @AndriySvyryd is this something you're with doing, or maybe can see if someone else in the team can?

Removing the TODO for now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #4821


### Role-based access

Azure Cosmos DB for NoSQL includes a [built-in role-based access control (RBAC) system](/azure/cosmos-db/role-based-access-control). This is now supported by EF9 for both management and use of containers. No changes are required to application code. See [Issue #32197](https://github.com/dotnet/efcore/issues/32197) for more information.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Management operations with RBAC aren't supported, see other comments

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to leave this out of this PR - I didn't touch this section and am not sure I'm totally familiar with the whole thing... Do we have an issue do make RBAC-related doc changes?

@roji
roji force-pushed the Cosmos branch 2 times, most recently from 707d334 to 3b87f50 Compare September 26, 2024 12:19
Closes dotnet#4808
Part of dotnet#4805 (new function translations for Cosmos)
@roji
roji enabled auto-merge (squash) September 26, 2024 12:21
@roji
roji merged commit 4dcd006 into dotnet:main Sep 26, 2024
@roji
roji deleted the Cosmos branch September 26, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document IncludeRootDiscriminatorInJsonId breaking change

4 participants