Skip to content

CosmosDb ChangeFeed Support - #454

Merged
swapnil-nagar merged 4 commits into
v4.xfrom
swapnil/CosmosDBUpdate
Jul 14, 2026
Merged

CosmosDb ChangeFeed Support#454
swapnil-nagar merged 4 commits into
v4.xfrom
swapnil/CosmosDBUpdate

Conversation

@swapnil-nagar

Copy link
Copy Markdown
Contributor

Adds Cosmos DB Change Feed mode support and validation so changeFeedMode is surfaced in types and preserved through function registration metadata.

Changes

  • Added CosmosDBv4ChangeFeedMode type with:
    • LatestVersion
    • AllVersionsAndDeletes
  • Added changeFeedMode to Cosmos DB v4 trigger options.
  • Re-exported CosmosDBChangeFeedMode from shared Cosmos DB types.
  • Updated Cosmos DB API docs to clarify default behavior and how to enable full change feed processing.
  • Added tests for:
    • Metadata conversion path (toCoreFunctionMetadata)
    • End-to-end app registration path (app.cosmosDB)

Version

  • Bumped package version to 4.16.1.

@swapnil-nagar
swapnil-nagar requested a review from a team as a code owner June 19, 2026 06:18
@jviau

jviau commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

I am not familiar with E2E-test situation for this repo, but want to make sure the feature is validated either manually or by tests. A specific scenario to validate for is the incoming payload type when using AllVersionsAndDelete. With LatestVersion it will be T, for AVAD it will be ChangeFeedItem<T>. So the JSON representation of this CSharp class: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.changefeeditem-1?view=azure-dotnet-preview

@TsuyoshiUshio

TsuyoshiUshio commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

+1 for the Jacob's comment. Change looks good. E2E might be required.
For E2E testing with this change, If you've already done the manual E2E, I'd happy to approve. But I'm wondering if we can write E2E testing for nodejs-library/worker/extensions if one of them are changed, We can use https://github.com/Azure/azure-functions-nodejs-e2e-tests .

Comment thread package-lock.json Outdated
@swapnil-nagar

Copy link
Copy Markdown
Contributor Author

+1 for the Jacob's comment. Change looks good. E2E might be required. For E2E testing with this change, If you've already done the manual E2E, I'd happy to approve. But I'm wondering if we can write E2E testing for nodejs-library/worker/extensions if one of them are changed, We can use https://github.com/Azure/azure-functions-nodejs-e2e-tests .

Emulator do not support this. I will be creating a new sample for this feature and test locally

@swapnil-nagar

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts in commit d1b6f3b.

@jviau jviau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Curious where FullFidelity came from? Does the node CosmosDB package use that terminology?

@swapnil-nagar

Copy link
Copy Markdown
Contributor Author

Curious where FullFidelity came from? Does the node CosmosDB package use that terminology?

@jviau No, I did not like the name All Version and Delete and fullFidelity sounds next best option so changed to that. I can revert if that's the name we plan to go.

@swapnil-nagar
swapnil-nagar enabled auto-merge (squash) July 14, 2026 19:03
@swapnil-nagar
swapnil-nagar merged commit 00e0a89 into v4.x Jul 14, 2026
15 checks passed
@swapnil-nagar
swapnil-nagar deleted the swapnil/CosmosDBUpdate branch July 14, 2026 22:30
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.

4 participants