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

fix: add back the --sync-period flag #1506

Merged
merged 1 commit into from
Jul 8, 2021
Merged

fix: add back the --sync-period flag #1506

merged 1 commit into from
Jul 8, 2021

Conversation

shaneutt
Copy link
Contributor

@shaneutt shaneutt commented Jul 7, 2021

What this PR does / why we need it:

This patch adds the --sync-period flag back and delivers
the provided time duration to controller runtime, which
now in v2 handles the relevant client-go configuration on
our behalf (whereas in v1 we used it directly).

This intentionally uses the same settings that V1 established
(instead of the defaults provided by controller-runtime) to avoid
change where we don't otherwise have any data influencing us
to pick a new setting.

More context can be seen in this relevant comment.

Which issue this PR fixes

Fixes #1309

@shaneutt shaneutt temporarily deployed to Configure ci July 7, 2021 18:24 Inactive
@shaneutt shaneutt self-assigned this Jul 7, 2021
@shaneutt shaneutt added area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. priority/medium labels Jul 7, 2021
@shaneutt shaneutt linked an issue Jul 7, 2021 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jul 7, 2021

Codecov Report

Merging #1506 (a2f0c76) into next (5b70852) will increase coverage by 0.18%.
The diff coverage is 100.00%.

❗ Current head a2f0c76 differs from pull request most recent head f3111a6. Consider uploading reports for the commit f3111a6 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1506      +/-   ##
==========================================
+ Coverage   51.46%   51.65%   +0.18%     
==========================================
  Files          91       91              
  Lines        6299     6300       +1     
==========================================
+ Hits         3242     3254      +12     
+ Misses       2764     2754      -10     
+ Partials      293      292       -1     
Flag Coverage Δ
integration-test 49.34% <100.00%> (+0.81%) ⬆️
unit-test 38.88% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
railgun/manager/run.go 70.63% <100.00%> (+0.10%) ⬆️
railgun/pkg/config/config.go 93.02% <100.00%> (ø)
...trollers/configuration/zz_generated_controllers.go 47.83% <0.00%> (ø)
railgun/internal/ctrlutils/ingress-status.go 64.65% <0.00%> (+1.72%) ⬆️
railgun/internal/diagnostics/server.go 78.78% <0.00%> (+21.21%) ⬆️

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 5b70852...f3111a6. Read the comment docs.

@shaneutt shaneutt marked this pull request as ready for review July 7, 2021 18:37
@shaneutt shaneutt requested a review from a team as a code owner July 7, 2021 18:37
@shaneutt shaneutt temporarily deployed to Configure ci July 7, 2021 19:22 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci July 7, 2021 19:22 Inactive
Copy link
Contributor

@ccfishk ccfishk left a comment

Choose a reason for hiding this comment

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

Need function/code use the new configuration ControllerOpts.SyncPeriod

@shaneutt shaneutt requested a review from ccfishk July 8, 2021 13:41
@shaneutt shaneutt temporarily deployed to Configure ci July 8, 2021 13:41 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci July 8, 2021 13:41 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci July 8, 2021 14:10 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci July 8, 2021 14:10 Inactive
Copy link
Contributor

@rainest rainest left a comment

Choose a reason for hiding this comment

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

Per kubernetes-sigs/controller-runtime#521 we may want to revert to the default. The original was probably arbitrary--no way to know for sure, as it was there from the start and presumably just copied from the NGINX controller settings. However, they've since disabled it entirely kubernetes/ingress-nginx#2634

It looks like this was a workaround for client-go issues that are no longer present, and shorter times may cause issues. However, we also have no known reports of issues, so 🤷

@shaneutt
Copy link
Contributor Author

shaneutt commented Jul 8, 2021

Per kubernetes-sigs/controller-runtime#521 we may want to revert to the default. The original was probably arbitrary--no way to know for sure, as it was there from the start and presumably just copied from the NGINX controller settings. However, they've since disabled it entirely kubernetes/ingress-nginx#2634

It looks like this was a workaround for client-go issues that are no longer present, and shorter times may cause issues. However, we also have no known reports of issues, so shrug

Good find on that issue, I'll change the default.

@shaneutt shaneutt temporarily deployed to Configure ci July 8, 2021 15:27 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci July 8, 2021 15:28 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci July 8, 2021 15:28 Inactive
@shaneutt shaneutt temporarily deployed to Configure ci July 8, 2021 15:28 Inactive
This patch adds the --sync-period flag back and delivers
the provided time duration to controller runtime, which
now in v2 handles the relevant client-go configuration on
our behalf (whereas in v1 we used it directly).

We now use the default value of 48 hours instead of the
value we previously used in v1 of 10 minutes, as per the
improvements and context relevant to the setting which make
relying on it no longer necessary.

See also: kubernetes-sigs/controller-runtime#521
@shaneutt shaneutt temporarily deployed to Configure ci July 8, 2021 15:29 Inactive
@ccfishk ccfishk added the bug Something isn't working label Jul 8, 2021
@shaneutt shaneutt temporarily deployed to Configure ci July 8, 2021 15:29 Inactive
Copy link
Contributor

@ccfishk ccfishk left a comment

Choose a reason for hiding this comment

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

one more minor request for the note of the configuration item

@shaneutt shaneutt requested a review from ccfishk July 8, 2021 16:00
Copy link
Contributor

@ccfishk ccfishk left a comment

Choose a reason for hiding this comment

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

thanks for fixing the bug.

@shaneutt shaneutt merged commit 4896df7 into next Jul 8, 2021
@shaneutt shaneutt deleted the v2-sync-period branch July 8, 2021 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. bug Something isn't working ci/license/unchanged priority/medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KIC 2.0: handle sync-period flag
3 participants