Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-27007

Helm virtual repository order is not being respected when we have multiple local/virtual repositories with same artifact

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Severity:
      Medium
    • Location:
      External

      Description

      Problem description
      The virtual repository order was not respected for the helm repositories if we have multiple local/virtual repositories inside it with the same artifacts.

      What is the impact:
      Artifactory is not resolving the helm artifacts according to the virtual repository order.

      What is the expected behavior:
      Artifactory should resolve helm artifacts according to the virtual repository order.

      Steps to reproduce: 

      1. Downloaded chart from https://charts.jfrog.io/artifactory-107.35.2.tgz
      2. Edited a comment line in Chart.yaml for checking the difference.
      3. helm package jfrog-issue-201221
      Successfully packaged chart and saved it to: /Users/tataraov/Downloads/201221/reproduction/dev/artifactory-107.35.2.tgz
      4. helm package jfrog-issue-201221
      Successfully packaged chart and saved it to: /Users/tataraov/Downloads/201221/reproduction/staging/artifactory-107.35.2.tgz
      5. Uploaded to respective repositories in Artifactory.
      helm-dev-local is the local repository and it is part of a virtual repo: dev-virtual
      helm-staging-local is the local repository and it is part of the virtual repo: staging-virtual.
      The virtual repository helm-virtual includes the above virtuals in the order dev-virtual, staging virtual.

      $ jfrog rt u artifactory-107.35.2.tgz helm-dev-local/artifactory/
      Log path: /Users/tataraov/.jfrog/logs/jfrog-cli.2022-04-09.16-48-17.34045.log
      {
      "status": "success",
      "totals":

      { "success": 1, "failure": 0 }

      }

      $ jfrog rt u artifactory-107.35.2.tgz helm-staging-local/artifactory/
      Log path: /Users/tataraov/.jfrog/logs/jfrog-cli.2022-04-09.16-49-10.34306.log
      {
      "status": "success",
      "totals":

      { "success": 1, "failure": 0 }

      }
      6. Added virtual repo as helm registry and performed the helm update.
      $ helm repo add helm-virtual http://art.local/artifactory/api/helm/helm-virtual --username testuser --password XXXXX
      "helm-virtual" has been added to your repositories
      $ helm repo update
      Hang tight while we grab the latest from your chart repositories...
      ...Successfully got an update from the "helm-virtual" chart repository
      ...Successfully got an update from the "jfrog" chart repository
      Update Complete. ⎈Happy Helming!⎈

      Scenario1:
      Repo order : Dev virtual first, stage virtual next under the virtual helm-virtual
      helm fetch --untar --untardir . --version 107.35.2 helm-virtual/artifactory
      2022-04-09T11:20:16.819Z [76f29936b7dd85bb] [ACCEPTED DOWNLOAD] helm-dev-local:artifactory/artifactory-107.35.2.tgz for client : testuser / XX.XXX.XXX.XXX.

      Scenario2:
      Changed repo order in the virtual repo(stage virtual first, dev virtual next) and performed helm update again. Tried the same command and still getting the result from Dev.
      2022-04-09T11:22:06.696Z [710a6d9da0edbb6e] [ACCEPTED DOWNLOAD] helm-virtual:.index/-195587805/-1376548953/index.yaml for client : testuser / XX.XXX.XXX.XXX.
      2022-04-09T11:22:15.864Z [172f1368f313b715] [ACCEPTED LOGIN] for client : testuser / XX.XXX.XXX.XXX.
      2022-04-09T11:22:20.811Z [36f7f8ce835a9a1e] [ACCEPTED DOWNLOAD] helm-dev-local:artifactory/artifactory-107.35.2.tgz for client : testuser / XX.XXX.XXX.XXX.

      Environment details:
      Artifactory 7.35 standalone instance with any database.

      Possible workaround: 
      Enabling the priority resolution on the repoisitory will be helpful.

        Attachments

          Activity

              People

              Assignee:
              Unassigned
              Reporter:
              tataraov Tatarao Vana
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-27049 -
                  SYNCHRONIZED
                  • Last Sync Date: