GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — pkg/jsonmessage: stop printing deprecated progressDetail, errorDetail, remove DisplayJSONMessagesToStream and Stream interface by thaJeztah · Pull Request #49264 · moby/moby

Conversation

@thaJeztah

@thaJeztah thaJeztah commented Jan 13, 2025 •
edited by vvoland
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • relates to Refactor stream #2945
  • relates to Do not require login unless 401 is received on push #1298

depends on these fixes to be released in docker-py;

  • integration/commit: Don't check for deprecated fields docker/docker-py#3203
  • integration: adjust tests for omitted "OnBuild" docker/docker-py#3336
  • tests/exec: expect 127 exit code for missing executable docker/docker-py#3290
  • Set a dummy-version if none set, and remove unused APT_MIRROR build-arg docker/docker-py#3267
  • image load: don't depend on deprecated JSONMessage.error field docker/docker-py#3307

pkg/jsonmessage: stop printing deprecated progressDetail, errorDetail

The API still returns it for backward-compatibility (but probably
shouldn't), but we should no longer print it. This removes the
use of these fields for printing, but keeps them for streamformatter
to use.

  • ErrorMessage was deprecated in 3043c26
  • ProgressMessage was deprecated in 597e0e6

client/pkg/jsonmessage: remove DisplayJSONMessagesToStream

It was an adaptor around DisplayJSONMessagesStream for CLI-specific
primitives that was used in the CLI, but can be implemented by users
of this package.

client/pkg/jsonmessage: remove Stream interface

It was an interface to match CLI-specific primitives and is no
longer used.

- What I did

- How I did it

- How to verify it

- Description for the changelog

`client/pkg/jsonmessage`: remove deprecated `ProgressMessage`, `ErrorMessage`, `DisplayJSONMessagesToStream` and `Stream` interface

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@thaJeztah thaJeztah added area/api API status/2-code-review kind/refactor PR's that refactor, or clean-up code area/go-sdk impact/go-sdk Noteworthy (compatibility changes) in the Go SDK labels Jan 13, 2025
@thaJeztah thaJeztah added this to the 28.0.0 milestone Jan 13, 2025
@thaJeztah thaJeztah self-assigned this Jan 13, 2025
@thaJeztah
thaJeztah force-pushed the jsonmessage_remove_deprecated branch from d4db89a to 73b0797 Compare January 13, 2025 13:20
@thaJeztah

thaJeztah commented Jan 13, 2025

Copy link
Copy Markdown
Member Author

docker-py error could be legit, which means it's depending on the deprecated fields;

=================================== FAILURES ===================================
_____________________ ImageCollectionTest.test_load_error ______________________
tests/integration/models_images_test.py:96: in test_load_error
    with pytest.raises(docker.errors.ImageLoadError):
E   Failed: DID NOT RAISE <class 'docker.errors.ImageLoadError'>
------- generated xml file: /src/bundles/test-docker-py/junit-report.xml -------
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah thaJeztah mentioned this pull request Jan 14, 2025
image load: don't depend on deprecated JSONMessage.error field docker/docker-py#3307
Merged
@thaJeztah thaJeztah mentioned this pull request Feb 11, 2025
Fix deprecation of "error" and "progress" fields in streaming responses #49447
Merged
@thaJeztah thaJeztah modified the milestones: 28.0.0, 29.0.0 Feb 11, 2025
@thaJeztah
thaJeztah force-pushed the jsonmessage_remove_deprecated branch from 73b0797 to 58048d0 Compare July 14, 2025 16:23
@thaJeztah thaJeztah mentioned this pull request Jul 14, 2025
hack/make/test-docker-py: split test-exclusions to separate lines #50408
Merged
@thaJeztah
thaJeztah force-pushed the jsonmessage_remove_deprecated branch 2 times, most recently from 69eb214 to 8d8ecd8 Compare July 23, 2025 12:32
@thaJeztah
thaJeztah force-pushed the jsonmessage_remove_deprecated branch 2 times, most recently from f8967b1 to dac3a63 Compare July 30, 2025 11:24
@thaJeztah thaJeztah changed the title pkg/jsonmessage: JSONMessage: remove deprecated ProgressMessage, ErrorMessage pkg/jsonmessage: stop printing deprecated progressDetail, errorDetail Jul 30, 2025
@thaJeztah
thaJeztah force-pushed the jsonmessage_remove_deprecated branch 2 times, most recently from 1a4ae99 to 45d370c Compare July 30, 2025 12:35
thaJeztah added 3 commits July 30, 2025 22:51
@thaJeztah
pkg/jsonmessage: stop printing deprecated progressDetail, errorDetail
fdaccdb
The API still returns it for backward-compatibility (but probably
shouldn't), but we should no longer print it. This removes the
use of these fields for printing, but keeps them for streamformatter
to use.

- ErrorMessage was deprecated in 3043c26
- ProgressMessage was deprecated in 597e0e6

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
client/pkg/jsonmessage: remove DisplayJSONMessagesToStream
19edf5c
It was an adaptor around DisplayJSONMessagesStream for CLI-specific
primitives that was used in the CLI, but can be implemented by users
of this package.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
client/pkg/jsonmessage: remove Stream interface
f3ba0b2
It was an interface to match CLI-specific primitives and is no
longer used.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
thaJeztah force-pushed the jsonmessage_remove_deprecated branch from 45d370c to 2b4506b Compare July 30, 2025 21:23
@thaJeztah thaJeztah changed the title pkg/jsonmessage: stop printing deprecated progressDetail, errorDetail pkg/jsonmessage: stop printing deprecated progressDetail, errorDetail, remove DisplayJSONMessagesToStream and Stream interface Jul 30, 2025
@thaJeztah
thaJeztah force-pushed the jsonmessage_remove_deprecated branch from 2b4506b to f3ba0b2 Compare July 30, 2025 21:24
@thaJeztah

thaJeztah commented Jul 30, 2025

Copy link
Copy Markdown
Member Author

I have some other changes in a local branch, but need to give those some thinking to see if we can still provide aliases with those. Effectively, I want to un-export most bits, and swap out the DisplayJSONMessagesStream for an iterator / walker that can be used to render JSONMessages. It would be similar to how the auxCallback functions are used; if none is provided, we can provide the default (which is the current way things are rendered), but users can pass their own callback(s) (possibly multiple to allow writing to multiple outputs, although that could be handled internally in their render function / callback.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah
thaJeztah marked this pull request as ready for review July 30, 2025 21:39
dmcgowan
dmcgowan approved these changes Jul 30, 2025
View reviewed changes
@thaJeztah
thaJeztah merged commit 0a5fb23 into moby:master Jul 31, 2025
@thaJeztah
thaJeztah deleted the jsonmessage_remove_deprecated branch July 31, 2025 00:24
This was referenced Aug 4, 2025
Prepare release notes for v1.52.0-alpha.0 #50625
Merged
Prepare release notes for client/v0.1.0-alpha.0 #50637
Merged
@austinvazquez austinvazquez mentioned this pull request Aug 5, 2025
Bump api version in client and main module to v1.52.0-alpha.1 #50641
Merged
This was referenced Sep 5, 2025
Prepare release notes for api/v1.52.0-beta.0 #50904
Merged
Prepare release notes for client/v0.1.0-beta.0 #50913
Merged
@dmcgowan dmcgowan mentioned this pull request Sep 24, 2025
Prepare release notes for api/v1.52.0-rc.0 #51030
Closed
@coderabbitai coderabbitai Bot mentioned this pull request Jun 28, 2026
Optimize sandbox evaluation: image reuse, clean output, writable workspace jbrinkman/kairon#185
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dmcgowan dmcgowan dmcgowan approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@thaJeztah thaJeztah

Labels

area/api API area/go-sdk impact/go-sdk Noteworthy (compatibility changes) in the Go SDK kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Milestone

29.0.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@thaJeztah @dmcgowan
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.