Skip to content

Conversation

@kjac
Copy link
Contributor

@kjac kjac commented Jul 21, 2025

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes #18588

Description

The linked issue describes a concurrency issue during boot time.

This is ultimately triggered by UmbracoApplicationStartingNotification somehow being fired twice, which should not be possible but clearly it happens.

I have not been able to reproduce it, so this PR adds defensive coding around the notification handler to guard against concurrent updates.

Testing this PR

  1. Umbraco should boot as per usual 👍
  2. It should still be possible to configure member auth for the Delivery API.
    • Test different configurations and verify that the umbracoOpenIddictApplications table is updated accordingly at boot time.

@kjac
Copy link
Contributor Author

kjac commented Jul 21, 2025

Note: This needs to be cherry-picked to V16 👍

Copy link
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

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

Code looks good to me to ensure that this can only run once, and stepping through/examining the database records indicates it functions as before.

@AndyButland AndyButland merged commit 67abecc into v13/dev Jul 21, 2025
19 of 20 checks passed
@AndyButland AndyButland deleted the v13/improvement/defensive-updates-for-member-application branch July 21, 2025 10:24
kjac added a commit that referenced this pull request Jul 21, 2025
* Add defensive coding to the member application initializer (#19760)

* Moved _isInitialized to after the initialization

---------

Co-authored-by: kjac <[email protected]>
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.

3 participants