[FEATURE REQUEST] Updates to pgjsonb returner #67249
PaulChristophel
started this conversation in
Feature Requests
Replies: 1 comment
-
|
I'm interested in this, fwiw |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was uncertain whether to mark this as a feature request or as a bug, but I noticed a few issues with the pgjsonb returner. Forgive me if this request is way off base.
Issues with job handling
The table itself is fine, but jobs are (debatably) improperly handled.
If the server supports it, the code is set to update on conflicts
Because of the way salt handles jobs, this is actually bad. I noticed that if I run a job like
test.ping, the job will be put into theloadcolumn likewhich is right, but as minions start responding to the ping, this row is replaced. This wouldn't be a problem if the return were aggregated somehow, but they are not. The job data is replaced by the last minion that responds. This means the publish data is being lost along with all the other minions that respond to the job, save the last. I'm not sure how critical this is, but it seems like a bug to me. My thought would be to handle it like the postgres.py module does now and just discard subsequent updates to the row.
Issues with salt_returns handling
The salt_returns table suggested by the documentation is:
jidstable, thejidcolumn should never exceed 20 characters.NOT NULLthesuccesscolumn should be a boolean.This change prevents lots of duplicated returns in the salt_returns table. It will require updates to the
returnerfunction though:This:
would need to become something like:
or more likely, something similar to the way conflicts are handled now for the jids table.
I also noticed a lot of discrepancies between what salt considers a "success" and what actually gets marked as a success in the row. (e.g., A job will have a
retcodeof0for a highstate with no failures and still be marked with a success offalse.)I am happy to implement any/all these changes myself, but I wanted to mark this as an issue first to see if you're amenable to them.
Beta Was this translation helpful? Give feedback.
All reactions