concourse / concourse/s3-resource

Support 'unpack' when initial_content_binary is an archive file

Open
#116 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
67
Forks
108
PR merge metrics
No merged PRs in 30d

Description

Hi all, we have an s3 input as follows:

- name: bbl-state
  type: s3
  source:
    <<: *minio-s3
    bucket: bosh-state-files
    regexp: bbl-state-(.*).tgz
    initial_path: /bbl-state-0.0.0.tgz
    initial_content_binary: ((bbl-state-init-tgz))

And when the resource is used we do so as follows:

    - get: bbl-state
      params:
        unpack: true

However, I have just noticed that the first execution does not unpack the initial_content_binary. As I can see in the code, it attempts to extract before placing the initial binary.

Would you accept a PR to resolve this, or was this by design for some reason?

Contributor guide

Open the contributing guide

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.

Research direction

Trace the handling of the unpack parameter together with initial_content_binary, focusing on the order of archive extraction and initial binary placement. Confirm the behavior with an S3 resource configured like the example, and consider the issue done when the first execution unpacks the supplied archive just as later fetched archives do.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, go
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.