Skip to content

Check for cancellation after triggering function#852

Merged
ealsur merged 2 commits intoAzure:devfrom
MikeNicholls:cosmos-check-cancellation
Aug 22, 2023
Merged

Check for cancellation after triggering function#852
ealsur merged 2 commits intoAzure:devfrom
MikeNicholls:cosmos-check-cancellation

Conversation

@MikeNicholls
Copy link
Copy Markdown
Contributor

Fixes #851 by throwing an exception if cancellation is requested, preventing automatic checkpointing from occurring.

Comment thread src/WebJobs.Extensions.CosmosDB/Trigger/CosmosDBTriggerListener.cs
Copy link
Copy Markdown
Member

@ealsur ealsur left a comment

Choose a reason for hiding this comment

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

Please add tests for the scenario if possible

@MikeNicholls
Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="Smudge"

@MikeNicholls
Copy link
Copy Markdown
Contributor Author

@ealsur I've added an end-to-end test which covers this scenario.

@MikeNicholls MikeNicholls requested a review from ealsur August 17, 2023 08:40
@ealsur
Copy link
Copy Markdown
Member

ealsur commented Aug 22, 2023

@brettsam Do you know how can we get the CI tests to run for external contributors that have no write permissions?

@ealsur
Copy link
Copy Markdown
Member

ealsur commented Aug 22, 2023

CI in this repo is not working for external forks, we'll try to test the fork manually

@ealsur
Copy link
Copy Markdown
Member

ealsur commented Aug 22, 2023

Manually running the test in the fork passes:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cosmos DB triggered function advances checkpoint after cancellation

3 participants