-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Gopkg.*,pkg/generator/templates.go: update to kubernetes 1.11.2 #522
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
Conversation
Hi @wongma7. Thanks for your PR. I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. 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. |
ccd4930
to
2480483
Compare
|
@wongma7 @hasbro17 I think the test is failing because the generated operator is not using this branches SDK code. What is the best way to either make the generated code point to this branch for the test or do we ignore e2e tests? IMO we should consider updating the tests, to always pull the branch that is being tested of the sdk. But I don't know if we should block this PR? /cc @AlexNPavel |
This should be using our code, not sure why it is failing: https://github.com/operator-framework/operator-sdk/blob/master/test/e2e/memcached_test.go#L72 |
@shawn-hurley The e2e test actually does make sure that for the generated operator the current PR branch of the SDK is vendored. The problem we're doing this post If the initial It's always always a bit tricky when we update pkg/sdk that introduces new transitive dependencies. |
I think we can fix how we run this test and have it run Instead of just replacing the vendored SDK directory directly after running PR_REVISION=git rev-parse HEAD
sed -i 's|branch = "master"|revision = "$PR_REVISION"|g' Gopkg.toml
# Run dep ensure to update the vendored SDK and its transitive deps with the current PR
dep ensure |
I think you're going to have to change the dep source as well, depending on travis variables, But I think this approach will be less error-prone IMO |
Due to the way that dep works, we cannot fix this with dep (remote references like the ones github/travis use are not supported). We simple have to merge this and then check if travis's master build works. |
Travis exposes the following envs: So we can update the Gopkg.toml accordingly in our test to vendor the PR commit. |
New PR open with fix ^ |
2480483
to
210221b
Compare
rebased, ty for the quick response on this |
The test is still failing but this time the operator is built and run successfully. Its just not reconciling correctly as we expect it to (i.e create a memcached deployment for a memcached CR). @wongma7 Can you do a manual test with the example on the README/user-guide to test out if an operator with your changes can still watch and use the client correctly. I'm going to verify that myself. |
pkg/k8sclient/client.go
Outdated
} | ||
return resource, nil | ||
return gvr, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After testing it manually I found the issue.
mapping.Resource
is of type schema.GroupVersionResource
and not of type string.
Replace lines 115-120:
gvr := &schema.GroupVersionResource{
Group: gvk.Group,
Version: gvk.Version,
Resource: mapping.Resource.String(),
}
return gvr, nil
with:
return &mapping.Resource, nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed, works for me locally as well now
210221b
to
c044945
Compare
LGTM Thank you! |
LGTM |
1 similar comment
LGTM |
this continues #391 @hasbro17 PTAL