[RTFACT-18255] Debian virtual calculation failure when performing sync calculation and deploy with user that has limited permissions Created: 10/Jan/19  Updated: 07/Feb/19  Resolved: 15/Jan/19

Status: Resolved
Project: Artifactory Binary Repository
Component/s: Debian
Affects Version/s: None
Fix Version/s: 6.7.0

Type: Bug Priority: Normal
Reporter: Shay Bagants Assignee: Shay Bagants
Resolution: Fixed Votes: 0
Labels: None

Assigned QA: Alex Dvorkin

 Description   

Scenario A (common scenario):

  1. Create local debian repository
  2. Deploy a deb package with valid debian properties into the local repository and wait for it to get indexed
  3. Create virtual repository aggregating the local repository
  4. Trigger sync calculation for the local repository through the REST-API, this will cause the virtual repository calculation to be triggered right after the local, but a failure occurs on the virtual repository calculation as it fails finding existing indexes within the local repository.
    2019-01-10 19:21:54,706 [art-exec-25] ERROR o.a.w.q.WorkQueueImpl:99 - Debian Virtual Metadata: failed to process DebianVirtualMetadataWorkItem(repoKey=deb-virtual, distribution=trusty, component=main, passphrase=null)
    java.lang.RuntimeException: Failed to call work queue 'Debian Virtual Metadata' callback due to :All Debian coordinates must be specified: trusty/[]/[]
    at org.artifactory.work.queue.WorkQueueImpl.invoke(WorkQueueImpl.java:131)
    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$$$capture(FutureTask.java:266)
    at java.util.concurrent.FutureTask.run(FutureTask.java)
    at org.artifactory.concurrent.ArtifactoryRunnable.run(ArtifactoryRunnable.java:50)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.reflect.InvocationTargetException: null
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    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)
    ... 8 common frames omitted
    Caused by: java.lang.IllegalArgumentException: All Debian coordinates must be specified: trusty/[]/[]
    at org.jfrog.repomd.debian.release.DebianReleaseContext.<init>(DebianReleaseContext.java:38)
    at org.artifactory.addon.debian.DebianServiceImpl.indexRelease(DebianServiceImpl.java:335)
    at org.artifactory.addon.debian.DebianServiceImpl.indexVirtualRepo(DebianServiceImpl.java:400)
    at org.artifactory.addon.debian.DebianServiceImpl.createOrUpdateVirtualIndexes(DebianServiceImpl.java:302)
    at org.artifactory.addon.debian.DebianServiceImpl.calculateDebianVirtualMetadataAsync(DebianServiceImpl.java:235)
    ... 13 common frames omitted

Scenario B (uncommon scenario):

  1. Delete all permission existing targets
  2. Create debian local repository
  3. Create debian virtual repository aggregating the local repository
  4. Create new Artifactory user and permission target that allow only READ, WRITE, ANNOTATE on '*/.deb' only for the debian local repository
  5. Deploy debian package into the local repository, this will trigger both local repository calculation and right after, virtual repository calculation which will fail with the Exception mentioned earlier

Generated at Wed Oct 23 00:02:29 UTC 2019 using JIRA 7.6.16#76018-sha1:9ed376192612a49536ac834c64177a0fed6290f5.