Description
Description
Description
After updating Gitea from version 1.22 to 1.23, we encountered an issue where newly rebuilt Maven packages maven-metadata.xml is accessible via GET request, but older packages return a 404 error package does not exist.
Steps to Reproduce
Upgrade Gitea from version 1.22 to 1.23.
Attempt to fetch an existing Maven package maven-metadata.xml using the API:
curl -X "GET" -H "Authorization: token <token>" -H "Content-Type: application/json"
http://<gitea-instance>/api/packages/{owner}/maven/com/example/project/maven-metadata.xml
Observe that older packages return a "package does not exist", while data for newly rebuilt packages is accessible (this is one way to solve it, rebuild the older package so then the name will change to the new convention).
Expected Behavior
Older Maven packages maven-metadata.xml should remain accessible via the API after upgrading Gitea.
Actual Behavior
Packages stored with the previous naming convention (groupId-artifactId) are no longer accessible. The database now stores package names in the format groupId:artifactId, and queries only resolve to this new format, ignoring existing packages using the old format.
Database Logs Analysis
Queries are resolving only to the groupId:artifactId format.
Existing packages using the groupId-artifactId format are not matched, leading to 404 errors.
Environment
Gitea version: 1.23.3
Previous version: 1.22.2
Database: PostgreSQL
OS: Linux
Deployment: Docker
Possible Fix
The source code suggests that older packages should also be resolved, but there seems to be a bug preventing this from happening.
Gitea Version
1.23.3
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
We are running Gitea self-hosted on Rancher in a Kubernetes pod with Linux.
Database
PostgreSQL