Skip to content

Conversation

@corinnekrych
Copy link

Description of the change:

Adjust List(gCtx goctx.Context, list runtime.Object, opts ...dynclient.ListOptionFunc to match new runtime-controller signature.

Motivation for the change:

Make operator-sdk compatible with runtime-controller

@openshift-ci-robot openshift-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 May 2, 2019
@openshift-ci-robot
Copy link

Hi @corinnekrych. Thanks for your PR.

I'm waiting for a operator-framework or openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@lilic
Copy link
Member

lilic commented May 3, 2019

Hi @corinnekrych thanks so much for this PR! 🎉

We might not be merging it soon as that would be breaking changes and we need to decide in which release we would want to have this. The release of controller-runtime is also an alpha one, so we might need to wait for a more stable release of that.

There also needs to be a migration doc for the changes, and some other things so maybe would make sense to have someone else from our team work on this with you if you are interested in this? Thanks again!

cc @joelanford @shawn-hurley @estroz @hasbro17 @AlexNPavel @theishshah

@lilic
Copy link
Member

lilic commented May 3, 2019

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 3, 2019
@openshift-ci-robot
Copy link

@corinnekrych: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/sanity 5796ad3 link /test sanity
ci/prow/unit 5796ad3 link /test unit

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

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. I understand the commands that are listed here.

@estroz
Copy link
Member

estroz commented May 6, 2019

I'd rather wait for a v0.2.0 stable release. There's no urgency to upgrade for the next release.

err = wait.PollImmediate(time.Second*1, time.Second*60, func() (bool, error) {
pods := &v1.PodList{}
err = runtimeClient.List(context.TODO(), &client.ListOptions{LabelSelector: set.AsSelector()}, pods)
err = runtimeClient.List(context.TODO(), pods, client.MatchingLabels(set))
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @corinnekrych,
In the f494845#diff-b38c855ac3ed0aa95294c855ea839f99R176 it was solved as follows.

err = runtimeClient.List(context.TODO(), pods, client.MatchingLabels(dep.Spec.Selector.MatchLabels))

break
}
lo := client.InNamespace(r.Namespace)
lo := client.ListOptions{Namespace: r.Namespace}
Copy link
Contributor

Choose a reason for hiding this comment

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

here we can do just as follows.

lo := &client.ListOptions{}
lo.InNamespace(r.Namespace)

syncer := zapcore.AddSync(destWriter)
conf := getConfig()

conf.encoder = &logf.KubeAwareEncoder{Encoder: conf.encoder, Verbose: conf.level.Level() < 0}
Copy link
Contributor

Choose a reason for hiding this comment

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

Following it fixed made in the PR: f494845#diff-4407315726717f30063d558928ad9188R37

zapf "sigs.k8s.io/controller-runtime/pkg/log/zap"
	
conf.encoder = &zapf.KubeAwareEncoder{Encoder: conf.encoder, Verbose: conf.level.Level() < 0}
`

@camilamacedo86
Copy link
Contributor

camilamacedo86 commented May 7, 2019

Hi @corinnekrych,

This PR is not passing in the tests, we could address all that is done here in the PR #1388. Could we agree in close this one and move together with the PR #1388 which has these changes and is passing in all tests?

c/c @lilic

@corinnekrych
Copy link
Author

@lilic I'm fine with it. Go ahead and close. I'll try yours.

@camilamacedo86
Copy link
Contributor

HI @corinnekrych,

I think that just the owners can close it. Could you please close this one? Let me know if you face some issue with #1388.

Cheers,

@lilic
Copy link
Member

lilic commented May 13, 2019

Closing in favour of #1388, thanks!

@lilic lilic closed this May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

5 participants