Skip to content

jf conan does not capture user, channel and revision information for a downloaded dependency #3695

Description

@CJCombrink

Describe the bug

When installing dependencies using jf conan install or jf conan create the user, channel and revision is missing from the decencies.
This is needed to accurately track dependencies at a specific point in time for the specific build

Current behavior

On the dependency name and version is added as a dependency, the channel, user and reference is missing

Reproduction steps

Create a test conan project

mkdir test_jf && cd test_jf 
echo -e '[requires]\nfmt/[>12]' |  tee conanfile.txt
jf conan install . --build-name=my-build --build-number=1

The output

08:21:57 [🔵Info] Successfully logged into Conan remote 'my_conan' using JFrog CLI config 'artifactory1'
08:21:58 [🔵Info] Running Conan install
...
Graph root
    conanfile.txt: test_jf/conanfile.txt
Requirements
    fmt/12.1.0#50abab23274d56bb8f42c94b3b9a40c7 - Downloaded (my_conan)
Resolved version ranges
    fmt/[>12]: fmt/12.1.0

======== Computing necessary packages ========
Requirements
  fmt/12.1.0#50abab23274d56bb8f42c94b3b9a40c7:8c026f7db33190c2c3026ad8e22e151d21eed4d5#7a1b4e7f81e11cc84da011a3779cf3b6 - Download (my_conan)
...
Install finished successfully
08:21:58 [🔵Info] Collecting build info for Conan project: my-build/1
08:21:59 [🔵Info] Conan build info collected. Use 'jf rt bp my-build 1' to publish it.

Then confirm the build info

jf rt bp my-build 1 --dry-run

The output

...
08:24:59 [🔵Info] [Dry run] Logging Build info preview...
{
  "name": "my-build",
  "number": "1",
  "agent": { "name": "jfrog-cli-go", "version": "2.122.0"  },
  "buildAgent": { "name": "GENERIC", "version": "2.122.0" },
  "modules": [
    {
      "type": "conan",
      "id": "test_jf",
      "dependencies": [
        {
          "id": "fmt:12.1.0",
          "scopes": [
            "runtime"
          ],
         ...
        }
      ]
    }
  ],
}

Expected behavior

The expectation is that the "dependencies" in the build info must have in some way the package reference and user and channel
This package does not have a user and channel since for the example I am using packages from conancenter but for internal packages that has this it is expected

expected:

      "dependencies": [
        {
          "id": "fmt:12.1.0#50abab23274d56bb8f42c94b3b9a40c7",
          "scopes": [
            "runtime"
          ],
         ...
        },
        {
          "id": "libA:12.1.0@user/channel#1234",
          "scopes": [
            "runtime"
          ],
         ...
        }

JFrog CLI version

jf version 2.122.0

Operating system type and version

Rocky Linux 9.3

JFrog Artifactory version

Commercial license 7.68.7

JFrog Xray version

none

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions