-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
GET Request for Maven Package maven-metadata.xml Returns 'Package Does Not Exist' after update to 1.23 #33672
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
Comments
I think it's related to #33049 There are some fallback mechanisms and some tests (try |
Yes, I tried it locally and it see that the call back is never executed because the part if errors.Is(err, util.ErrNotExist) {
pvs, err = packages_model.GetVersionsByPackageName(ctx, ctx.Package.Owner.ID, packages_model.TypeMaven, params.toInternalPackageNameLegacy())
} seems to be never called as util.ErrNotExis is not thrown. I have a fix and can open a pull request for it. |
Thank you very much! |
1.23-nightly is ready (it is a stable release and will be 1.23.5) |
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:
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
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
The text was updated successfully, but these errors were encountered: