Skip to content

Adding feature to postgres returner to save minion which are expected to return for a job #67930

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

arunkpj122
Copy link

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, and salt_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:

salt-run jobs.lookup_jid <JID> missing=True

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

@arunkpj122 arunkpj122 requested a review from a team as a code owner March 31, 2025 08:30
Copy link

welcome bot commented Mar 31, 2025

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at saltproject.pdl@broadcom.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!

Copy link
Contributor

@dmurphy18 dmurphy18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a changelog entry and tests written in pytest which exercises the code changes

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.

2 participants