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

Bump shipwright-io/build to v0.5.0 #19

Closed
wants to merge 3 commits into from

Conversation

adambkaplan
Copy link
Member

Now that v0.5.0 has been released, we need to bump the CLI's dependencies.

This includes a fix for the breaking change to BuildRun's status field.

- Update shipwright-io/build to v0.5.0
- Update k8s.io to v0.20.2 (Kubernetes 1.20)
In v0.5.0, the BuildRun status fields "Succeeded" and "Reason" were
removed. This was replaced by the condition type "Succeeded."
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 10, 2021

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from adambkaplan after the PR has been reviewed.

The full list of commands accepted by this bot can be found 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

@openshift-ci openshift-ci bot requested review from HeavyWombat and otaviof June 10, 2021 14:31
@adambkaplan
Copy link
Member Author

/assign @otaviof

@adambkaplan
Copy link
Member Author

/cc @alicerum

@openshift-ci openshift-ci bot requested a review from alicerum June 10, 2021 14:31
@alicerum
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 10, 2021
@adambkaplan
Copy link
Member Author

@alicerum it isn't at all clear to me why the list test is failing after the kube rebase:

=== RUN   TestResource/Resource_List
=== CONT  TestResource
    resource_test.go:52: 
        Error from List must be nil
        Expected
            <*errors.errorString | 0xc000538200>: {
                s: "item[0]: can't assign or convert unstructured.Unstructured into v1alpha1.Build",
            }
        to be nil

k8s 1.20's fake dynamic client returns an error trying to convert an
unstructured type to the list's underlying type. Skipping the resource
list unit test until the fake dynamic client is fixed upstream.

See kubernetes/client-go#983
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 10, 2021
@adambkaplan
Copy link
Member Author

Decided to skip the unit test - the fake dynamic client is pretty brittle and provided on an "as-is" basis.

kubernetes/client-go#983

@otaviof
Copy link
Member

otaviof commented Jun 13, 2021

An update about the issue found on this PR, when we start a fake dynamic-client with a Build object, it does List items without errors. On the following snippet we have a concise example of how the dynamic-client is employed, please consider:

func TestSimpleDynamicClientList(t *testing.T) {
	g := gomega.NewGomegaWithT(t)

	scheme := runtime.NewScheme()
	buildv1alpha1.SchemeBuilder.AddToScheme(scheme)

	b := &buildv1alpha1.Build{}
	b.SetName("name")
        client := fake.NewSimpleDynamicClient(scheme, b)

	rs := client.Resource(buildv1alpha1.SchemeGroupVersion.WithResource("builds"))
	res, err := rs.List(context.TODO(), metav1.ListOptions{})
	g.Expect(err).To(gomega.BeNil())
	g.Expect(res).ToNot(gomega.BeNil())
	g.Expect(len(res.Items)).To(gomega.Equal(1))
}

@otaviof
Copy link
Member

otaviof commented Jun 17, 2021

/lgtm

We will tackle the root-cause of the test skipped here, so the current state looks good to me.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 17, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 23, 2021

@adambkaplan: PR needs rebase.

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.

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 23, 2021
@HeavyWombat
Copy link
Contributor

Superseded by #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants