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

WIP: Unhardcoded wait timeout for minion refresh event #61386

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Oloremo
Copy link
Contributor

@Oloremo Oloremo commented Dec 21, 2021

What does this PR do?

Unhardcoded wait timeout for minion refresh event

What issues does this PR fix or reference?

Partially Fixes: #20590

Previous Behavior

Timeout was hardcoded to 30 seconds

New Behavior

Timeout is 30 seconds by default but will be overridden if timeout argument was passed in saltutil.refresh_pillar for example.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@Oloremo Oloremo requested a review from a team as a code owner December 21, 2021 20:58
@Oloremo Oloremo requested review from krionbsd and removed request for a team December 21, 2021 20:58
salt/modules/saltutil.py Outdated Show resolved Hide resolved
@Oloremo Oloremo force-pushed the kp/refresh_grains_async branch 2 times, most recently from 6a46c3d to 9479da6 Compare December 22, 2021 14:33
@max-arnold
Copy link
Contributor

A similar feature was implemented for pillar: #56881

@Oloremo Oloremo changed the title WIP: Added an ability to refresh grains synchronously Jun 17, 2022
@Ch3LL Ch3LL added the P1 Priority 1 label Sep 19, 2022
@whytewolf
Copy link
Collaborator

@Oloremo thank you for the PR. looking at it does look like it changes the functionality in #56881 so this would be correct to add.

Can you fix the conflict with the pre-commit-config?

twangboy
twangboy previously approved these changes Sep 21, 2022
@Oloremo
Copy link
Contributor Author

Oloremo commented Sep 22, 2022

@whytewolf almost forgot re this PR, I didn't have time to write a test so I add WIP and didn't expect it to be noticed.
Let me try to update it.

@whytewolf
Copy link
Collaborator

awesome. when you do get time to add a test all we would need is one that tests that the wait argument is indeed changed when a timeout is supplied.

@Oloremo
Copy link
Contributor Author

Oloremo commented Sep 22, 2022

@whytewolf

when you do get time to add a test

No idea, I tried to setup dev env on a new MacBook and I failed. It installs half of the internet, some libs are absent I honestly have no idea why it's so heavy just to run black and isort? I guess the docs part is complicated and I'd suggest splitting pre-commit to the necessary and full or something.

@whytewolf
Copy link
Collaborator

@whytewolf

when you do get time to add a test

No idea, I tried to setup dev env on a new MacBook and I failed. It installs half of the internet, some libs are absent I honestly have no idea why it's so heavy just to run black and isort? I guess the docs part is complicated and I'd suggest splitting pre-commit to the necessary and full or something.

it isn't just black, isort and lint. the heaviest part of pre-commit is actually the requisite checking. which is why it pulls down everything to make sure it knows what gets pulled down. this includes every requisite needed to run tests. which is needed to make sure the test environments are not broken and have every lib needed to run the tests.

Also, currently I don't think salt supports M1 based macs so that might be one of the reasons you might be having trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Priority 1
6 participants