Skip to content
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

context list: remove temporary ContextType from JSON output #5981

Merged
merged 1 commit into from
Apr 11, 2025

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Apr 1, 2025

This reverts commit fed9fa0.

This removes the ContextType field, which was temporarily added to provide compatibility with the "compose-cli" wrapper that shipped with Docker Desktop. The compose-cli wrapper extended the context struct with an additional field that was not part of the CLI itself, but was used by Visual Studio to detect the type of context.

This temporary field shipped as part of Docker 27.0 June 2024), which should be enough time for Visual Studio to have adjusted their integration.

- Human readable description for the release notes

Go SDK: cli/command/context: remove temporary `ContextType` field from JSON output

- A picture of a cute animal (not mandatory but encouraged)

This reverts commit fed9fa0.

This removes the ContextType field, which was temporarily added to provide
compatibility with the "compose-cli" wrapper that shipped with Docker Desktop.
The compose-cli wrapper extended the context struct with an additional field
that was not part of the CLI itself, but was used by Visual Studio to detect
the type of context.

This temporary field shipped as part of Docker 27.0 June 2024), which should
be enough time for Visual Studio to have adjusted their integration.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.11%. Comparing base (3349492) to head (cda7235).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5981      +/-   ##
==========================================
- Coverage   59.12%   59.11%   -0.01%     
==========================================
  Files         355      355              
  Lines       29740    29716      -24     
==========================================
- Hits        17583    17567      -16     
+ Misses      11182    11174       -8     
  Partials      975      975              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@thaJeztah
Copy link
Member Author

Interesting failure; some issue with that test? Looks like potentially the context would be cancelled, which closes the pipe?

case <-ctx.Done():
assert.NilError(t, server.Close(), "failed to close imageCreateFunc server")
return
default:
assert.NilError(t, enc.Encode(jsonmessage.JSONMessage{

65.88 === FAIL: cli/command/container TestRunPullTermination (0.00s)
65.88     run_test.go:252: assertion failed: error is not nil: io: read/write on closed pipe

@thaJeztah
Copy link
Member Author

Flaky test;

2.78 === FAIL: cli/command/network TestNetworkPrunePromptTermination (0.01s)
62.78     prune_test.go:27: assertion failed: error is "network prune cancelled has been cancelled" (errdefs.errCancelled), not "prompt terminated" (command.ErrPromptTerminated errdefs.errCancelled)

And weird error: "network prune cancelled has been cancelled"; I suspect the weird error message was accidental;

return "", errdefs.Cancelled(errors.New("network prune cancelled has been cancelled"))

Looks like it was updated in 7c722c0

@thaJeztah thaJeztah added this to the 28.1.0 milestone Apr 11, 2025
@thaJeztah thaJeztah requested review from vvoland and Benehiko April 11, 2025 14:07
@vvoland vvoland merged commit 18178e0 into docker:master Apr 11, 2025
102 checks passed
@vvoland vvoland added area/go-sdk Changes affecting the Go SDK impact/go-sdk Noteworthy (compatibility changes) in the Go SDK labels Apr 11, 2025
@thaJeztah thaJeztah deleted the remove_ContextType branch April 11, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/context area/go-sdk Changes affecting the Go SDK impact/changelog impact/go-sdk Noteworthy (compatibility changes) in the Go SDK status/2-code-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants