serving icon indicating copy to clipboard operation
serving copied to clipboard

Tests for multi-container readiness and liveness probes

Open mgencur opened this issue 9 months ago • 6 comments

Fixes #14869 Fixes #12480

Proposed Changes

  • Remove misleading comment about multi-container Probes (they're now allowed for all containers)
  • Test readiness/liveness probes with sidecars (sidecar 1: Readiness probe, sidecar 2: Liveness, sidecar 3: Readiness + Liveness)
    • The final HTTP requests propagates through all the containers
    • Delay Readiness for one of the sidecars
  • Test for different types of probes (TCPSocket, HTTPGet+Exec, GRPC)
  • Test sidecar container being ready and then going unready, checking that Endpoints are properly removed from the private service.
  • For liveness probe, test happy-path scenarios for different types of probes for sidecars.
  • Test liveness probe "failure" for HTTPGet probe, but only for the user-container.

Release Note


mgencur avatar May 02 '24 12:05 mgencur

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 84.74%. Comparing base (c2d0af1) to head (0a8c9ac). Report is 91 commits behind head on main.

Files Patch % Lines
pkg/testing/v1/service.go 0.00% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15180      +/-   ##
==========================================
+ Coverage   84.11%   84.74%   +0.63%     
==========================================
  Files         213      218       +5     
  Lines       16783    13472    -3311     
==========================================
- Hits        14117    11417    -2700     
+ Misses       2315     1688     -627     
- Partials      351      367      +16     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 02 '24 12:05 codecov[bot]

The test for liveness probe failure was inspired by https://github.com/knative/serving/pull/12497. The issues that were blocking the original PR were either resolved (the main one) or I found a workaround (the test issue).

mgencur avatar May 03 '24 12:05 mgencur

LGTM, I can approve once https://github.com/knative/serving/actions/runs/8965592118/job/24619389624?pr=15180 passes.

ReToCode avatar May 06 '24 11:05 ReToCode

@dsimansk mind approving the above? @dprotaso is on PTO and the pkg/apis change is only a (now invalid) comment.

ReToCode avatar May 06 '24 12:05 ReToCode

This PR removes an invalid comment about container probes here Multi-container probes were added in https://github.com/knative/serving/pull/14853

@dsimansk @dprotaso Could any of you approve this change? Thanks

mgencur avatar May 06 '24 12:05 mgencur

/approve /lgtm

dsimansk avatar May 07 '24 08:05 dsimansk

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dsimansk, mgencur, ReToCode

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[bot] avatar May 07 '24 08:05 knative-prow[bot]