Skip to content

oras pull: leaves partial output after duplicate-name failure on multi-platform artifacts #2193

Closed

Description

@TanvirTian

What happened in your environment?

When pulling a multi-platform OCI artifact without specifying --platform, if multiple platform manifests contain files with the same name, oras pull fails with duplicate name but leaves one of the files in the output directory.

For example, an index containing a tool file for both linux/amd64 and linux/arm64 produces:

Error: tool: duplicate name

but pulled/tool remains on disk.

This means a failed pull can leave partial output from one of the platforms.

What did you expect to happen?

When oras pull fails because of a duplicate output filename, it should not leave newly-created partial files from the failed pull in the output directory.

Existing files should retain their normal overwrite behavior.

How can we reproduce it?

  1. Start a local OCI registry on localhost:7000.
  2. Create two artifacts with the same filename (tool), one with platform linux/amd64 and one with platform linux/arm64
  3. Create an OCI index containing both platform manifests.
  4. Pull the index without specifying a platform:
oras pull localhost:7000/repro/multi-platform-duplicate:multi -o pulled
  1. The command fails with:
Error: tool: duplicate name
  1. Check the output directory:
ls -la pulled/

The tool file remains in the directory even though the pull failed.

Explicitly selecting a platform succeeds without the duplicate-name error:

oras pull localhost:7000/repro/multi-platform-duplicate:multi \
  --platform linux/amd64 -o pulled

The issue can be reproduced entirely against a local registry; Docker Hub is not required

What is the version of your ORAS CLI?

Version: 1.3.4
Go version: go1.27.1-X:nodwarf5
OS/Arch: linux/amd64

What is your OS environment?

CachyOS Linux (x86_64), KDE Plasma, Wayland

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.

Activity

  1. added
    bug
    triage
    on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions