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

Adds progressDeadline annotation on per revision basis #12751

Merged
merged 8 commits into from
Mar 26, 2022

Conversation

psschwei
Copy link
Contributor

@psschwei psschwei commented Mar 18, 2022

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
Copy link

codecov bot commented Mar 18, 2022

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
Contributor Author

/test pull-knative-serving-unit-tests

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

/assign @nader-ziada

@nader-ziada
Copy link
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
@dprotaso
Copy link
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

pkg/apis/autoscaling/register.go Outdated Show resolved Hide resolved
pkg/apis/autoscaling/annotation_validation_test.go Outdated Show resolved Hide resolved
pkg/apis/autoscaling/register.go Outdated Show resolved Hide resolved
pkg/reconciler/autoscaling/kpa/scaler.go Show resolved Hide resolved
pkg/reconciler/revision/resources/deploy.go Outdated Show resolved Hide resolved
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
Contributor Author

/retest

@psschwei
Copy link
Contributor Author

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

@dprotaso
Copy link
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
Copy link
Contributor Author

psschwei commented Mar 25, 2022

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]>
Signed-off-by: Paul S. Schweigert <[email protected]>
@nader-ziada
Copy link
Member

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2022
pkg/apis/serving/v1/service_validation.go Outdated Show resolved Hide resolved
pkg/apis/serving/v1/route_validation.go Outdated Show resolved Hide 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
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
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

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
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