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

Increase default value of cache TTL to 6 hours. #107141

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

mk46
Copy link
Member

@mk46 mk46 commented Dec 20, 2021

Increase default value of cache TTL to 6 hours.

Fixes #107130

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Increase default value of discovery cache TTL for kubectl to 6 hours.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 20, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @mk46. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 20, 2021
@mk46
Copy link
Member Author

mk46 commented Dec 20, 2021

/kind feature
/release-note-none

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. release-note-none Denotes a PR that doesn't merit a release note. sig/cli Categorizes an issue or PR as relevant to SIG CLI. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 20, 2021
@@ -439,13 +447,21 @@ func NewConfigFlags(usePersistentConfig bool) *ConfigFlags {
// given 25 groups (our groups + a few custom resources) with one-ish version each, discovery needs to make 50 requests
// double it just so we don't end up here again for a while. This config is only used for discovery.
discoveryBurst: 100,
CacheTTL: durationPtr(1 * time.Hour),
Copy link
Contributor

Choose a reason for hiding this comment

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

In my opinion the default can even be a full day. CRDs don't change that often and if a GVK can't be found in the cache, the cache is rendered invalid and repopulated anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think, let cache-ttl default to 1 hour and we also have a configuration option for the same. 1 day looks very long duration.

Copy link
Contributor

@jonnylangefeld jonnylangefeld left a comment

Choose a reason for hiding this comment

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

This looks good to me. The default can be increased though IMO.

@MadhavJivrajani
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 7, 2022
@mk46
Copy link
Member Author

mk46 commented Jan 7, 2022

/test pull-kubernetes-e2e-kind-ipv6

@mk46
Copy link
Member Author

mk46 commented Jan 11, 2022

/assign @soltysh

@mk46
Copy link
Member Author

mk46 commented Jan 27, 2022

@KnVerey @soltysh PTAL

@eddiezane
Copy link
Member

Hi @mk46 - please edit the top level comment to follow the initial pull request template. Specifically we need the release note block.

/assign

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Feb 17, 2022
@k8s-ci-robot k8s-ci-robot removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 3, 2022
@soltysh
Copy link
Contributor

soltysh commented Mar 3, 2022

@mk46 when you get this updated please ping me on slack to get my immediate attention on this PR :) Thank you!

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 3, 2022
@k8s-ci-robot k8s-ci-robot added the area/dependency Issues or PRs related to dependency changes label Mar 3, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Mar 3, 2022
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 3, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jonnylangefeld, mk46, soltysh

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 3, 2022
@mk46 mk46 changed the title Add cache-ttl flag to increase ttl of discovery cache Increase default value of cache TTL to 6 hours. Mar 3, 2022
@eddiezane
Copy link
Member

I think the flake is this #108010

/retest

@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

@sali2801
Copy link

sali2801 commented Sep 18, 2022

is this PR only for diskcache? or even for memCache?

YitzyD pushed a commit to YitzyD/kubernetes that referenced this pull request Mar 1, 2023
Increase default value of cache TTL to 6 hours.
YitzyD pushed a commit to YitzyD/kubernetes that referenced this pull request Mar 1, 2023
Increase default value of cache TTL to 6 hours.
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/dependency Issues or PRs related to dependency changes cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cli Categorizes an issue or PR as relevant to SIG CLI. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make ttl of discovery cache configurable and raise default
8 participants