Docker catalog might not work with include/exclude patterns on virtual repository
Description
Problem description:
Running the _catalog API, against a Docker virtual repository with include/exclude patterns, might produce an unexpected result
What is the expected behavior:
Artifactory should produce the correct Docker catalog, based on the include/exclude pattern of the virtual repository
Steps to reproduce:
Create a local and virtual Docker repos (and put the local in the virtual)
Push 3 Docker images to the local repo:
one that starts with 'a' (for example 'atest')
one with 'b'
and one with 'c'
Remove the default include pattern from the virtual repo (**/) and put these instead:
b*/**
c*/**
Run the catalog request with these parameters:
No 'n' flag - expected result
'n=0' - expected result
'n=1' - unexpected result (the bug)
This is because Artifactory first creates the subset of all images in the virtual repo and only then applies the include patterns. Therefore, when using 'n=1', then the subset will only hold the image which starts with 'a'. Then, the include pattern rule will remove it, and we are left with an empty result.
Workaround:
Set the include pattern on the local repo. This way, the subset will contain only the relevant images.
Problem description:
Running the _catalog API, against a Docker virtual repository with include/exclude patterns, might produce an unexpected result
What is the expected behavior:
Artifactory should produce the correct Docker catalog, based on the include/exclude pattern of the virtual repository
Steps to reproduce:
Create a local and virtual Docker repos (and put the local in the virtual)
Push 3 Docker images to the local repo:
one that starts with 'a' (for example 'atest')
one with 'b'
and one with 'c'
Remove the default include pattern from the virtual repo (**/) and put these instead:
b*/**
c*/**
Run the catalog request with these parameters:
No 'n' flag - expected result
'n=0' - expected result
'n=1' - unexpected result (the bug)
This is because Artifactory first creates the subset of all images in the virtual repo and only then applies the include patterns. Therefore, when using 'n=1', then the subset will only hold the image which starts with 'a'. Then, the include pattern rule will remove it, and we are left with an empty result.
Workaround:
Set the include pattern on the local repo. This way, the subset will contain only the relevant images.