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

Cran virtual repositories cannot merge metadata

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 7.5.0
    • Component/s: CRAN
    • Labels:
    • Severity:
      High

      Description

      Symptoms: Artifactory only displays local package metadata in Cran virtual repositories (Internet-sourced packages do not exist in the PACKAGES file).

       

      Steps to reproduce:

      1. Download a Cran package (Can be from the internet or Artifactory)
      • E.G. GET cran-remote/src/contrib/ACA_1.1.tar.gz
      1. Un-tar the package and modify its DESCRIPTION file, modify the version to read "0.9.800.1.0"

       

      Package: ACA

      Type: Package

      Title: Abrupt Change-Point or Aberration Detection in Point Series

      Version: 0.9.800.1.0

      [...]

       

      1. Re-tar the package, rename to "ACA_0.9.800.1.0.tar.gz" and deploy

       

      1. Observe that Artifactory fails to handle the version string
      2019-11-06 15:53:31,875 [art-exec-106234] [DEBUG] (o.a.a.c.r.m.CranVirtualMerger:70) - Start merging CRAN PACKAGES metadata files under virtual repo Central-Cran-Repo
      2019-11-06 15:53:32,956 [art-exec-106234] [INFO ] (o.a.r.HttpRepo      :432) - fm-cran-remote downloading https://artifactory.com/artifactory/fm-cran-remote/bin/windows/contrib/3.6/PACKAGES 2.33 MB 
      2019-11-06 15:53:33,153 [art-exec-106234] [ERROR] (o.a.a.c.CranServiceImpl:131) - Error occurred while merging PACKAGES file for repo Central-Cran-Repo: For input string: "1.0"
      2019-11-06 15:53:33,153 [art-exec-106234] [DEBUG] (o.a.a.c.CranServiceImpl:132) - Error occurred while merging PACKAGES file for repo Central-Cran-Repo
      java.lang.NumberFormatException: For input string: "1.0"
              at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
              at java.lang.Integer.parseInt(Integer.java:580)
              at java.lang.Integer.parseInt(Integer.java:615)
              at org.jfrog.repomd.cran.utils.CranVersionComparator.compare(CranVersionComparator.java:20)
              at org.jfrog.repomd.cran.utils.CranVersionComparator.isAfter(CranVersionComparator.java:44)
              at org.artifactory.addon.cran.repo.merger.CranVirtualMerger.isAfter(CranVirtualMerger.java:185)
              at org.artifactory.addon.cran.repo.merger.CranVirtualMerger.mergePackagesMetadata(CranVirtualMerger.java:174)
              at org.artifactory.addon.cran.repo.merger.CranVirtualMerger.mergeRemote(CranVirtualMerger.java:125)
              at org.artifactory.addon.cran.repo.merger.CranVirtualMerger.mergePackagesUnderRepo(CranVirtualMerger.java:90)
              at org.artifactory.addon.cran.repo.merger.CranVirtualMerger.merge(CranVirtualMerger.java:71)
              at org.artifactory.addon.cran.CranServiceImpl.mergeCranRepositories(CranServiceImpl.java:173)
              at org.artifactory.addon.cran.CranServiceImpl.calculateCranVirtualMetadataSync(CranServiceImpl.java:129)
              at sun.reflect.GeneratedMethodAccessor852.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.artifactory.work.queue.WorkQueueImpl.invoke(WorkQueueImpl.java:123)
              at org.artifactory.work.queue.WorkQueueImpl.doJobs(WorkQueueImpl.java:96)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at org.artifactory.concurrent.ArtifactoryRunnable.run(ArtifactoryRunnable.java:50)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745) 

       

        Attachments

          Activity

              People

              Assignee:
              nadavy Nadav Yogev
              Reporter:
              patrickr Patrick Russell
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: