Skip to content

Comments

manager: restore NewServer to v2 signature#3212

Merged
dperny merged 1 commit intomoby:masterfrom
corhere:controlapi-hooks-nonbreaking-change
Aug 26, 2025
Merged

manager: restore NewServer to v2 signature#3212
dperny merged 1 commit intomoby:masterfrom
corhere:controlapi-hooks-nonbreaking-change

Conversation

@corhere
Copy link
Collaborator

@corhere corhere commented Aug 26, 2025

- What I did
Undid the breaking change introduced by the previous PR without loss of functionality.

- How I did it
While NewServer is probably not called by any code outside the swarmkit module, we should still be good maintainers by taking reasonable measures to avoid introducing breaking changes to the module. Instead provide a view-response mutator to controlapi by setting an exported struct field on the constructed Server.

Since for similar compatibility reasons we can't ever add new methods to the view-response interface, rename it to better reflect its narrow scope.

- How to test it

- Description for the changelog

While NewServer is probably not called by any code outside the swarmkit
module, we should still be good maintainers by taking reasonable
measures to avoid introducing breaking changes to the module. Instead
provide a view-response mutator to controlapi by setting an exported
struct field on the constructed Server.

Since for similar compatibility reasons we can't ever add new methods to
the view-response interface, rename it to better reflect its narrow
scope.

Signed-off-by: Cory Snider <csnider@mirantis.com>
@corhere corhere force-pushed the controlapi-hooks-nonbreaking-change branch from b84e7be to 58e37b4 Compare August 26, 2025 18:30
@dperny dperny merged commit 40bd11b into moby:master Aug 26, 2025
9 checks passed
@corhere corhere deleted the controlapi-hooks-nonbreaking-change branch August 30, 2025 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants