A failed update can lead to an unavailable resource monitor creating an
uncaught rejected promise which makes Automation API exit prematurely
since the exception was uncatchable. Prints the error message to stderr
only once to avoid spamming the user.
Fixes#10744Fixes#12970
It is possible for the same version of the same provider SDK to be loaded multiple times in Node.js. In this case, we might legitimately get mutliple registrations of the same resource. It should not matter which we use, so we can just skip re-registering. De-serialized resources will always be instances of classes from the first registered package.
Example layout this addresses. Registrations of resources in `package3` at the same verrsion.
`node_modules`
`@pulumi/pulumi`
`package1`
`node_modules`
`package3`
`package2`
`node_modules`
`package3`
Fixes#6258.