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

Return only targeted minion in cache.pillar runner when using tgt #55908

merged 1 commit into from Jan 26, 2020


Copy link

@Ch3LL Ch3LL commented Jan 17, 2020

What does this PR do?

Only return cached pillar data for minion that is passed with tgt.

What issues does this PR fix or reference?

Fixes #53039

Previous Behavior

If you run salt-run --out=json cache.pillar tgt='doesnotexist' with a target that does not exist it still returns all the cached pilllar data for ALL minions.

New Behavior

If you run salt-run --out=json cache.pillar tgt='doesnotexist' with a target that does not exist will not return anything.

Also as you can see I updated the docs to state: If tgt is not set will return cached pillars for all minions. The reason I did this is this is the current behavior that a user can run cache.pillar without a tgt set and all pillar data would be returned,and the other reason is tgt is an not required as its currently a kwarg. For these reasons I kept this behavior as its expected. If we want to eventually require the tgt argument for some reason then we would need to set it on a deprecation path, but I believe this change is best path for now.

Tests written?


Commits signed with GPG?


@Ch3LL Ch3LL requested a review from as a code owner Jan 17, 2020
@ghost ghost requested a review from Akm0d Jan 17, 2020
waynew approved these changes Jan 21, 2020
@dwoz dwoz merged commit 5c860a6 into saltstack:master Jan 26, 2020
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

5 participants