Skip to content
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

Package: Could not validate one or more reference fields #20405

Closed
nesc1 opened this issue Jul 19, 2022 · 2 comments · Fixed by #20412
Closed

Package: Could not validate one or more reference fields #20405

nesc1 opened this issue Jul 19, 2022 · 2 comments · Fixed by #20412
Labels
Milestone

Comments

@nesc1
Copy link

nesc1 commented Jul 19, 2022

Description

Using conan package manager with gitea 1.17.0 when uploading some of the packages gitea return this error:

❯ conan upload libbacktrace -r=gitea --force --confirm --all
Uploading to remote 'gitea':
Uploading libbacktrace/cci.20210118 to remote 'gitea'
ERROR: libbacktrace/cci.20210118: Upload recipe to 'gitea' failed: {"message":"Could not validate one or more reference fields"}
. [Remote: gitea]

ERROR: Errors uploading some packages

The log on gitea side is:

2022/07/19 12:01:58 ...vices/auth/oauth2.go:37:CheckOAuthAccessToken() [T] [62d68f26] oauth2.ParseToken: unexpected signing algo: HS256
...
2022/07/19 12:01:58 models/user/user.go:996:GetUserByIDCtx() [I] [62d68f26] [SQL] SELECT ...
...
2022/07/19 12:01:58 ...s/conan/reference.go:43:NewRecipeReference() [T] [62d68f26-3] Conan Recipe: libbacktrace/cci.20210118(@_/_(#))
2022/07/19 12:01:58 ...ges/helper/helper.go:32:LogAndProcessError() [D] [62d68f26-3] Could not validate one or more reference fields
2022/07/19 12:02:00 ...ource/manager_run.go:47:Run() [T] [62d68f1e-42] Event source has no listeners
2022/07/19 12:02:00 ...ource/manager_run.go:57:Run() [T] [62d68f1e-42] Pausing the eventsource

Is there a reason to why this package failed to be uploaded to gitea? most of them are uploaded with success this one no...it seems a name check?? openssl also fails for example:

❯ conan upload openssl -r=gitea --force --confirm --all
Uploading to remote 'gitea':
Uploading openssl/1.1.1q to remote 'gitea'
Uploading openssl/3.0.5 to remote 'gitea'
Uploaded conan_export.tgz -> openssl/3.0.5 [0.24k]
Uploaded conanfile.py -> openssl/3.0.5 [32.13k]
Uploaded conanmanifest.txt -> openssl/3.0.5 [0.10k]
Uploaded conan recipe 'openssl/3.0.5' to 'gitea': http://wolfserver:3000/api/packages/nuno/conan
Uploading package 1/1: 0a969fabc5bb3a3c9bdf93aca6ce2de02eb34d3a to 'gitea'
Uploaded conan_package.tgz -> openssl/3.0.5:0a96 [19184.23k]
Uploaded conaninfo.txt -> openssl/3.0.5:0a96 [2.49k]
Uploaded conanmanifest.txt -> openssl/3.0.5:0a96 [8.34k]
ERROR: openssl/1.1.1q: Upload recipe to 'gitea' failed: {"message":"Could not validate one or more reference fields"}
. [Remote: gitea]

ERROR: Errors uploading some packages
~ ❯  

full log
https://gist.github.com/nesc1/562b1e25d6132b4f091aa009b3f011ab

Gitea Version

1.17.0+rc1-33-g780b198997

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/nesc1/562b1e25d6132b4f091aa009b3f011ab

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

dowloaded from your serves and running on a raspberry pi.

Database

MySQL

@nesc1 nesc1 added the type/bug label Jul 19, 2022
@lafriks lafriks added this to the 1.17.0 milestone Jul 19, 2022
@algernon
Copy link
Contributor

Looking at the full logs, it seems to me that both of them fail because the package version is not SemVer compatible, while the conan repository seems to require the version to be SemVer.

Other packages going through likely have a version that adheres to SemVer. I suspect that this semver restriction should be lifted.

@nesc1
Copy link
Author

nesc1 commented Jul 20, 2022

they both come from the main repository without changes... so...don't know.

zeripath pushed a commit that referenced this issue Jul 22, 2022
A lot of existing packages do not conform to SemVer, yet, they should be allowed
in the Conan package registry as-is. To achieve this, remove the SemVer check
from `NewRecipeReference`, and replace it with a simple empty string check.

A unit test with a non-semver version is also included.

Fixes #20405.

Signed-off-by: Gergely Nagy <[email protected]>
Co-authored-by: KN4CK3R <[email protected]>
6543 pushed a commit to 6543-forks/gitea that referenced this issue Jul 28, 2022
A lot of existing packages do not conform to SemVer, yet, they should be allowed
in the Conan package registry as-is. To achieve this, remove the SemVer check
from `NewRecipeReference`, and replace it with a simple empty string check.

A unit test with a non-semver version is also included.

Fixes go-gitea#20405.

Signed-off-by: Gergely Nagy <[email protected]>
Co-authored-by: KN4CK3R <[email protected]>
zeripath pushed a commit that referenced this issue Jul 28, 2022
)

Backport #20412

A lot of existing packages do not conform to SemVer, yet, they should be allowed
in the Conan package registry as-is. To achieve this, remove the SemVer check
from `NewRecipeReference`, and replace it with a simple empty string check.

A unit test with a non-semver version is also included.

Fixes #20405.

Signed-off-by: Gergely Nagy <[email protected]>
Co-authored-by: KN4CK3R <[email protected]>
Co-authored-by: Gergely Nagy <[email protected]>
vsysoev pushed a commit to IntegraSDL/gitea that referenced this issue Aug 10, 2022
A lot of existing packages do not conform to SemVer, yet, they should be allowed
in the Conan package registry as-is. To achieve this, remove the SemVer check
from `NewRecipeReference`, and replace it with a simple empty string check.

A unit test with a non-semver version is also included.

Fixes go-gitea#20405.

Signed-off-by: Gergely Nagy <[email protected]>
Co-authored-by: KN4CK3R <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants