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

use drainer from pkg instead of our own health #3917

Merged
merged 2 commits into from
Oct 7, 2020

Conversation

vaikas
Copy link
Contributor

@vaikas vaikas commented Aug 24, 2020

Fixes #3912

Proposed Changes

Release Note

- 🐛 Fix bug
ingress / filter now handle proper k8s lifecycle.

Docs

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 24, 2020
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 24, 2020
@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 24, 2020
@@ -102,7 +102,7 @@ func NewHandler(logger *zap.Logger, triggerLister eventinglisters.TriggerLister,
//
// This method will block until ctx is done.
func (h *Handler) Start(ctx context.Context) error {
return h.receiver.StartListen(ctx, health.WithLivenessCheck(health.WithReadinessCheck(h)))
return h.receiver.StartListen(ctx, &handlers.Drainer{Inner: h})
Copy link
Member

Choose a reason for hiding this comment

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

I think that you need something that calls Drain() when ctx.Done() is closed, see: https://github.com/knative/pkg/blob/673521e55e5b9f081b672c2f97c81c31b1cd2ddc/webhook/webhook.go#L218-L228

Copy link
Contributor

Choose a reason for hiding this comment

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

ping @vaikas

@slinkydeveloper
Copy link
Contributor

@vaikas can you enable this feature in kncloudevents/message_receiver.go? This way, the feature is enabled automatically throughout all channels (IMC, kafka, natss and so on)

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 3, 2020
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 7, 2020
@codecov
Copy link

codecov bot commented Oct 7, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@deae30c). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3917   +/-   ##
=========================================
  Coverage          ?   65.77%           
=========================================
  Files             ?      316           
  Lines             ?    11004           
  Branches          ?        0           
=========================================
  Hits              ?     7238           
  Misses            ?     3341           
  Partials          ?      425           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update deae30c...3a50e5b. Read the comment docs.

@slinkydeveloper
Copy link
Contributor

slinkydeveloper commented Oct 7, 2020

/lgtm
/approve

Thanks for this one!

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 7, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: slinkydeveloper, vaikas

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:
  • OWNERS [slinkydeveloper,vaikas]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pkg/health doesn't properly implement K8s lifecycle
6 participants