arcade icon indicating copy to clipboard operation
arcade copied to clipboard

Non-determinism in publishing in presence of errors

Open mmitche opened this issue 3 years ago • 0 comments

  • [ ] This issue is blocking
  • [ ] This issue is causing unreasonable pain

There is possible non-determinism in publishing. We saw some cases in staging where packages that were not found during publishing caused blob publishing to not happen at all. While there are still errors, they should not cause non-deterministic behavior if possible. Here is what I think is going on:

So I think basically what is happening is this:

Errors should still be reported, but we should ideally avoid non-deterministic behavior. All of the publishing lanes (blobs, packages, and symbols) go in parallel, and there is parallelism within those tasks themselves (publishing multiple at once). Publishing is highly optimized.

The right thing to do to avoid use of the mutable global state (Log.HasLoggedErrors) until all parallel tasks have been resolved. Instead, introduce appropriate non-global state and check that.

mmitche avatar Aug 10 '22 00:08 mmitche