Skip to content

Conversation

@buchdag
Copy link
Member

@buchdagbuchdag commented Feb 22, 2025

This PR intent was initially to run the tests on multiples OSes and Go versions.

Turns out that the way docker-gen created a new temp file, wrote the rendered template to it, then used os.Rename() to replace the old file with the temp file does not seem to work as well on Windows as it does on Linux.

Since I could not find any justification as to why things where done this way other than the fact that docker-gen was released before os.WriteFile() was available, and since this way of doing things appears to cause issues in some cases ( #15 (comment), #317 and #629), I've decided to write the rendered template content straight to the destination file instead.

This simplifies the code quite a bit and should fix#629

@buchdagbuchdag self-assigned this Feb 22, 2025
@buchdagbuchdagforce-pushed the multi-os-arch-tests branch 3 times, most recently from b4d1780 to f07b654CompareFebruary 22, 2025 14:23
@buchdagbuchdagforce-pushed the multi-os-arch-tests branch 2 times, most recently from b20004c to 1b1aa82CompareFebruary 23, 2025 18:07
@buchdagbuchdag changed the title ci: run tests on multiple go versions, oses and archsci: run tests on multiple go versions and osesFeb 23, 2025
@buchdagbuchdagforce-pushed the multi-os-arch-tests branch 2 times, most recently from 359b188 to f0ccc41CompareFebruary 23, 2025 18:39
@buchdagbuchdagforce-pushed the multi-os-arch-tests branch from 95be415 to 82739b3CompareMarch 8, 2025 16:53
@buchdagbuchdag merged commit 28ca2b4 into mainMar 23, 2025
8 checks passed
@buchdagbuchdag deleted the multi-os-arch-tests branch March 23, 2025 16:33
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Writing file uses new inode, breaking Docker mounts

2 participants

@buchdag