-
Notifications
You must be signed in to change notification settings - Fork 601
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
Fix bind delete #59
Fix bind delete #59
Conversation
… demonstrate late binding
pkg/controller/bind/controller.go
Outdated
accessor, err := meta.Accessor(bind) | ||
if err != nil { | ||
log.Printf("Failed to get metadata: %s", err) | ||
panic("Failed to get metadata") |
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.
log.Fatalf instead of the two lines?
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.
done
pkg/sources/gcp_pubsub.go
Outdated
return err | ||
glog.Warningf("Failed to delete subscription %q : %s : %q", subscriptionName, err) | ||
// If it's already been deleted, don't error out | ||
if !strings.Contains(err.Error(), "Resource not found") { |
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.
Nothing better we can do here?
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.
I can't figure out how to get the fields of the error because it's just an error. I tried to hunt a little to figure out what the underlying error actually is so I could cast it, it's some kind of rpc error but couldn't really figure out where it's coming from. I'll dig some more tomorrow.
pkg/controller/bind/controller.go
Outdated
functionDNS := route.Status.Domain | ||
if route != nil { | ||
functionDNS = route.Status.Domain | ||
glog.Infof("Found route DNS as '%q'", functionDNS) |
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.
you don't need to quote %q
:)
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.
doh. I knew that.
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!
pkg/controller/bind/controller.go
Outdated
accessor, err := meta.Accessor(bind) | ||
if err != nil { | ||
log.Printf("Failed to get metadata: %s", err) | ||
panic("Failed to get metadata") |
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.
done
pkg/controller/bind/controller.go
Outdated
functionDNS := route.Status.Domain | ||
if route != nil { | ||
functionDNS = route.Status.Domain | ||
glog.Infof("Found route DNS as '%q'", functionDNS) |
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.
doh. I knew that.
pkg/sources/gcp_pubsub.go
Outdated
return err | ||
glog.Warningf("Failed to delete subscription %q : %s : %q", subscriptionName, err) | ||
// If it's already been deleted, don't error out | ||
if !strings.Contains(err.Error(), "Resource not found") { |
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.
I can't figure out how to get the fields of the error because it's just an error. I tried to hunt a little to figure out what the underlying error actually is so I could cast it, it's some kind of rpc error but couldn't really figure out where it's coming from. I'll dig some more tomorrow.
/lgtm |
/approve |
/lgtm |
/approve |
1 similar comment
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattmoor, mchmarny, vaikas-google 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 |
Includes the following changes: 8fc80de Few changes to the configmap package (knative#59) 0122abd The test logger will now log the correct caller (knative#63) e7a4b0d Dont call flag.parse in pkg/test (knative#62) b213523 Update test-infra dependency (knative#61) 382a2bf Make kube_checks generic so that it can be used in serving (knative#58) 760afb6 cleanup (knative#57) eedc0a9 Make verify-codegen.sh compatible with OS X (knative#54) 6eff182 Remove docker repo from e2e flags (knative#53) 4be5c07 Vendor the test-infra scripts (knative#52) 8c687df Update WaitForEndpointState to return response (knative#51) 8f6a3be Update knative/pkg/test (knative#50) 3ca4270 Add a logkey for the reconcile key. (knative#49) 62d2560 Add Istio DestinationRule and Policy into Istio apis and clients (knative#43) f4a77d7 Add a common test clients file (knative#46) 450739d Add common test logging module (knative#45
* bump knative/pkg to 8fc80de Includes the following changes: 8fc80de Few changes to the configmap package (#59) 0122abd The test logger will now log the correct caller (#63) e7a4b0d Dont call flag.parse in pkg/test (#62) b213523 Update test-infra dependency (#61) 382a2bf Make kube_checks generic so that it can be used in serving (#58) 760afb6 cleanup (#57) eedc0a9 Make verify-codegen.sh compatible with OS X (#54) 6eff182 Remove docker repo from e2e flags (#53) 4be5c07 Vendor the test-infra scripts (#52) 8c687df Update WaitForEndpointState to return response (#51) 8f6a3be Update knative/pkg/test (#50) 3ca4270 Add a logkey for the reconcile key. (#49) 62d2560 Add Istio DestinationRule and Policy into Istio apis and clients (#43) f4a77d7 Add a common test clients file (#46) 450739d Add common test logging module (#45 * Use updated methods that indicate that the configmap.Watcher is using an informer
Adding finalizers
Co-authored-by: Stavros Kontopoulos <st.kontopoulos@gmail.com>
Fixes Issue #
Proposed Changes