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

Regression in readiness path handling causes parsing error #15673

Open
georeeve opened this issue Jan 8, 2025 · 2 comments · May be fixed by #15681
Open

Regression in readiness path handling causes parsing error #15673

georeeve opened this issue Jan 8, 2025 · 2 comments · May be fixed by #15681
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@georeeve
Copy link

georeeve commented Jan 8, 2025

We have recently updated Knative, and have encountered an error with our readiness probe after upgrading past version v1.12.0. This seems to occur when omitting a leading slash in the readiness HTTP path.

What version of Knative?

v12.0.0

Expected Behavior

The readiness probe passes.

Actual Behavior

The readiness probe errors with error constructing probe url parse "HTTP://127.0.0.1:3000ping": invalid port ":3000ping" after host

Steps to Reproduce the Problem

We have a readiness probe defined with the following YAML:

readiness:
  path: 'ping'
  portName: http1

Adding a leading slash to the path resolves the error:

readiness:
  path: '/ping'
  portName: http1

I don't have any experience with the Knative codebase, but I took a look at the release notes of v1.12.0 to see if I could find any related PRs. PR #14273 changed the probe path handling logic, and it looks like it could have caused this issue. @nak3 as you created that PR, do you think it could have caused this error?

I know that this release was a while ago, and that supporting paths without a leading slash may not have been originally intended; but as users may have relied on this, could the previous behaviour be reinstated to resolve this currently breaking change?

@georeeve georeeve added the kind/bug Categorizes issue or PR as related to a bug. label Jan 8, 2025
@nak3
Copy link
Contributor

nak3 commented Jan 9, 2025

I don't have any experience with the Knative codebase, but I took a look at the release notes of v1.12.0 to see if I could find any related PRs. PR #14273 changed the probe path handling logic, and it looks like it could have caused this issue. @nak3 as you created that PR, do you think it could have caused this error?

Oh, I’m sorry. Yes, I think the behavior changed with #14273.
As you also mentioned, supporting paths without a leading slash may not have been originally intended, and I hadn’t anticipated such a configuration either.

I know that this release was a while ago, and that supporting paths without a leading slash may not have been originally intended; but as users may have relied on this, could the previous behaviour be reinstated to resolve this currently breaking change?

Apologies, but I have moved on to another company and project, so I leave the decision of whether to change it to the current maintainers.

@skonto
Copy link
Contributor

skonto commented Jan 9, 2025

Hi @nak3!!! Hope you are doing great :) @georeeve hi, Afaik K8s supports both types of paths, with or without a leading "/", both are valid it seems. So I think we could fix this to keep it compatible. cc @dprotaso any objections?

@skonto skonto linked a pull request Jan 10, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants