-
Notifications
You must be signed in to change notification settings - Fork 252
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
osversion: add "Unmanifested" const #1546
base: main
Are you sure you want to change the base?
Conversation
This const can (in most situations, unless you're expecting obsolete versions of Windows) used to check if a binary hasn't been manifested, so the OSVersion cannot be used. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
So no idea if this makes sense;
Thought I'd open it as a PR, in case it makes sense |
9200 didnt support containers. IMO we should panic. If you are calling this and get 9200 you are either A) unsupported Windows OS, B) unmanifested in which case you will not hit the code paths you expect. Both need to be handled with a quick "panic(STOP DOING THIS)" :) |
^ btw, I think we can solve this with a quick |
You mean for |
Yea basically osversion.Get(), if 9200 do a cmd ver and get the ver cmd thinks it is. If thats a real ver like 18363 then store the 18363 etc. Do this in a |
Does FWIW; this is what we use as fallback in docker (perhaps could be an alternative); |
oh, actually, I think that's the wrong one; that also requires manifested 🤔 let me check. edit: ah, yes, so we DO use that one, but probably depend on the first part to be working; We should probably update that 🤔 |
"Shell out to Either way, I agree that Whether we should (There was also a separate discussion about changing hcsshim APIs to either be version-specific, so that the caller must check the OS version when it matters, or allowing APIs to have the OS version injected in case the caller wants to override hcsshim's choice of canonical version info). |
LOL! Yea, it's just a special case for
Reason I suggested |
I (still) don't have the code in front of me but it's possible that Docker and containerd only use In that case, breaking the |
Doing less than 5 minutes of research both are used. Containerd is mostly absent of For Docker they appear to use both. They use Given the usages here maybe we should add a new func But I still propose we dont return an error even if we do the above. I want to write code like this:
I dont want to have to write:
|
This const can (in most situations, unless you're expecting obsolete versions of Windows) used to check if a binary hasn't been manifested, so the OSVersion cannot be used.