Limit number of artifacts downloaded

Open
#36 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
github-actions
Domain
ci-cd

Research direction

Start by locating the artifact download logic in the action and inspect how the storage listing is consumed. Done means the download request or filtering step admits only filenames matching 64 lowercase hexadecimal characters, while unrelated files are excluded.

Written by the indexing model from the issue text.

Description

Describe the Feature

Currently, the system fetches all available artifacts from the storage, regardless of whether they are needed for the current task or not. This behavior can result in downloading unrelated or unnecessary files, leading to increased network usage, storage overhead, and potentially incorrect behavior if conflicting or invalid files are introduced.

This PR introduces support for limiting the artifacts fetched based on a specific pattern. As all artifacts are named after the SHA256 hash of their content, we can leverage pattern matching to ensure only valid and relevant artifacts are downloaded.

Expected Behavior

Only artifacts whose filenames match a valid SHA256 hash pattern will be downloaded. This prevents the fetching of unrelated files and ensures a cleaner and more secure artifact management process.

Use Case

When a large set of artifacts are stored in a shared location, it’s inefficient and potentially risky to download all of them indiscriminately. By downloading only artifacts with names that match the SHA256 format (a 64-character lowercase hexadecimal string), we can:
• Reduce bandwidth and storage usage.
• Avoid introducing unrelated or invalid artifacts.
• Improve security and reproducibility by ensuring artifact integrity.

Describe Ideal Solution

Integrate a filtering mechanism into the artifact download logic that applies a pattern match to only fetch files named as valid SHA256 sums. This can be implemented using a regex check or prefix-based filtering, depending on the storage system’s capabilities.

Alternatives Considered

•	Continue downloading all files and filter them locally: Inefficient and still downloads potentially large volumes of unnecessary data.
Dominant language
No language data
Stars
13
Forks
18
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudposse/github-action-matrix-outputs-read

All issues in cloudposse/github-action-matrix-outputs-read

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.