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

Git pillar update interval #53621

Merged
merged 3 commits into from Dec 23, 2019
Merged

Conversation

sathieu
Copy link
Contributor

@sathieu sathieu commented Jun 27, 2019

What does this PR do?

Add support for new config option git_pillar_update_interval so git_pillar data can be collected less frequently than the main loop_interval timer allows

What issues does this PR fix or reference?

This is based on work on #52274 by @Tanoti

Previous Behavior

Git pillar remotes would be checked using the loop_interval timer value (e.g. every 60 seconds).

New Behavior

Git pillar remotes can be checked using a different interval to the loop_interval. For example, if the git pillar data is not likely to change very often then a higher value such as 300 seconds could be used which would reduce the load on the git repo server by a factor of five.

Tests written?

No

Commits signed with GPG?

Yes

@sathieu sathieu requested a review from as a code owner Jun 27, 2019
@sathieu
Copy link
Contributor Author

@sathieu sathieu commented Jun 27, 2019

I don't know how to write tests for this...

@sathieu
Copy link
Contributor Author

@sathieu sathieu commented Jun 27, 2019

@waynew
Copy link
Contributor

@waynew waynew commented Jun 27, 2019

I'm not sure if there's any good way of automating the test, but a meaningful test would be to update the interval to something ridiculously short (1s? 3s?) and simply verify that it triggers an update the appropriate number of times within an interval.

@sathieu sathieu force-pushed the git_pillar_update_interval branch from 1278266 to d2c2535 Compare Oct 15, 2019
@sathieu sathieu changed the base branch from develop to master Oct 15, 2019
@sathieu sathieu force-pushed the git_pillar_update_interval branch 3 times, most recently from 20bfbec to e2f24c9 Compare Oct 15, 2019
salt/pillar/git_pillar.py Outdated Show resolved Hide resolved
@sathieu sathieu force-pushed the git_pillar_update_interval branch from fa3589d to a1844cf Compare Dec 21, 2019
@sathieu sathieu requested a review from dwoz Dec 21, 2019
@dwoz dwoz merged commit 7e4ab5e into saltstack:master Dec 23, 2019
49 checks passed
@sathieu
Copy link
Contributor Author

@sathieu sathieu commented Dec 24, 2019

@dwoz thanks!

@sathieu sathieu deleted the git_pillar_update_interval branch Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants