client: deprecate CommonAPIClient interface, add HijackDialer, SwarmManagementAPIClient interfaces#49388
Merged
thaJeztah merged 7 commits intomoby:masterfrom Feb 4, 2025
Merged
Conversation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The mediaType is only used in a single location; reset it in that location. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
pass the dialer as argument Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Introduce a SwarmManagementAPIClient interface that captures all swarm-specific methods on the API client. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The CommonAPIClient was used to define all the stable interfaces, and combined with the experimental ones through APIClient. In theory, this would allow someone to make sure they only depended on non-experimental methods or to implement an alternative client that only implements the stable methods. While there are users currently using this interface, all those uses depend on the actual client implementation, not a custom one, so they should be able to switch to use APIClient instead. In the meantime, start with deprecating, but keeping the interface the same for now, scheduling it to become an alias, and removed in a future release. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
7aa103d to
2997c0d
Compare
Member
Author
|
Failure is unrelated; |
vvoland
approved these changes
Feb 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
integration/internal: JobComplete: require shallower interface
client: separate Dialer() implementation from public API
client: move resetting mediaType for hijack to where applicable
The mediaType is only used in a single location; reset it in
that location.
client: make setupHijackConn a regular function
pass the dialer as argument
client: define separate interface for HijackDialer
client: define interface for all Swarm-specific methods
Introduce a SwarmManagementAPIClient interface that captures
all swarm-specific methods on the API client.
client: deprecate CommonAPIClient interface
The CommonAPIClient was used to define all the stable interfaces,
and combined with the experimental ones through APIClient. In theory,
this would allow someone to make sure they only depended on non-experimental
methods or to implement an alternative client that only implements the
stable methods.
While there are users currently using this interface, all those uses
depend on the actual client implementation, not a custom one, so they
should be able to switch to use APIClient instead. In the meantime,
start with deprecating, but keeping the interface the same for now,
scheduling it to become an alias, and removed in a future release.
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)