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

ERROR: There are no artifacts ... #110

Closed
h-2 opened this issue Jan 12, 2024 · 4 comments
Closed

ERROR: There are no artifacts ... #110

h-2 opened this issue Jan 12, 2024 · 4 comments
Assignees

Comments

@h-2
Copy link

h-2 commented Jan 12, 2024

I am experimenting with these commands, but build-info always fails for me:

% conan art:build-info create install_log.json mybuildname_release 1 ARTIFACTORY --with-dependencies  --url ARTIFACTORY_URL -vv            
ERROR: There are no artifacts for the openssl/3.1.2#ec69d7153001734ad8772d6689d84ac6 recipe. Probably the package was not uploaded before creating the Build Info.Please upload the package to the server and try again.

The respective part of install_log.json reads:

            "11": {
                "ref": "openssl/3.1.2#ec69d7153001734ad8772d6689d84ac6",
                "id": "11",
                "recipe": "Downloaded",
                "package_id": "8c90e1d6069bb1e38287dda3adc2164a219fc8ae",
                "prev": "0e7f358e9d3b86deb9b942d6eb87997a",
                "rrev": "ec69d7153001734ad8772d6689d84ac6",
                "rrev_timestamp": 1704471030.13,
                "prev_timestamp": 1704471030.82,
                "remote": "ARTIFACTORY",
                "binary_remote": "ARTIFACTORY",
                "build_id": null,
                "binary": "Download",
                "invalid_build": false,
                "info_invalid": null,
                "name": "openssl",
                "user": null,
                "channel": null,

So, clearly, it downloaded the openssl artifact with the respective hash from the artifactory.

The artifactory WebUI also shows:
image

What am I doing wrong?

@czoido
Copy link
Contributor

czoido commented Jan 15, 2024

Hi @h-2,

Thanks for your question. We have just merged this: #107 that will probably fix the issue, the problem is that the command used to try to find the sources for the packages and fail otherwise, but now we have relaxed the conditions so you can generate the build info withouth the package sources artifact. (If for some reason you want to force that the sources artifact is always there you can force downloading sources for every package using the tools.build:download_source configuration in Conan)

Please try and ping us back if you have any problem.

@czoido czoido self-assigned this Jan 15, 2024
@h-2
Copy link
Author

h-2 commented Jan 16, 2024

Please try and ping us back if you have any problem.

Thanks, this step passes now:

conan art:build-info create install_log.json mybuildname_release 1 ARTIFACTORY --with-dependencies  --url https://example.com > test.json

Then I get:

% conan art:build-info upload test.json --url https://example.com --user USER --password PWD
ERROR: 404 page not found

% conan art:build-info upload test.json --url https://example.com/artifactory --user USER --password PWD
ERROR: 400: This REST API is available only in Artifactory Pro (see: jfrog.com/artifactory/features). If you are already running Artifactory Pro please make sure your server is activated with a valid license key.

So this only works with a pro account?

Just to be sure, do I need this at all? I only want the artifactory to show a few more details about my packages (see also my comment here #100 (comment) ).

@czoido
Copy link
Contributor

czoido commented Jan 16, 2024

Hi @h-2,

Yes, in order to take advantage of the BuildInfo you need the PRO version, because the feature needs setting properties to artifacts and use other features of the API and that's not available in the artifactory-cpp.
What you can do is getting properties from artifacts in the repo and Artifactory will automatically set some properties for the conaninfo.txt file that is stored beside your package artifact, so that may be do the job. You can check the properties in the Artifactory UI or you can get them via API (the get API is available in the Art cpp version). For example, if you have abseil in your conan-local repo:

$ curl -u admin:password -X GET "http://localhost:8081/artifactory/api/storage/conan-local/_/abseil/20230802.1/_/c59689fd8126ed8b3d7b2a524f391ef7/package/ec2a9de6feab3c0b86da78a55456ffb819b1912b/b3393be70b4ab66bab1e30f82765fc46/conaninfo.txt?properties" -H "accept: application/json"

{
  "properties" : {
    "conan.options.fPIC" : [ "True" ],
    "conan.options.shared" : [ "False" ],
    "conan.package.channel" : [ "_" ],
    "conan.package.license" : [ "Apache-2.0" ],
    "conan.package.name" : [ "abseil" ],
    "conan.package.url" : [ "https://github.com/conan-io/conan-center-index" ],
    "conan.package.user" : [ "_" ],
    "conan.package.version" : [ "20230802.1" ],
    "conan.settings.arch" : [ "x86_64" ],
    "conan.settings.build_type" : [ "Release" ],
    "conan.settings.compiler" : [ "apple-clang" ],
    "conan.settings.compiler.cppstd" : [ "17" ],
    "conan.settings.compiler.libcxx" : [ "libc++" ],
    "conan.settings.compiler.version" : [ "13" ],
    "conan.settings.os" : [ "Macos" ]
  },
  "uri" : "http://localhost:8081/artifactory/api/storage/conan-local/_/abseil/20230802.1/_/c59689fd8126ed8b3d7b2a524f391ef7/package/ec2a9de6feab3c0b86da78a55456ffb819b1912b/b3393be70b4ab66bab1e30f82765fc46/conaninfo.txt"
}

Hope this helps

@h-2
Copy link
Author

h-2 commented Jan 16, 2024

Thanks for your reply and for pointing out where I can find the information!
We will rely on that for now and not use any of the artifactory extensions.

@h-2 h-2 closed this as completed Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants