This issue has been created
There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-88fab6d0-0e72-46ad-9a6a-37feefb9bfe1 XWIKI-25792 Open

Importing a project in the repository may create a duplicate project page instead of updating the existing one

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-669b999a-323f-45bf-9e85-6650223a23d6 Thomas Mortagne created this issue on 17/Nov/26 21:33
 
Summary: Importing a project in the repository may create a duplicate project page instead of updating the existing one
Issue Type: cid:jira-generated-image-avatar-88fab6d0-0e72-46ad-9a6a-37feefb9bfe1 Bug
Affects Versions: 18.4.2, 18.6.0-rc-1
Assignee: Unassigned
Components: Repository
Created: 17/Nov/26 21:33
Priority: cid:jira-generated-image-static-major-ed9c7b73-48bc-439a-a1fa-c38cc21afd1f Major
Reporter: Thomas Mortagne
Description:

Importing a project in the repository (the "Update project" button of a project page, or ExtensionCode.ImportProject) sometimes does not update the existing project page: it creates a new project page named after the project (e.g. Extension/OAuth2 and OpenID Connect, then Extension/OAuth2 and OpenID Connect 1 on the next try) with a copy of every version page.

It happens on extensions.xwiki.org with org.xwiki.contrib.oidc:oidc: it works most of the time, but once it starts failing on a cluster member it keeps failing there.

Cause

ExtensionStore caches the result of the lookup of the page holding an extension or project id, but the cache key is only the id:

  • a lookup of the id as an extension (ExtensionCode.ExtensionClass), for example through the /repository/extensions/<id> REST endpoints or getVersionObject, caches "not found" for a project id, and the following project lookup (ExtensionCode.ProjectClass) gets that cached miss, so the import creates a new page
  • the cache is only cleared when the id property of an ExtensionCode.ExtensionClass object changes, so creating or updating a project page does not clear the stale entry
  • the key does not include the wiki either, while the lookup query only searches the current wiki
 
 

1 update

 
cid:jira-generated-image-avatar-669b999a-323f-45bf-9e85-6650223a23d6 Changes by Thomas Mortagne on 17/Nov/26 21:33
 
Assignee: Thomas Mortagne