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

Break Pipelines' dependency on Build #648

Merged
merged 4 commits into from
Mar 26, 2019

Conversation

vdemeester
Copy link
Member

@vdemeester vdemeester commented Mar 21, 2019

Changes

This removes the dependencies on knative/build. Only pkg/reconcilier/v1alpha1/taskrun/… packages were the last packages, and now there are not depending on build anymore.

image

With this "Phase 2" is effectively complete !

Marking as WIP as I feel there is still room for improvements on the refactoring I did — and the commits in there are not final, I'll rebase and squash before we can merge 😉.

Closes #252

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.

Release Notes

pipeline doesn't depend on knative/build anymore 💃

@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 21, 2019
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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:

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

@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Mar 21, 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 Mar 21, 2019
@vdemeester vdemeester changed the title WIP: Break Pipelines' dependency on Build Break Pipelines' dependency on Build Mar 21, 2019
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 21, 2019
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.

Looking great!!

My main feedback is that there are a few function + test names that I think we could update to no longer include Build (even tho its super tedious 😩 ) (also I dont think i pointed them all out but I caught some of them!) but mostly looks great!!! 😻

pkg/reconciler/v1alpha1/taskrun/taskrun.go Outdated Show resolved Hide resolved
pkg/reconciler/v1alpha1/taskrun/taskrun.go Outdated Show resolved Hide resolved
pkg/reconciler/v1alpha1/taskrun/resources/pod.go Outdated Show resolved Hide resolved
pkg/reconciler/v1alpha1/taskrun/resources/pod.go Outdated Show resolved Hide resolved
if err != nil {
return nil, fmt.Errorf("failed to add entrypoint to steps of TaskRun %s: %v", tr.Name, err)
}
// Add the step which will copy the entrypoint into the volume
// we are going to be using, so that all of the steps will have
// access to it.
entrypoint.AddCopyStep(bs)
b := &buildv1alpha1.Build{
Copy link
Collaborator

Choose a reason for hiding this comment

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

oh weird, we were instantiating Build twice ! 🤔

pkg/reconciler/v1alpha1/taskrun/taskrun_test.go Outdated Show resolved Hide resolved
Type: v1alpha1.GCSManifest,
Location: "gs://foo/bar",
},
TargetPath: "path/foo",
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we still need TargetPath covered in this test, using resources (https://github.com/tektoncd/pipeline/blob/3e8b177fbeb39126a9c9de121008db571ef45bfa/docs/tasks.md#controlling-where-resources-are-mounted) ? (im not sure myself!)

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's already covered with resources. This code was testing something we never set as is anymore I think 👼

Copy link
Collaborator

Choose a reason for hiding this comment

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

kk coo :D

@vdemeester vdemeester force-pushed the 252-break-build-dep-2 branch 3 times, most recently from e49c72b to 72dd6d2 Compare March 25, 2019 17:01
@@ -67,10 +67,6 @@ required = [
name = "go.uber.org/zap"
revision = "67bc79d13d155c02fd008f721863ff8cc5f30659"

[[constraint]]
name = "github.com/knative/build"
Copy link
Member

Choose a reason for hiding this comment

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

👋 🎉

@vdemeester
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

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 one super minor thing (some commented out code 😭 lol wanted to lgtm ... ) otherwise looks great!!

/meow space

pkg/reconciler/v1alpha1/taskrun/resources/pod.go Outdated Show resolved Hide resolved
@tekton-robot
Copy link
Collaborator

@bobcatfish: cat image

In response to this:

Just one super minor thing (some commented out code 😭 lol wanted to lgtm ... ) otherwise looks great!!

/meow space

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

This removes the latest piece of dependencies on `knative/build` that
were in `pkg/reconcilier/v1alpha1/taskrun/…` packages.

`TaskRun`/`TaskSpec` are no more translated to  `Build` types, that
are used to create `Pod` later on. We now create `Pod` directly from
`TaskRun`/`TaskSpec` definitions.

This also remove test builder code related to those types.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
@bobcatfish
Copy link
Collaborator

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 26, 2019
@vdemeester
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

@tekton-robot tekton-robot merged commit 2f7dbd9 into tektoncd:master Mar 26, 2019
@vdemeester vdemeester deleted the 252-break-build-dep-2 branch March 26, 2019 21:05
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.

None yet

5 participants