progress-deadline annotation accepts "0s" although validation says it must be positive

Open Beginner friendly
#16,792 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@BahaaMattar is already working on this.

Since Nov 19, 2026.

  • #16793 by @BahaaMattar — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go, kubernetes
Domain
backend, testing

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

area/API kind/bug

/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

  1. Add serving.knative.dev/progress-deadline: "0s" to spec.template.metadata.annotations of a Service.
  2. The Service is admitted. (Unit level: a "0s" case in TestRevisionTemplateSpecValidation expects 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from knative/serving

All issues in knative/serving

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.