Skip to content

Adds progressDeadline annotation on per revision basis - #12751

Merged
knative-prow-robot merged 8 commits into
knative:mainfrom
psschwei:progress-deadline
Mar 26, 2022
Merged

knative-prow-robot merged 8 commits into
knative:mainfrom
psschwei:progress-deadline

Conversation

@psschwei

@psschwei psschwei commented Mar 18, 2022 •

Copy link
Copy Markdown
Member

Signed-off-by: Paul S. Schweigert [email protected]

Fixes #12743

Proposed Changes

This PR allows setting the progress-deadline on each revision by passing
an annotation, serving.knative.dev/progress-deadline. It aims to
improve the experience where revisions don't fail until the
progressDeadline is reached, which by default is 10 minutes. Not
everyone necessarily wants to wait that long, but previously the only
resource was for the cluster admin to lower the deadline
universally (i.e. change the default). With this change, we allow users
to "fail fast", if they so desire.

Release Note

Users can configure a per-revision progress deadline by setting the `serving.knative.dev/progress-deadline` annotation in `.spec.template.metadata.annotations` 

/assign @dprotaso

Signed-off-by: Paul S. Schweigert <[email protected]>

This PR allows setting the progress-deadline on each revision by passing
an annotation, autoscaling.knative.dev/progressDeadline. It aims to
improve the experience where revisions don't fail until the
progressDeadline is reached, which by default is 10 minutes. Not
everyone necessarily wants to wait that long, but previously the only
resource was for the cluster admin to lower the deadline
universally (i.e. change the default). With this change, we allow users
to "fail fast", if they so desire.
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/API API objects and controllers area/autoscale labels Mar 18, 2022
@codecov

codecov Bot commented Mar 18, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #12751 (f666ccc) into main (53a6a6f) will increase coverage by 0.18%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main   #12751      +/-   ##
==========================================
+ Coverage   87.31%   87.49%   +0.18%     
==========================================
  Files         196      196              
  Lines        9750     9782      +32     
==========================================
+ Hits         8513     8559      +46     
+ Misses        951      935      -16     
- Partials      286      288       +2     
Impacted Files Coverage Δ
pkg/apis/autoscaling/v1alpha1/pa_lifecycle.go 100.00% <100.00%> (ø)
pkg/apis/serving/v1/revision_validation.go 89.21% <100.00%> (+1.71%) ⬆️
pkg/apis/serving/v1/route_validation.go 97.70% <100.00%> (-0.03%) ⬇️
pkg/apis/serving/v1/service_validation.go 100.00% <100.00%> (ø)
pkg/reconciler/autoscaling/kpa/scaler.go 89.04% <100.00%> (+0.30%) ⬆️
pkg/reconciler/revision/resources/deploy.go 96.99% <100.00%> (+0.11%) ⬆️
pkg/reconciler/gc/gc.go 94.59% <0.00%> (-2.47%) ⬇️
pkg/autoscaler/statserver/server.go 77.66% <0.00%> (-1.95%) ⬇️
pkg/reconciler/configuration/configuration.go 84.61% <0.00%> (-1.54%) ⬇️
pkg/autoscaler/config/config.go 97.91% <0.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53a6a6f...f666ccc. Read the comment docs.

@psschwei

Copy link
Copy Markdown
Member Author

/test pull-knative-serving-unit-tests

Signed-off-by: Paul S. Schweigert <[email protected]>
@psschwei

Copy link
Copy Markdown
Member Author

/assign @nader-ziada

@nader-ziada

Copy link
Copy Markdown
Member

nice PR,

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 21, 2022
Comment thread pkg/apis/autoscaling/register.go Resolved
@dprotaso

Copy link
Copy Markdown
Member

sorry - clicked comment vs add review - I still have more to review but I need to step out right now so I'll revisit this later tonight

Comment thread pkg/apis/autoscaling/register.go Resolved
Comment thread pkg/apis/autoscaling/register.go Resolved
Paul S. Schweigert added 3 commits March 23, 2022 16:37
Signed-off-by: Paul S. Schweigert <[email protected]>
Signed-off-by: Paul S. Schweigert <[email protected]>
Signed-off-by: Paul S. Schweigert <[email protected]>
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 24, 2022
@psschwei

Copy link
Copy Markdown
Member Author

/retest

@psschwei

Copy link
Copy Markdown
Member Author

/test istio-latest-no-mesh-tls_serving_main
/test istio-latest-no-mesh_serving_main

@dprotaso

Copy link
Copy Markdown
Member

I think we should consider changing the group name of the key to be serving since the progress deadline isn't really specific to autoscaling

serving.knative.dev/progress-deadline

Long term we could expose this as field on the revision

@psschwei

psschwei commented Mar 25, 2022 •

Copy link
Copy Markdown
Member Author

consider changing the group name of the key to be serving

I went back and forth (and back again) on this when I was putting the PR together. I ended up using autoscaling primarily because the annotation was going through the PodAutoscaler and thought it might be less confusing to have the keys all use the same prefix (though since the value is pulled from the deployments configmap, it may be six in one/half-dozen in the other). Having said that, I do think serving as a group name makes more sense (esp. from an end-user perspective), so I'm good with making that change.

Signed-off-by: Paul S. Schweigert <[email protected]>
Comment thread pkg/apis/autoscaling/register.go Resolved
Signed-off-by: Paul S. Schweigert <[email protected]>
@nader-ziada

Copy link
Copy Markdown
Member

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2022
Comment thread pkg/apis/serving/v1/route_validation.go Resolved
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2022
@dprotaso

Copy link
Copy Markdown
Member

/lgtm
/approve

Thanks!

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2022
@knative-prow-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 25, 2022
@dprotaso

Copy link
Copy Markdown
Member
Error: error processing import paths in "test/test_images/timeout/service.yaml": error resolving image references: PATCH https://gcr.io/v2/knative-boskos-08/serving-e2e-img/12901/timeout/blobs/uploads/AJAD5v3mtkHj6qVnDr3YuXJk8y5r-N5Ad1GskqN-_oIl-cXikR730oSv05dou5shJgJN6VtGj9e6ezSAiuxT5YQ: UNKNOWN: Unable to determine the upload's size.
2022/03/25 23:15:47 error during command execution:error processing import paths in "test/test_images/timeout/service.yaml": error resolving image references: PATCH https://gcr.io/v2/knative-boskos-08/serving-e2e-img/12901/timeout/blobs/uploads/AJAD5v3mtkHj6qVnDr3YuXJk8y5r-N5Ad1GskqN-_oIl-cXikR730oSv05dou5shJgJN6VtGj9e6ezSAiuxT5YQ: UNKNOWN: Unable to determine the upload's size.

weird flake uploading the image
/retest

@knative-prow-robot
knative-prow-robot merged commit 0bc4171 into knative:main Mar 26, 2022
@psschwei
psschwei deleted the progress-deadline branch August 10, 2022 15:47
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 area/autoscale lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make ProgressDeadlineSeconds configurable per service

4 participants