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
merged 1 commit into from
Jan 26, 2020

Conversation

Ch3LL
Copy link
Contributor

@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?

Yes

Commits signed with GPG?

Yes

@Ch3LL Ch3LL requested a review from a team as a code owner January 17, 2020 23:10
@ghost ghost requested a review from Akm0d January 17, 2020 23:10
@dwoz dwoz merged commit 5c860a6 into saltstack:master Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cache.pillar runner returns all minions when match is not found
5 participants