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

V14: Add cancellation tokens to all endpoints #15984

Merged
merged 8 commits into from Apr 9, 2024

Conversation

nikolajlauridsen
Copy link
Contributor

@nikolajlauridsen nikolajlauridsen commented Apr 4, 2024

Adds a CancellationToken to all endpoints, currently, this isn't used at all, but it will allow us to cancel a request in the future without breaking our API.

For the most part, this is pretty run-of-the-mill, the only really interesting part is that I had to alter the UmbracoTestServerTestBase slightly to make it work.

This is because we use the method parameters to automagically add them as query parameters, however, this is not relevant for cancellation tokens, so I remove those before resolving the query parameters.

# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/DocumentBlueprint/Item/ItemDocumentBlueprintController.cs
Copy link
Member

@elit0451 elit0451 left a comment

Choose a reason for hiding this comment

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

Looks good 💪

I just found a few more controllers without the CancellationToken cancellationToken parameter - some that were forgotten (in Item and Tree folders) and some new endpoints (like Document Version/Blueprint ones).

I will push the changes, please have a look at them and we can merge this after 🙂

@nikolajlauridsen
Copy link
Contributor Author

Looks good, and thanks for keeping an eye out for the missed controllers 🎉, turns out that sometimes you can't see the trees for the forest 🙈

@nikolajlauridsen nikolajlauridsen merged commit 187d458 into v14/dev Apr 9, 2024
15 of 16 checks passed
@nikolajlauridsen nikolajlauridsen deleted the v14/feature/inject-cancellation-tokens branch April 9, 2024 06:18
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.

None yet

4 participants