Skip to content

docs(lock): clarify ILockManager API documentation - #59984

Merged
artonge merged 3 commits into
masterfrom
jtr/docs-lock-ILockManager-API
Jun 11, 2026
Merged

docs(lock): clarify ILockManager API documentation#59984
artonge merged 3 commits into
masterfrom
jtr/docs-lock-ILockManager-API

Conversation

@joshtrichards

Copy link
Copy Markdown
Member

Summary

Improve the ILockManager documentation and also fix a presumed bug in the underlying registerLockProvider() implementation.

Changes

  • improve the interface-level description for ILockManager
  • document registerLazyLockProvider() throwing PreConditionNotMetException when a provider is already registered
  • document runInScope() throwing PreConditionNotMetException when a scope is already active
  • fix getLockInScope() docs to reflect that it returns null when no scope is active instead of throwing
  • clarify that isLockProviderAvailable() checks current availability and may attempt lazy provider resolution
  • Implementation fix: align registerLockProvider() behavior with the documented single-provider registration contract by also rejecting previously registered lazy providers

Notes

This change is intended to improve API clarity and keep the public interface documentation in sync with the implementation. No functional behavior changes are intended beyond the consistency fix in registerLockProvider().

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Josh <josh.t.richards@gmail.com>
LockManager::registerLazyLockProvider() checks for both eager and lazy, but the older registerLockProvider() did not.
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichardsjoshtrichards added this to the Nextcloud 34 milestone Apr 28, 2026
@joshtrichardsjoshtrichards changed the title Jtr/docs lock i lock manager apidocs(lock): clarify ILockManager API documentationApr 28, 2026
@joshtrichardsjoshtrichards added the 3. to review Waiting for reviews label Apr 28, 2026
@joshtrichards
joshtrichards marked this pull request as ready for review April 28, 2026 17:21
@joshtrichards
joshtrichards requested a review from a team as a code ownerApril 28, 2026 17:21
@joshtrichards
joshtrichards requested review from CarlSchwan, juliusknorr, leftybournes, provokateurin and salmart-dev and removed request for a teamApril 28, 2026 17:21
@provokateurin
provokateurin enabled auto-merge May 5, 2026 08:22
@nextcloud-botnextcloud-bot mentioned this pull request May 27, 2026
@nextcloud-botnextcloud-bot mentioned this pull request Jun 4, 2026
This was referenced Jun 5, 2026
@susnuxsusnux added the community pull requests from community label Jun 9, 2026
@artonge
artonge disabled auto-merge June 11, 2026 08:26
@artonge
artonge merged commit 5e4abd7 into masterJun 11, 2026
253 of 275 checks passed
@artonge
artonge deleted the jtr/docs-lock-ILockManager-API branch June 11, 2026 08:26
@nextcloud-botnextcloud-bot mentioned this pull request Aug 11, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugcommunitypull requests from communitydeveloper experiencefeature: locking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@joshtrichards@CarlSchwan@provokateurin@susnux@artonge@nextcloud-bot