pkg/system: deprecate IsOSSupported() and ErrNotSupportedOperatingSystem, and implement image.CheckOS#46416
Conversation
|
Ah, dang! Forgot about this one (think I had a similar branch somewhere); I guess we can't provide the "deprecated" aliases for this one. |
536f700 to
ee48122
Compare
|
Flaky test on Windows; |
ee48122 to
c6fb742
Compare
|
I should mention that this PR should not be considered be an “endorsement” of |
|
discussed in the maintainers call, and the suggestion was to, instead of an "alias", just keep a temporary ("deprecated") copy of the original function (and error) in |
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Implement a function that returns an error to replace existing uses of the IsOSSupported utility, where callers had to produce the error after checking. The IsOSSupported function was used in combination with images, so implementing a utility in "image" to prevent having to import pkg/system (which contains many unrelated functions) Signed-off-by: Sebastiaan van Stijn <[email protected]>
c6fb742 to
a3c97be
Compare
|
alright; done 👍 @corhere @neersighted PTAL |
We should still look for all places where this is used, as there may be quite some that are either not needed, or (with multi-arch image support) potentially unwanted, but let's at least slightly improve things;
This function is used in combination with images, so move it there to prevent having to import pkg/system (which contains many unrelated functions)
Implement a function that returns an error to replace existing uses of the IsOSSupported utility, where callers had to produce the error after checking.
- A picture of a cute animal (not mandatory but encouraged)