Skip to content

Repository missing from Proxy Cache project after successful image pull #23410

Description

@blankirigaya

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:

  1. Create two Proxy Cache projects (e.g. proj1 and proj2) backed by Docker Hub.

  2. Pull an image through the first project:

for example:-
docker pull localhost:8080/proj1/library/traefik:latest

  1. Verify that the repository appears in proj1.

  2. Pull the same image through the second project:

    docker pull localhost:8080/proj2/library/traefik:latest

  3. Check the repositories for proj2:

    curl -u admin:
    "http://localhost:8080/api/v2.0/projects/proj2/repositories"

  4. 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.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions