Skip to content

Create v2 GC settings#8615

Merged
knative-prow-robot merged 21 commits intoknative:masterfrom
whaught:gc-max
Jul 14, 2020
Merged

Create v2 GC settings#8615
knative-prow-robot merged 21 commits intoknative:masterfrom
whaught:gc-max

Conversation

@whaught
Copy link
Copy Markdown
Contributor

@whaught whaught commented Jul 13, 2020

Issue #8208

Proposed Changes

  • Creates a new setting for allowing users to specify a maximum number of revisions to retain.
    • Currently we aggressively delete all stale revisions after a given amount of time. This will allow users to instead specify a number they would like to keep around and potentially reduce the time-bounds to zero.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 13, 2020
@knative-prow-robot knative-prow-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. area/API API objects and controllers labels Jul 13, 2020
Copy link
Copy Markdown
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@whaught: 0 warnings.

Details

In response to this:

Issue #8208

Proposed Changes

  • Creates a new setting for allowing users to specify a maximum number of revisions to retain.
    • Currently we aggressively delete all stale revisions after a given amount of time. This will allow users to instead specify a number they would like to keep around and potentially reduce the time-bounds to zero.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 13, 2020
@whaught
Copy link
Copy Markdown
Contributor Author

whaught commented Jul 13, 2020

/hold

still needs unit test coverage for validation

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 13, 2020
Comment thread config/core/configmaps/gc.yaml Outdated
Comment thread config/core/configmaps/gc.yaml Outdated
Comment thread pkg/gc/config.go Outdated
cm.AsDuration("stale-revision-timeout", &c.StaleRevisionTimeout),
cm.AsDuration("stale-revision-lastpinned-debounce", &c.StaleRevisionLastpinnedDebounce),

cm.AsInt64("stale-revision-maximum-generations", &c.StaleRevisionMaximumGenerations),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some validation below is probably in order:
0 seems invalid value (with current -1 sentinel)
all negative but -1 are invalid as well.
Also max cannot be less than min?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 is actually a valid value. This is a count of inactive revisions only (not including actively referenced ones). The system will never consider active revisions for deletion and setting 0 would mean "delete everything as soon as it's not serving).

Similarly a min 0 would mean "delete everything that isn't active as soon as the staleness times have elapsed"

@vagababov
Copy link
Copy Markdown
Contributor

ugh :) you've repushed with validation

Comment thread pkg/gc/config.go Outdated
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 13, 2020
Comment thread config/core/configmaps/gc.yaml
Comment thread pkg/gc/config.go Outdated
Comment thread pkg/gc/config.go Outdated
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 13, 2020
@knative-test-reporter-robot
Copy link
Copy Markdown

The following jobs failed:

Test name Triggers Retries
pull-knative-serving-unit-tests 0/3

Failed non-flaky tests preventing automatic retry of pull-knative-serving-unit-tests:

pkg/gc.TestOurConfig
pkg/gc.TestOurConfig/Example_config
pkg/gc.TestOurConfig/With_value_overrides
pkg/gc.TestOurConfig/Below_minimum_timeout
pkg/gc.TestOurConfigWithResponsiveGC
pkg/gc.TestOurConfigWithResponsiveGC/Example_config
pkg/gc.TestOurConfigWithResponsiveGC/With_value_overrides
pkg/gc.TestOurConfigWithResponsiveGC/Invalid_maximum_generation

and 2 more.

@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 13, 2020
@whaught
Copy link
Copy Markdown
Contributor Author

whaught commented Jul 13, 2020

/unhold

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 13, 2020
@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on the affected files.
Say /test pull-knative-serving-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/gc/config.go 100.0% 94.7% -5.3

@whaught whaught changed the title Create a Maximum setting for revisions to retain Create v2 GC settings Jul 13, 2020
Copy link
Copy Markdown
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/assign @dprotaso @mattmoor

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 14, 2020
Copy link
Copy Markdown
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of drive-by nits.

Comment thread config/core/configmaps/gc.yaml Outdated
Comment thread config/core/configmaps/gc.yaml Outdated
Comment thread config/core/configmaps/gc.yaml Outdated
Comment thread pkg/gc/config.go Outdated
Comment thread pkg/gc/config.go Outdated
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 14, 2020
Copy link
Copy Markdown
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

I'm still puzzled by why the missing quotes didn't blow up our tests, but they look right and it's not your change's fault if they aren't 😅

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 14, 2020
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor, whaught

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 Jul 14, 2020
@knative-prow-robot knative-prow-robot merged commit fccf86b into knative:master Jul 14, 2020
@whaught whaught deleted the gc-max branch July 16, 2020 22:24
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 cla: yes Indicates the PR's author has signed the CLA. 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.

8 participants