external-dns icon indicating copy to clipboard operation
external-dns copied to clipboard

Add flag for setting the cache sync timeout

Open idgenchev opened this issue 2 years ago • 4 comments

Description

Fixes #2999

Checklist

  • [X] Unit tests updated
  • [x] End user documentation updated

idgenchev avatar Sep 06 '22 12:09 idgenchev

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: idgenchev / name: Ivan Genchev (a0dcd2fd6e25bf14277a3eaafab5fed8b0712473)

Welcome @idgenchev!

It looks like this is your first PR to kubernetes-sigs/external-dns 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/external-dns has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Sep 06 '22 12:09 k8s-ci-robot

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: idgenchev Once this PR has been reviewed and has the lgtm label, please assign raffo for approval by writing /assign @raffo in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 avatar Sep 06 '22 12:09 k8s-ci-robot

@idgenchev: PR needs rebase.

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 avatar Sep 15 '22 12:09 k8s-ci-robot

Will this change be accepted? We are experiencing the same thing on several of our clusters.

skizot722 avatar Oct 03 '22 21:10 skizot722

Why you don't pass the TTL by using context.WithValue and have a huge change all over the place?

szuecs avatar Oct 05 '22 19:10 szuecs

Why you don't pass the TTL by using context.WithValue and have a huge change all over the place?

Hey Sandor, I do like your suggestion better and I'm happy to pass the value around this way. The reason I didn't use it initially was because it seemed like passing a parameter to the waitForCacheSync function, which is discouraged in the docs:

Use context Values only for request-scoped data that transits processes and APIs, not for passing optional parameters to functions.

idgenchev avatar Oct 07 '22 10:10 idgenchev

@Raffo @njuettner wdyt? Parameter or context ?

szuecs avatar Oct 08 '22 17:10 szuecs

@idgenchev I prefer this to be a parameter, I understand it's a lot of changes, but I like that the signature of the waitForCacheSync method it's very explicit about the fact that it can get a configurable parameter. If you rebase this PR, I can proceed with its review.

Raffo avatar Dec 10 '22 09:12 Raffo

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: idgenchev Once this PR has been reviewed and has the lgtm label, please assign raffo for approval by writing /assign @raffo in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 avatar Dec 13 '22 16:12 k8s-ci-robot

@idgenchev I prefer this to be a parameter, I understand it's a lot of changes, but I like that the signature of the waitForCacheSync method it's very explicit about the fact that it can get a configurable parameter. If you rebase this PR, I can proceed with its review.

sgtm, thanks @Raffo!

idgenchev avatar Dec 13 '22 16:12 idgenchev

Hi, I'm Sean and we've run into this problem recently at Datadog which caused some issues for us.

I opened #3209 to solve this before seeing your PR. This PR looks good to me, but I also added a separate flag for configuring dynamic cache timeouts. Could we bring that functionality into this PR, or should I open a second PR against this branch to do so?

seanduncandatadog avatar Dec 15 '22 16:12 seanduncandatadog

Hi, I'm Sean and we've run into this problem recently at Datadog which caused some issues for us.

I opened #3209 to solve this before seeing your PR. This PR looks good to me, but I also added a separate flag for configuring dynamic cache timeouts. Could we bring that functionality into this PR, or should I open a second PR against this branch to do so?

Hey @seanduncandatadog, thanks for pointing this out! It won't take long at all, so I'll add it here :)

idgenchev avatar Dec 15 '22 16:12 idgenchev

Thank you @idgenchev ! I will close #3209 👍

seanduncandatadog avatar Dec 16 '22 18:12 seanduncandatadog

@idgenchev I prefer this to be a parameter, I understand it's a lot of changes, but I like that the signature of the waitForCacheSync method it's very explicit about the fact that it can get a configurable parameter. If you rebase this PR, I can proceed with its review.

Hi @Raffo can you please advice if there is anything else outstanding for this PR to be merged? Thanks!

idgenchev avatar Feb 27 '23 14:02 idgenchev

PR needs rebase.

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 avatar Mar 16 '23 23:03 k8s-ci-robot

We are facing the same issue and would be nice to see this PR merged! Thanks

ra-grover avatar Apr 17 '23 15:04 ra-grover

Rebase is required. I reviewed the code and it looks straight forward, however no feature without test, so I miss the new test. I would also recommend to have somewhere set a DefaultCacheSyncTimeout and use that const instead of N times 60 * time.Second. Also great would be in case cache has 0 value to set it to the default, then we don't need to pass everywhere the 60s.

szuecs avatar Apr 26 '23 17:04 szuecs

Since there has been no activity on this PR since 6 months, I close it. It's not definitive : anyone needing it can re-open it. /close

mloiseleur avatar Dec 20 '23 15:12 mloiseleur

@mloiseleur: Closed this PR.

In response to this:

Since there has been no activity on this PR since 6 months, I close it. It's not definitive : anyone needing it can re-open it. /close

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 avatar Dec 20 '23 15:12 k8s-ci-robot