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

Check all container's status when calculating revision ContainerHealthy condition #14744

Conversation

seongpyoHong
Copy link
Contributor

Fixes #14567

Release Note

Check all container's status when calculating revision ContainerHealthy condition

Copy link

knative-prow bot commented Dec 23, 2023

Hi @seongpyoHong. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/API API objects and controllers labels Dec 23, 2023
Copy link

codecov bot commented Dec 23, 2023

Codecov Report

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

Project coverage is 84.13%. Comparing base (88abc84) to head (9bc98bf).
Report is 28 commits behind head on main.

Files Patch % Lines
pkg/reconciler/revision/reconcile_resources.go 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14744      +/-   ##
==========================================
+ Coverage   84.08%   84.13%   +0.05%     
==========================================
  Files         213      213              
  Lines       16687    16687              
==========================================
+ Hits        14031    14040       +9     
+ Misses       2303     2299       -4     
+ Partials      353      348       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 4, 2024
@dprotaso
Copy link
Member

/hold

I want to fix #14660 prior

@knative-prow knative-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 12, 2024
@dprotaso
Copy link
Member

Still holding for now see: #14567 (comment)

A serving point release came out two weeks ago - that might have fixed the original issue.

Copy link
Member

@dprotaso dprotaso left a comment

Choose a reason for hiding this comment

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

It also looks like reconciling the PodAutoscaler will mask the container failures

You'll want to update resUnavailable here to also be true if the container isn't healthy

resUnavailable := rs.GetCondition(RevisionConditionResourcesAvailable).IsFalse()

go.mod Outdated
@@ -34,7 +34,7 @@ require (
k8s.io/utils v0.0.0-20230209194617-a36077c30491
knative.dev/caching v0.0.0-20231219125158-cb270b3a43b8
knative.dev/hack v0.0.0-20231201014241-7030d5bf584d
knative.dev/networking v0.0.0-20231218143655-3f2ee2a60c6d
knative.dev/networking v0.0.0-20231219131858-8c7897c8b9a0
Copy link
Member

Choose a reason for hiding this comment

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

can you drop these go.mod changes from your PR

@@ -106,7 +106,7 @@ func (c *Reconciler) reconcileDeployment(ctx context.Context, rev *v1.Revision)
}

for _, status := range pod.Status.ContainerStatuses {
if status.Name == rev.Spec.GetContainer().Name {
if status.Name != resources.QueueContainerName {
Copy link
Member

Choose a reason for hiding this comment

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

You'll need to adjust the break on line 123. Otherwise if the failing sidecar container is second in the containerStatuses list it won't fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we don't need to use break anymore, but I changed the position of break for fast fail.

@dprotaso
Copy link
Member

dprotaso commented Mar 8, 2024

Still holding for now see: #14567 (comment)

A serving point release came out two weeks ago - that might have fixed the original issue.

The other fix didn't address the issue this PR addresses

/hold cancel

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 8, 2024
@dprotaso
Copy link
Member

dprotaso commented Mar 8, 2024

/ok-to-test

@knative-prow knative-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 8, 2024
@seongpyoHong seongpyoHong force-pushed the handle-all-containers-status-when-calculate-rev-status branch from 4a9adae to 9bc98bf Compare March 11, 2024 14:40
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 11, 2024
@knative-prow knative-prow bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 11, 2024
@seongpyoHong
Copy link
Contributor Author

@dprotaso Sorry for the late reply.

I've fixed and rebased it to reflect your feedback.

@dprotaso
Copy link
Member

@seongpyoHong thanks for the changes

/lgtm
/approve

Are you able to follow up by adding a unit test or an e2e test?

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 26, 2024
Copy link

knative-prow bot commented Mar 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, seongpyoHong

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 knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 26, 2024
@knative-prow knative-prow bot merged commit 231db15 into knative:main Mar 26, 2024
49 checks passed
@seongpyoHong
Copy link
Contributor Author

Are you able to follow up by adding a unit test or an e2e test?

Sure, I will also add the unit test and e2e test.

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. area/API API objects and controllers lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sidecar container's status isn't propagated to Kservice
3 participants