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

Bring vendor dir in sync #523

Merged
merged 2 commits into from
Oct 12, 2018

Conversation

alvaroaleman
Copy link
Member

What this PR does / why we need it:

Brings the checked in vendor in sync

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 6, 2018
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 6, 2018
@@ -1,4 +1,4 @@
#!/usr/bin/env bash -e
#!/bin/bash
Copy link
Member Author

Choose a reason for hiding this comment

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

Is this the right way to add a new step to CI?

Copy link
Contributor

Choose a reason for hiding this comment

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

You have to configure prow to run some sort of command. Right now it runs the three scripts for CI as three different tests. We can either augment an existing script or add a new script (and configure a new presumbit).

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 don't really have an opinion on augment existing script vs add a new script + configure a new presubmit - Any preference from your side?

Copy link
Member

Choose a reason for hiding this comment

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

+1 to a new script + configure a new presubmit

Copy link
Member Author

Choose a reason for hiding this comment

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

Fine with me. Can you tell me where a new presubmit gets configured?

@alvaroaleman
Copy link
Member Author

/assign @roberthbailey

Gopkg.toml Outdated
@@ -22,11 +22,11 @@ required = [

[[constraint]]
name="sigs.k8s.io/controller-runtime"
version="v0.1.1"
version="v0.1.3"
Copy link
Member Author

@alvaroaleman alvaroaleman Oct 6, 2018

Choose a reason for hiding this comment

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

This constraint was plain wrong, dep does find a solution but that is not buildable because:

# sigs.k8s.io/cluster-api/pkg/controller/cluster [sigs.k8s.io/cluster-api/pkg/controller/cluster.test]
pkg/controller/cluster/controller.go:129:43: unknown field 'RequeueAfter' in struct literal of type reconcile.Result
# sigs.k8s.io/cluster-api/pkg/controller/machine [sigs.k8s.io/cluster-api/pkg/controller/machine.test]
pkg/controller/machine/controller.go:168:44: unknown field 'RequeueAfter' in struct literal of type reconcile.Result
# sigs.k8s.io/cluster-api/cmd/clusterctl/cmd
cmd/clusterctl/cmd/validate_cluster.go:72:91: mgr.GetRESTMapper undefined (type manager.Manager has no field or method GetRESTMapper)
# sigs.k8s.io/cluster-api/cmd/clusterctl/validation [sigs.k8s.io/cluster-api/cmd/clusterctl/validation.test]
cmd/clusterctl/validation/validate_cluster_api_objects_test.go:424:79: mgr.GetRESTMapper undefined (type manager.Manager has no field or method GetRESTMapper)
# sigs.k8s.io/cluster-api/cmd/clusterctl/cmd [sigs.k8s.io/cluster-api/cmd/clusterctl/cmd.test]
cmd/clusterctl/cmd/validate_cluster.go:72:91: mgr.GetRESTMapper undefined (type manager.Manager has no field or method GetRESTMapper)

The first version of controller-runtime that does have a field RequeueAfter in the reconcile.Result struct is v0.1.3: kubernetes-sigs/controller-runtime@83f4800

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this constraint wrong? It's in the section with STANZAS BELOW ARE GENERATED AND MAY BE WRITTEN - DO NOT MODIFY BELOW THIS LINE. which is auto-generated by kubebuilder.

@pwittrock @droot

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 is an upstream issue, the versions in the generated Gopkg.toml are hardcoded: kubernetes-sigs/kubebuilder/issues/419

However, we can just remove the # STANZAS BELOW ARE GENERATED AND MAY BE WRITTEN - DO NOT MODIFY BELOW THIS LINE. line from the Gopkg.toml at least until the upstream issue gets resolved. When doing that, running kubebuilder update results in a

$ kubebuilder update
2018/10/07 11:16:50 error updating vendor dependecies skipping modifying Gopkg.toml - file already exists and is unmanaged

Any objections to that?

Copy link

Choose a reason for hiding this comment

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

Explained the reasoning why the version says v0.1.1 in the Stanza in the issue here kubernetes-sigs/kubebuilder#419 (comment)

In order to bring deps in sync, dep ensure -update sigs.k8s.io/controller-runtime sigs.k8s.io/controller-tools should be enough to fetch latest version.

@alvaroaleman alvaroaleman changed the title Bring vendor dir in sync Fix dep constaints and bring vendor dir in sync Oct 6, 2018
@alvaroaleman alvaroaleman changed the title Fix dep constaints and bring vendor dir in sync Fix dep constraints and bring vendor dir in sync Oct 6, 2018
@alvaroaleman
Copy link
Member Author

cc @xmudrii

@xmudrii
Copy link
Member

xmudrii commented Oct 6, 2018

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 6, 2018
@alvaroaleman
Copy link
Member Author

/retest

The tests here also fail due to a timeout waiting for process kube-apiserver to start

@alvaroaleman
Copy link
Member Author

/retest

I've created a PR to get these timeouts configurable: kubernetes-sigs/controller-runtime#169

@alvaroaleman alvaroaleman changed the title Fix dep constraints and bring vendor dir in sync Bring vendor dir in sync Oct 8, 2018
@alvaroaleman
Copy link
Member Author

@roberthbailey I've removed the change of the Gopkg.toml from this pr, please take another look

@roberthbailey
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 12, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, roberthbailey

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 12, 2018
@alvaroaleman
Copy link
Member Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit b1a743e into kubernetes-sigs:master Oct 12, 2018
@alvaroaleman alvaroaleman deleted the fix-dep-ensure branch October 12, 2018 07:34
jayunit100 pushed a commit to jayunit100/cluster-api that referenced this pull request Jan 31, 2020
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", 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