Skip to content

[bug] Matching names and merge-multiple causes data corruption #298

@henryiii

Description

@henryiii

What happened?

If multiple files have the same name, then download-artifact causes corrupts the files. This makes zip's unopenable (in one case) and sqlite files invalid (an a different repo). Making sure the names were unique fixed the problem.

What did you expect to happen?

In both cases, I'd have been fine with an explicit error (matching names not allowed or something) - there should not have been matching files. There could also be a heuristic, like based on order or something, but I think that would tend to be more error prone than simply throwing a hard error and allowing the author to fix it.

How can we reproduce it?

Create files with the same names (ideally slightly different contents, I think), and then upload them to two separate artifacts, then download them and merge them with pattern and merge-multiple. The files should have corrupted data. (Once case was ~20 coverage files where the OS was not included in the name pattern, the other was Python wheels (module binaries) that were being produced on multiple variations of the same GHA image, probably also about 20 or so.

Anything else we need to know?

wntrblm/nox#772 was the coverage one with sqlite, though now rebased on unique coverage names.

pypa/gh-action-pypi-publish#215 is where the wheel one was mentioned.

What version of the action are you using?

v4

What are your runner environments?

linux

Are you on GitHub Enterprise Server? If so, what version?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions