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

Add support for CosmosDB triggers in Functions #7248

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Conversation

captainsafia
Copy link
Member

Description

Adds support for CosmosDB-based triggers to Azure Functions. Tested with the following:

  • Entra ID-based CosmosDB connection
  • Access key-based CosmosDB connection

Ran into issues testing with classic emulator on Windows but putting this out in the meanwhile. Marked CosmosDB as an unstable emulator since it's long startup times seem to be timing out the E2E tests locally.

The preview emulator doesn't yet support the change feed feature that the CosmosDB trigger takes a dependency on.

Contributes to #7087

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@davidfowl
Copy link
Member

What are the follow up changes?

Copy link
Member

@davidfowl davidfowl left a comment

Choose a reason for hiding this comment

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

LGTM

@captainsafia
Copy link
Member Author

What are the follow up changes?

  • Figure out what the deal is with the classic emulator. I have a suspicion that the issues I ran into are more so related some Functions issues in VS preview than the actual emulator.
  • Figure out when change feed support will be added to the preview emulator and validate the E2E with it then.

@davidfowl
Copy link
Member

OK no code changes per se but experience problems with the emulator.

@captainsafia
Copy link
Member Author

OK no code changes per se but experience problems with the emulator.

Yep -- I don't expect there to be any code changes.

@captainsafia captainsafia merged commit af28155 into main Jan 27, 2025
9 checks passed
@captainsafia captainsafia deleted the safia/cosmosdb-func branch January 27, 2025 18:05
@eerhardt
Copy link
Member

Are there tests we can write for this functionality?

@captainsafia
Copy link
Member Author

Are there tests we can write for this functionality?

Yes, we can build on the AzureFunctionsTest that we include in the project-specific tests. The tests are super flaky for me locally so I wanted to include this without introducing issues into the CI build.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 27, 2025
@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Mar 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants