Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build-gcs resource type to support .tar.gz archives #1200

Merged
merged 1 commit into from
Aug 19, 2019

Conversation

imjasonh
Copy link
Member

@imjasonh imjasonh commented Aug 16, 2019

Changes

  • support both ZipArchive and TarGzArchive types now supported by gcs-fetcher
    • mark Archive type as deprecated ❌ (ZipArchive is the equivalent)
  • rename gcs-resource-spec-taskrun.yaml -> build-gcs-{targz,zip}.yaml to make their purposes clearer
    • make the taskrun name more descriptive
    • fetch a smaller file (archive.{zip,tar.gz}) containing a single file for faster tests ⏩
  • remove test/gcs_taskrun_test.go which didn't usefully test anything that wasn't tested in the YAML test
  • update docs to reflect these changes 📜

And, while I'm at it:

  • remove support for build-gcs upload functionality
    • this doesn't appear to have worked and AFAIK nobody used it anyway
    • if we want to support it, we can, but probably not like that... it only supported Manifest-style uploads, for instance 🌵
    • remove gcs-uploader image from flags, and from vendor/ and from tekton/ release pipeline YAMLs 🎉

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes
are included, additive changes
must be approved by at least two OWNERS
and backwards incompatible changes
must be approved by more than 50% of the OWNERS,
and they must first be added
in a backwards compatible way.

Release Notes

- build-gcs resources now support fetching and extracing .tar.gz archives

🚨 Upcoming Breaking change 🚨
- build-gcs resources will no longer support `artifactType` `Archive`, use `ZipArchive` and `TarGzArchive` instead

🚨 Breaking change 🚨
- build-gcs resources cannot be used as an output resource

@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Aug 16, 2019
@tekton-robot tekton-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 16, 2019
@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/build_gcs_resource.go 80.5% 79.4% -1.1

@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/build_gcs_resource.go 80.5% 79.4% -1.1

@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/build_gcs_resource.go 80.5% 79.4% -1.1

@imjasonh
Copy link
Member Author

/assign @bobcatfish

@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/build_gcs_resource.go 80.5% 79.4% -1.1

Copy link
Collaborator

@bobcatfish bobcatfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a bunch of minor comments!

Since this does include a breaking change, we should get a couple more owners to review also - like you said its probably a fair guess that no one was using the upload functionality (cuz it wouldnt have worked anyway?) so im okay with it ( @dlorenc @afrittoli @vdemeester @dibyom @abayer and soon to be owner @sbwsg )

docs/resources.md Outdated Show resolved Hide resolved
docs/resources.md Show resolved Hide resolved
)

// GCSArtifactType defines a type of GCS resource.
type GCSArtifactType string

const (
// GCSArchive indicates that resource should be fetched from a typical archive file.
//
// Deprecated: Use GCSZipArchive instead.
GCSArchive GCSArtifactType = "Archive"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make a follow up issue (unless you did already!) to remove this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any concerns about me just removing it in this PR?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we're sure no one is using it, im okay with it but we'll need a few more owners to sign off on it (2 more so we have a total of 4? 1/2 + 1)

pkg/apis/pipeline/v1alpha1/build_gcs_resource.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1alpha1/build_gcs_resource.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1alpha1/gcs_resource.go Show resolved Hide resolved
tekton/publish-run.yaml Show resolved Hide resolved
test/gcs_taskrun_test.go Show resolved Hide resolved
@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/build_gcs_resource.go 80.5% 79.4% -1.1

@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/build_gcs_resource.go 80.5% 79.4% -1.1

- support both `ZipArchive` and `TarGzArchive` types now supported by `gcs-fetcher`
  - mark `Archive` type as deprecated ❌  (`ZipArchive` is the equivalent)
- rename `gcs-resource-spec-taskrun.yaml` -> `build-gcs-{targz,zip}.yaml` to make their purposes clearer
  - make the taskrun name more descriptive
  - fetch a smaller file (`archive.{zip,tar.gz}`) containing a single file for faster tests ⏩
- remove `test/gcs_taskrun_test.go` which didn't usefully test anything that wasn't tested in the YAML test
- update docs to reflect these changes 📜
- explicitly set `gcs-fetcher` image entrypoint

And, while I'm at it:
- remove support for `build-gcs` upload functionality
  - this doesn't appear to have worked and AFAIK nobody used it anyway
  - if we want to support it, we can, but probably not like that... it only supported `Manifest`-style uploads, for instance 🌵
  - remove `gcs-uploader` image from flags, and from `vendor/` and from `tekton/` release pipeline YAMLs 🎉
@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/build_gcs_resource.go 80.5% 79.4% -1.1

@dlorenc
Copy link
Contributor

dlorenc commented Aug 16, 2019

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 16, 2019
@bobcatfish
Copy link
Collaborator

/hold

(gotta get one more owner)

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 16, 2019
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ImJasonH, vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [ImJasonH,vdemeester]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@imjasonh
Copy link
Member Author

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 19, 2019
@tekton-robot tekton-robot merged commit 5638925 into tektoncd:master Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants