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

[WIP] fix: http probe downgrades from http2 to http1 when it encounters an error #15436

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Cali0707
Copy link
Member

@Cali0707 Cali0707 commented Aug 1, 2024

Fixes #15432

Proposed Changes

  • If there is an error when making the OPTIONS request, try to check readiness for HTTP1

Release Note


…error

Signed-off-by: Calum Murray <cmurray@redhat.com>
@knative-prow knative-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 1, 2024
@knative-prow knative-prow bot requested review from izabelacg and skonto August 1, 2024 14:20
Copy link

knative-prow bot commented Aug 1, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Cali0707
Once this PR has been reviewed and has the lgtm label, please assign dprotaso for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@Cali0707
Copy link
Member Author

Cali0707 commented Aug 1, 2024

/cc @dprotaso

I made a start here, but I think I am still missing something...

Specifically, if the error on the options request is because the service isn't ready yet we should try the options request again. However, I wasn't sure the best way to do that and/or figure that out. Maybe it makes sense to track how many times the options request fails before we actually set the HTTP version on the probe config? That way, it would retry the options request a few times

WDYT?

@knative-prow knative-prow bot requested a review from dprotaso August 1, 2024 14:23
Copy link

codecov bot commented Aug 1, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 84.66%. Comparing base (222065d) to head (cd205ce).
Report is 2 commits behind head on main.

Files Patch % Lines
pkg/queue/health/probe.go 25.00% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15436      +/-   ##
==========================================
+ Coverage   84.54%   84.66%   +0.11%     
==========================================
  Files         219      219              
  Lines       13595    13600       +5     
==========================================
+ Hits        11494    11514      +20     
+ Misses       1734     1710      -24     
- Partials      367      376       +9     

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

Signed-off-by: Calum Murray <cmurray@redhat.com>
@Cali0707
Copy link
Member Author

Cali0707 commented Aug 1, 2024

I've tried to update it so that until a probe succeeds for either http1 or http2, we keep retrying the options request. This seems better, but there is still a chance of a race condition where:

  1. the options request fails because the service is not accepting requests yet
  2. the http1 probe we try succeeds because now the service started accepting requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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.

Queue Proxy health checks incompatible with non-HTTP/2 applications
1 participant