fix sporadic failures to load DLLs by lazy loading them#74
Open
tgummerer wants to merge 1 commit into
Open
Conversation
Author
|
Friendly ping @atotto. Any interest? |
tgummerer
added a commit
to pulumi/pulumi
that referenced
this pull request
Jul 16, 2026
atotto/clipboard suffers from unfortunate crashes on windows because of DLL loading. Unfortunately upstream doesn't seem to accept my PR atotto/clipboard#74. We are currently using replace statements for this, but those don't apply to downstream dependencies. Instead of trying to fix all downstream dependencies manually, let's vendor charmbracelet/bubbles/textinput, and make it use the fixed atotto/clipboard (also vendored). This way downstream dependencies (for example pulumi-random, which currently causes flakes in CI, see #23958) will get the correct version automatically. As a new version of the dependency gets released, it'll pull in the fix.
pulumi-bot
pushed a commit
to pulumi/pulumi
that referenced
this pull request
Jul 16, 2026
atotto/clipboard suffers from unfortunate crashes on windows because of DLL loading. Unfortunately upstream doesn't seem to accept my PR atotto/clipboard#74. We are currently using replace statements for this, but those don't apply to downstream dependencies. Instead of trying to fix all downstream dependencies manually, let's vendor charmbracelet/bubbles/textinput, and make it use the fixed atotto/clipboard (also vendored). This way downstream dependencies (for example pulumi-random, which currently causes flakes in CI, see #23958) will get the correct version automatically. As a new version of the dependency gets released, it'll pull in the fix.
pull Bot
pushed a commit
to nebula-aac/pulumi
that referenced
this pull request
Jul 16, 2026
atotto/clipboard suffers from unfortunate crashes on windows because of DLL loading. Unfortunately upstream doesn't seem to accept my PR atotto/clipboard#74. We are currently using replace statements for this, but those don't apply to downstream dependencies. Instead of trying to fix all downstream dependencies manually, let's vendor charmbracelet/bubbles/textinput, and make it use the fixed atotto/clipboard (also vendored). This way downstream dependencies (for example pulumi-random, which currently causes flakes in CI, see pulumi#23958) will get the correct version automatically. As a new version of the dependency gets released, it'll pull in the fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows DLL loading sometimes fails for spurious reasons. The panic is always in the following form:
This appears to be happening while loading the application, and was a frequent issue in CI tests in github.com/pulumi/pulumi. We can fix this by lazy loading the DLLs instead. We've been using this fix in our
go.mod, using areplacestatement (see pulumi/pulumi#17410), but would love to get this upstreamed, so we can remove thatreplace, and hopefully it helps others as well.