progress-deadline annotation accepts "0s" although validation says it must be positive
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
Start with RevisionTemplateSpec.Validate and TestRevisionTemplateSpecValidation, which the issue names. Check how the negative progress-deadline value is validated and add coverage for 0s. Done means the validation rejects 0s with progress-deadline=0s must be positive, and the relevant test passes.
Written by the indexing model from the issue text.
Description
/kind bug
/area API
What version of Knative?
main (8045f4b)
Actual Behavior
RevisionTemplateSpec.Validate returns no error for serving.knative.dev/progress-deadline: "0s". A negative value is rejected with progress-deadline=-1m3s must be positive, and config-deployment already refuses progress-deadline: 0s ("cannot be a non-positive duration").
The annotation is copied into the Deployment: MakeDeployment on main gives Deployment.spec.progressDeadlineSeconds = 0. Kubernetes' ValidateDeploymentSpec requires progressDeadlineSeconds to be greater than minReadySeconds (0 here), so that Deployment would be rejected.
Expected Behavior
The webhook rejects it: progress-deadline=0s must be positive.
Steps to Reproduce the Problem
- Add
serving.knative.dev/progress-deadline: "0s"tospec.template.metadata.annotationsof a Service. - The Service is admitted. (Unit level: a
"0s"case inTestRevisionTemplateSpecValidationexpects an error and gets none.)
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 1.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 51
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from knative/serving
-
envFrom validation errors have no entry index, and their paths are garbled when several entries are invalidPossibly taken @BahaaMattar claimed this today. Openarea/API kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
auto:flaky
Difficulty 4/5 3-5 days Newbie friendliness 35/100
knative/serving#16789 · 1 comment ·
Maintainers usually reply within 1 day
-
auto:flaky
Difficulty 3/5 1-2 days Newbie friendliness 55/100
knative/serving#16788 · 1 comment ·
Maintainers usually reply within 1 day
-
auto:flaky
Difficulty 4/5 3-5 days Newbie friendliness 25/100
knative/serving#16787 · 1 comment ·
Maintainers usually reply within 1 day
-
area/API area/autoscale kind/feature
Difficulty 5/5 Over a week Newbie friendliness 38/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
api cleanup
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
router-for-me/CLIProxyAPI#7708 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100