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

Skip deferred binding for CosmosDB trigger #9027

Closed
wants to merge 1 commit into from

Conversation

liliankasem
Copy link
Member

@liliankasem liliankasem commented Jan 11, 2023

Issue describing the changes in this PR

resolves #9026

With the way the cosmos db sdk is implemented it is not possible to use ParameterBindingData/DeferredBinding for cosmos DB triggers with out-of-proc workers. We need to make sure we continue to handle triggers the same way we do today, hence the skipDeferredBinding flag.

See this issue discussion for reference.

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • My changes do not require diagnostic events changes
    • Otherwise: I have added/updated all related diagnostic events and their documentation (Documentation issue linked to PR)
  • I have added all required tests (Unit tests, E2E tests)

@liliankasem liliankasem force-pushed the liliankasem/sdk-binding/optoutcosmostrigger branch from e7b0020 to a6e4d8e Compare January 11, 2023 20:02
bool containsExpression = BindingAttributeContainsExpression(bindings);

// If the trigger is a CosmosDBTrigger, we do not want to use ParameterBindingData as it is not supported
bool isCosmosTrigger = IsCosmosDBTrigger(triggerMetadata);
Copy link
Contributor

@jviau jviau Jan 11, 2023

Choose a reason for hiding this comment

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

It doesn't feel right to me to insert single extension specific logic into this core layer. Can this be pulled into a formal extensibility behavior? Can we delegate the supported decision to the BindingMetadata itself, and extenders can control it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup agree, was trying to have a quick patch in place for if we release Cosmos soon.

However, I did sync with Fabio about this today and since Cosmos is not in any rush to be released we can focus on refactoring the supportsDeferredBinding attribute for extensions and the function metadata generator on the worker to have more granular information about what bindings support deferred binding rather than the blanket "all or nothing" approach we have in place today.

As a result, I'll abandon this PR and create an issue for the refactor work that needs to happen in the worker

@liliankasem liliankasem deleted the liliankasem/sdk-binding/optoutcosmostrigger branch May 3, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make sure not to use ParameterBindingData for Cosmos DB triggers
2 participants