api: Change Platform field back to string (temporary workaround)#37381
Conversation
There was a problem hiding this comment.
Why not just parse instead of HasPrefix.
There was a problem hiding this comment.
This does not need to be formatted. Can be the original value.
|
Build errors in CI |
3bb1d7a to
8528237
Compare
There was a problem hiding this comment.
already set in imageBuildOptionsToQuery
There was a problem hiding this comment.
nit: config.Platform != "" and other places
There was a problem hiding this comment.
Still TrimSpace in here for some reason.
8ffda69 to
1a18380
Compare
Codecov Report
@@ Coverage Diff @@
## master #37381 +/- ##
=========================================
Coverage ? 34.93%
=========================================
Files ? 610
Lines ? 44880
Branches ? 0
=========================================
Hits ? 15678
Misses ? 27084
Partials ? 2118 |
1a18380 to
ae54ee7
Compare
There was a problem hiding this comment.
As follow-up we should add a test that uses platform=goos and checks that it returns the original windows specific message.
There was a problem hiding this comment.
should we keep the validation/error-handling as it was before we changed to this? https://github.com/moby/moby/pull/37350/files#diff-f0ccc740f5a5ed38075be6855298809cL77
There was a problem hiding this comment.
Oh, I see, you moved the validation to the build/next-builder.
|
@tiborvass needs a minor rebase |
This partially reverts moby#37350 Although specs.Platform is desirable in the API, there is more work to be done on helper functions, namely containerd's platforms.Parse that assumes the default platform of the Go runtime. That prevents a client to use the recommended Parse function to retrieve a specs.Platform object. With this change, no parsing is expected from the client. Signed-off-by: Tibor Vass <tibor@docker.com>
ae54ee7 to
facad55
Compare
|
LGTM |
1 similar comment
|
LGTM |
|
Failures on janky are flakey |
This partially reverts #37350
Although specs.Platform is desirable in the API, there is more work
to be done on helper functions, namely containerd's platforms.Parse
that assumes the default platform of the Go runtime.
That prevents a client to use the recommended Parse function to
retrieve a specs.Platform object.
With this change, no parsing is expected from the client.
Signed-off-by: Tibor Vass tibor@docker.com