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

message receiver supports customized liveness and readiness check #4707

Merged
merged 4 commits into from
Jan 11, 2021

Conversation

grac3gao-zz
Copy link
Contributor

@grac3gao-zz grac3gao-zz commented Jan 8, 2021

Fixes #

Proposed Changes

Message receiver uses Drainer to run liveness and readiness check. Previously, when the Pod is not in draining status, Drainer directly writes statusOK to kube probe request, without going through the inner handler logic. This makes any customized health check in inner handler useless.

Now that Drainer supports customized check, let message receiver support it as well. This would help users who want to use kn event message receiver and in the time want to configure their own check.

Release Note

message receiver supports customized liveness and readiness check 

Docs

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Jan 8, 2021
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 8, 2021
@grac3gao-zz
Copy link
Contributor Author

/cc @Harwayne

@codecov
Copy link

codecov bot commented Jan 8, 2021

Codecov Report

Merging #4707 (cedf394) into master (79344e8) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4707      +/-   ##
==========================================
- Coverage   81.07%   81.02%   -0.05%     
==========================================
  Files         291      291              
  Lines        8216     8221       +5     
==========================================
  Hits         6661     6661              
- Misses       1154     1159       +5     
  Partials      401      401              
Impacted Files Coverage Δ
pkg/kncloudevents/message_receiver.go 0.00% <0.00%> (ø)

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 79344e8...cedf394. Read the comment docs.

@devguyio
Copy link
Contributor

devguyio commented Jan 8, 2021

/assign

Copy link
Contributor

@devguyio devguyio left a comment

Choose a reason for hiding this comment

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

  1. Do you mind adding a release note to the PR description so that downstream developers know the new release added healthcheck draining to the HTTPMessageReceiver. You can find the template here
  2. Are there suggestions how to use the health checks for the core components? IMC, my-broker, sources, etc.?
  3. I presume you need this downstream somewhere, I'm interested to know the use case.

pkg/kncloudevents/message_receiver.go Outdated Show resolved Hide resolved
pkg/kncloudevents/message_receiver.go Outdated Show resolved Hide resolved
pkg/kncloudevents/message_receiver.go Outdated Show resolved Hide resolved
@knative-prow-robot knative-prow-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 9, 2021
@devguyio
Copy link
Contributor

@grac3gao this needs rebase, lgtm now and thanks for adding those

@zhongduo
Copy link
Contributor

@devguyio has lgtm and this is just rebased.
/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 11, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: grac3gao, zhongduo

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 11, 2021
@devguyio
Copy link
Contributor

/lgtm

@slinkydeveloper
Copy link
Contributor

In order to align the deps for 0.20 release, I had to remove the change brought in by this PR #4724

Can you PR these changes again?

@grac3gao-zz
Copy link
Contributor Author

grac3gao-zz commented Jan 12, 2021

In order to align the deps for 0.20 release, I had to remove the change brought in by this PR #4724

Can you PR these changes again?

So....it should be fine (doesn't have any alignment needs) if I submit a new PR to update deps after your PR #4724? @slinkydeveloper

@slinkydeveloper
Copy link
Contributor

Yeah just go ahead and add again the code I removed targeting master and ping me in that PR, i'll merge it. Sorry for the inconvenient, seems like in this release process we cannot merge PRs with dep updates (except the automated ones) between the pkg cut and the eventing cut)

grac3gao-zz pushed a commit to grac3gao-zz/eventing that referenced this pull request Jan 12, 2021
@grac3gao-zz grac3gao-zz mentioned this pull request Jan 12, 2021
@grac3gao-zz
Copy link
Contributor Author

grac3gao-zz commented Jan 12, 2021

@slinkydeveloper #4730 is for this PR, thank you!

knative-prow-robot pushed a commit that referenced this pull request Jan 13, 2021
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants