Use github.com/containerd/platforms package#9662
Conversation
|
Skipping CI for Draft Pull Request. |
|
I added cherry-pick labels (for the first commit). |
Hm.. we may want to check the go module versions though; it looks like some versions specified in the new module are pretty recent (hcsshim v0.12.0-rc.2). We should check what the minimum version is that works, and pick that (to allow go module MVS to do its thing). |
|
I opened a PR to downgrade the minimum required version of hcsshim, so that this module can more easily be consumed by other projects and in other branches (1.6, 1.7); |
|
Perhaps we should wait for containerd/platforms#5 (tag as v0.1.1); that way we can update at least the v1.7 branch to use the aliases. For 1.6 we'd have to update hcsshim to v0.10.0 (to be discussed), but 1.7 should already meet the required version. (currently trying with my PR branch in moby/moby#47142) |
|
The good news; it now builds (v0.1.0 forced a GRPC updated, which didn't work well); the "bad" news is that I have 2 tests failing that expected a platform Could be some bug on the moby side, but we'd have to dig into that (perhaps @dmcgowan has time to check). I'm sure that can be fixed (just curious what changed in the behavior). Daemon logs show that it returns an untyped error, hence using the default ( time="2024-01-21T00:18:31.260074294Z" level=debug msg="Calling POST /v1.45/images/create?fromImage=hello-world&platform=foobar&tag=latest"
time="2024-01-21T00:18:31.260220544Z" level=debug msg="FIXME: Got an API for which error does not match any expected type!!!" error="\"foobar\": unknown operating system or architecture: invalid argument" error_type="*fmt.wrapError" module=api
time="2024-01-21T00:18:31.260320336Z" level=error msg="Handler for POST /v1.45/images/create returned error: \"foobar\": unknown operating system or architecture: invalid argument"
time="2024-01-21T00:18:31.260407169Z" level=debug msg="FIXME: Got an API for which error does not match any expected type!!!" error="\"foobar\": unknown operating system or architecture: invalid argument" error_type="*fmt.wrapError" module=apiWondering if this is excepted; maybe it's the change from |
thaJeztah
left a comment
There was a problem hiding this comment.
looks like the change of errors is a breaking change; and the new errors are not exported, so cannot be detected / typed.
We should find a solution for this but that change is already in main and our 2.0 betas. Splitting out errdefs may be the best solution. We could use interfaces to test for errors but that wouldn't help in cases where we use |
Yeah, agree; for main / v2.0 (beta) this is probably find if we already have that errdefs change in current main;
"LGTM" after updating the first commit to v0.1.1 |
Signed-off-by: Derek McGowan <[email protected]>
Signed-off-by: Derek McGowan <[email protected]>
aea6938 to
e79ec7a
Compare
|
/retest |

Update the platforms package to alias to the new platforms package.