Skip to content

(#27) Add statuses action for batch handle queries#26

Merged
ripienaar merged 1 commit intochoria-plugins:mainfrom
nmburgan:nmburgan/statuses
Mar 23, 2026
Merged

(#27) Add statuses action for batch handle queries#26
ripienaar merged 1 commit intochoria-plugins:mainfrom
nmburgan:nmburgan/statuses

Conversation

@nmburgan
Copy link
Contributor

@nmburgan nmburgan commented Mar 20, 2026

The existing status action only accepts a single handle, requiring callers to make separate RPC calls for each running job. Attempting to get this to work at scale is challenging, since when using MCollective's shared NATS connector, concurrent RPC calls from separate threads race on the singleton connection and @@request_sequence counter, causing lost responses. This new statuses action accepts an array of handles and returns status, stdout, stderr, and exitcode for each completed job in a single response. This lets callers like the upcoming OpenBolt's Choria transport poll and fetch output in one batched RPC call per round instead of N sequential per-target calls.

Addresses #27

@ripienaar
Copy link
Contributor

Please make an associated issue and update commit - see contributing guide. I track what needs releases using issues, without it, this will be skipped

@nmburgan nmburgan changed the title Add statuses action for batch handle queries (#27) Add statuses action for batch handle queries Mar 20, 2026
@nmburgan
Copy link
Contributor Author

Sorry about that, my bad for not reading that first. Done!

@nmburgan nmburgan force-pushed the nmburgan/statuses branch from 7634d5c to cc42aa3 Compare March 20, 2026 17:04
@ripienaar
Copy link
Contributor

Some tests failing, not sure if related ? @nmburgan these projects are suffering from a few years neglect so could just be that. The big problem here is a huge chunk of these tests are on rspec2 and rspec3 doesn't seem to be usable for the way we used to do the testing

The existing status action only accepts a single handle, requiring callers to make separate RPC calls for each running job. Attempting to get this to work at scale is challenging, since when using MCollective's shared NATS connector, concurrent RPC calls from separate threads race on the singleton connection and @@request_sequence counter, causing lost responses. This new statuses action accepts an array of handles and returns status, stdout, stderr, and exitcode for each completed job in a single response. This lets callers like the upcoming OpenBolt's Choria transport poll and fetch output in one batched RPC call per round instead of N sequential per-target calls.
@nmburgan nmburgan force-pushed the nmburgan/statuses branch from cc42aa3 to 99e48ac Compare March 21, 2026 23:49
@nmburgan
Copy link
Contributor Author

I think this me neglecting job.wait_for_process in the test.

@ripienaar
Copy link
Contributor

all good @nmburgan anything else you want to add or ready to merge?

@nmburgan
Copy link
Contributor Author

I’m going to do a quick test on a few nodes this morning just as an extra sanity check. I’ll circle back shortly.

@nmburgan
Copy link
Contributor Author

Sanity check successful. Good to merge!

@ripienaar ripienaar merged commit 0652c1b into choria-plugins:main Mar 23, 2026
4 checks passed
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