Expected behavior vs actual behavior:
Expected Behavior
When an image is pulled through a Proxy Cache project, Harbor should create and display the corresponding repository entry for that project, regardless of whether the image already exists in the local Docker cache.
Actual Behavior
In some cases, the image pull succeeds, but the repository entry is not created or displayed in the project. As a result, the repository is missing from both the Harbor UI and the /api/v2.0/projects/<project>/repositories API response.
Steps to reproduce the problem:
-
Create two Proxy Cache projects (e.g. proj1 and proj2) backed by Docker Hub.
-
Pull an image through the first project:
for example:-
docker pull localhost:8080/proj1/library/traefik:latest
-
Verify that the repository appears in proj1.
-
Pull the same image through the second project:
docker pull localhost:8080/proj2/library/traefik:latest
-
Check the repositories for proj2:
curl -u admin:
"http://localhost:8080/api/v2.0/projects/proj2/repositories"
-
Observe that the pull succeeds, but the repository entry may not be created or displayed in Harbor for proj2.
Versions:
- Harbor version: 2.14
- Docker Engine version: 23.9.1
- Docker Compose version: 2.40.3
Additional context:
- Tested on Harbor built from the current
main branch.
Expected behavior vs actual behavior:
Expected Behavior
When an image is pulled through a Proxy Cache project, Harbor should create and display the corresponding repository entry for that project, regardless of whether the image already exists in the local Docker cache.
Actual Behavior
In some cases, the image pull succeeds, but the repository entry is not created or displayed in the project. As a result, the repository is missing from both the Harbor UI and the
/api/v2.0/projects/<project>/repositoriesAPI response.Steps to reproduce the problem:
Create two Proxy Cache projects (e.g.
proj1andproj2) backed by Docker Hub.Pull an image through the first project:
for example:-
docker pull localhost:8080/proj1/library/traefik:latest
Verify that the repository appears in
proj1.Pull the same image through the second project:
docker pull localhost:8080/proj2/library/traefik:latest
Check the repositories for
proj2:curl -u admin:
"http://localhost:8080/api/v2.0/projects/proj2/repositories"
Observe that the pull succeeds, but the repository entry may not be created or displayed in Harbor for proj2.
Versions:
Additional context:
mainbranch.