Having a jid that is occasionally not unique (eg two processes creating
jobs at about the same time) causes problems in my usage due to
job tracking assuming unique jids. Add a config option called `unique_jid`
that will enforce unique jids, but will change the jid format by
appending an underscore and the process id.
Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
Some states are complicated and multiple subparts,
or maybe cross-call into __states__ if they manage subresources.
In these cases, they will have multiple comments.
Make this more ergonomic by supporting a list of strings as the
value for ret['comment'] in state returns and documenting this.
By joining comments on newlines, it is possible to combine
single-line and multi-line comments cleanly, as opposed to e.g. commas.
The driving impetus for this is some of the boto modules.
An update to the boto_sqs module is included as an example.
Add a check that outgoing state return data has the right shape,
and add a testcase as well.
Fix the NPM state tests and the saltmod runner & wheel state functions
to comply with the prescribed format.
Separates out the comment from the rest of the state return to make this
test more stable on Python 3. This state run in PY3 adds the minion
names to the comment in a random order, so we can't rely on asserting
against this order in the test.
This PR updates the test so that we are still checking for all of the
elements in the comment, but not relying on the order the minions are
added the comment list.
This ensures we do not introduce a regression which breaks
the usage of the `batch` option when using states in orchestration
runners.
Related to #40635 and #39169