Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: run tests on multiple go versions and oses #665

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

buchdag
Copy link
Member

@buchdag buchdag 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

@buchdag buchdag self-assigned this Feb 22, 2025
@buchdag buchdag force-pushed the multi-os-arch-tests branch 3 times, most recently from b4d1780 to f07b654 Compare February 22, 2025 14:23
@buchdag buchdag force-pushed the multi-os-arch-tests branch from e4d2cdd to 95811fc Compare February 22, 2025 14:47
@buchdag buchdag force-pushed the multi-os-arch-tests branch 2 times, most recently from b20004c to 1b1aa82 Compare February 23, 2025 18:07
@buchdag buchdag changed the title ci: run tests on multiple go versions, oses and archs ci: run tests on multiple go versions and oses Feb 23, 2025
@buchdag buchdag force-pushed the multi-os-arch-tests branch 2 times, most recently from 359b188 to f0ccc41 Compare February 23, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Writing file uses new inode, breaking Docker mounts
1 participant