I have an automated testing which tries to install a few Snap packages and run specific tests on them, then remove them from the machine. I am interested to do this in parallel because it would save me a lot of time and otherwise the machine is heavily underutilized. During the automation I noticed the following log or similar errors indicating something has a change in progress(mainly snapd and during connecting the plugs) which I presume is due to Snap’s transnational model and possible simultaneous changes that are being requested.
error: snap "snapd" has "connect-snap" change in progress
However, this is not a desired state for our applications. I need to do extra effort of parsing the log output, finding if the reason was this specific issue and try again or else the changes wouldn’t be applied at all. Is there any way that I could make the request blocking, in a sense that I end up with either an error that indicates the change couldn’t be applied at all and retrying doesn’t help (so the automation would halt with a reasonable error) or a successful outcome that may take arbitrary time to finish depending on the request queue of snapd? Other than that, is there any reference on the exit codes that are being used in Snapd so I could get a meaning out of the error? Is it always 0 and 1?