Adding feature to postgres returner to save minion which are expected to return for a job #67930
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR enables the PostgreSQL returner to store expected minion IDs for a job within the returner, ensuring that the returner correctly reports missing minions when missing=True is used.
What issues does this PR fix or reference?
While using the PostgreSQL returner to store job caches,
salt_returns
, andsalt_events
in a PostgreSQL database, the following issue arises:When executing a command in
--async
mode, we receive a Job ID (JID). To track the progress of this JID, we run:We expect this command to return "minion did not return" for any minions that have not yet responded. However, this is not happening—no output is provided for minions that haven't returned.
This functionality works correctly when we remove the PostgreSQL returner configuration and use the local job cache instead.
Salt-user group discussion link: https://groups.google.com/g/salt-users/c/eN6mvymi1qA
New Behavior
With the raised enhancement, the PostgreSQL returner is now able to save minion IDs correctly and accurately detect which minions have returned and which have not.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
No