-
Notifications
You must be signed in to change notification settings - Fork 642
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
Alpine > Common #3632
Alpine > Common #3632
Conversation
Signed-off-by: apostasie <[email protected]>
Signed-off-by: apostasie <[email protected]>
Signed-off-by: apostasie <[email protected]>
// that does not support inf/infinity. | ||
// This constant is provided as a mean for tests to express the intention of sleep infinity without having to | ||
// worry about that and get windows compatibility. | ||
Infinity = "3600" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a finite number 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an infinitely finite number, right? :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can make this an infinite number, but I am pretty sure you are going to complain about the size of the PR 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just use "18446744073709551615" (or "4294967295" if it overflows)?
It should be also moved to *_windows.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is worth the effort.
For all intents and purposes, these containers never live more than a few seconds.
Furthermore, having two distinct behaviors for linux (infinity
) and windows (4294967295
) is inviting trouble.
Finally, this is just a workaround for a situation that hopefully will resolve eventually.
wdyt?
@@ -29,6 +29,14 @@ import ( | |||
"github.com/containerd/nerdctl/v2/pkg/testutil/test" | |||
) | |||
|
|||
const ( | |||
// It seems that at this moment, the busybox on windows image we are using has an outdated version of sleep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we update the image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
busybox should have been supporting inf
since 2019 🤔
mirror/busybox@edca770
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure the k8s folks are using https://github.com/rmyorston/busybox-w32
We could get our own rolled-up with some effort.
I do not have a windows rig here though... touching anything windows for me means I have to code blind and hope the CI will be happy :s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like everybody is still on 1.29-2 - untouched in 6 years... k8s image tag is likely lying for windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
On top of #3631
More changes to allow better compatibility with windows test (move from AlpineImage to CommonImage where appropriate).
Second commit fixes an image test that did not match the description.