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

Use vendored version of plumbing instead of go get 🦸 #1763

Merged
merged 2 commits into from
Dec 19, 2019

Conversation

vdemeester
Copy link
Member

Changes

  • Using go get -d updates continuously the plumbing dependency, without really updating the vendor folder, which will mean inconsistency.
  • Remove unused code that was slowing things down 😅

Signed-off-by: Vincent Demeester [email protected]

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.

@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Dec 18, 2019
@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 18, 2019
Using `go get -d` updates continuously the plumbing dependency,
without really updating the vendor folder, which will mean inconsistency.

Signed-off-by: Vincent Demeester <[email protected]>
Those environment variables are not used in the rest of the script and
thus consume resources (`go list …`) for nothing.

Signed-off-by: Vincent Demeester <[email protected]>
@chmouel
Copy link
Member

chmouel commented Dec 19, 2019

/lgtm

Thanks 👍🏼🔥

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 19, 2019
Copy link
Contributor

@piyush-garg piyush-garg left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Thanks for this!
/approve

@@ -20,11 +20,6 @@ set -o pipefail

source $(dirname $0)/../vendor/github.com/tektoncd/plumbing/scripts/library.sh

SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
Copy link
Member

Choose a reason for hiding this comment

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

I hope this one wasn't slowing us down :P

Copy link
Member Author

Choose a reason for hiding this comment

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

This one wasn't, but ain't used anymore 😝

)

func TestDummy(t *testing.T) {
t.Log("This is required to make sure we get tektoncd/plumbing in the repository, folder vendor")
Copy link
Member

Choose a reason for hiding this comment

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

Nice! :)

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afrittoli, piyush-garg

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 19, 2019
@vdemeester
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

@tekton-robot tekton-robot merged commit de5493e into tektoncd:master Dec 19, 2019
@vdemeester vdemeester deleted the scrtip-vendor-gomod branch December 19, 2019 12:58
wlynch added a commit to wlynch/pipeline that referenced this pull request Dec 26, 2019
This was something previously brought up in tektoncd#1607, but was deferred to
allow for continued discussion.

Pros of making this change:
* Reduces size of incoming PRs when new dependencies are used.
* Removes confusion around source of truth for dependencies (e.g. vendor
vs mod). This was an issue that tektoncd#1763 solved by pinning to vendor, this
will solve the same problem differently by always deferring to the
version in go.mod.
* Allows easier use of upstream and dependent types without the use of
vendor - see
https://gist.github.com/wlynch/325293bc3fbc488d3b3d319f3a93bbea for an
example of why this is difficult today.

Risks of making this change:
* Dependencies will not be present in initial clone. They will be
fetched dynamicly when needed, which may cause workflow distruptions.
* This breaks compatibility with older versions of Go (though for
certain projects like triggers, we already require Go >= 1.13).

Third-party obligations (for things like making source available in
images) have already been addressed in tektoncd#1607.

As with tektoncd#1607, this change is more easily viewed by running `git diff
master -- ':!third_party' ':!vendor'`
@wlynch wlynch mentioned this pull request Dec 26, 2019
2 tasks
vdemeester added a commit to vdemeester/tektoncd-pipeline that referenced this pull request Jan 6, 2020
Using `go get -d` updates continuously the plumbing dependency,
without really updating the vendor folder, which means it becomes
inconsistency.

This is a follow-up of tektoncd#1763.

Signed-off-by: Vincent Demeester <[email protected]>
vdemeester added a commit to vdemeester/tektoncd-pipeline that referenced this pull request Jan 6, 2020
Using `go get -d` updates continuously the plumbing dependency,
without really updating the vendor folder, which means it becomes
inconsistency.

This is a follow-up of tektoncd#1763.

Signed-off-by: Vincent Demeester <[email protected]>
tekton-robot pushed a commit that referenced this pull request Jan 6, 2020
Using `go get -d` updates continuously the plumbing dependency,
without really updating the vendor folder, which means it becomes
inconsistency.

This is a follow-up of #1763.

Signed-off-by: Vincent Demeester <[email protected]>
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