Skip to content

api/types/network: CreateRequest: remove deprecated CheckDuplicate field#50998

Merged
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:rm_network_CheckDuplicate
Sep 18, 2025
Merged

api/types/network: CreateRequest: remove deprecated CheckDuplicate field#50998
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:rm_network_CheckDuplicate

Conversation

@thaJeztah
Copy link
Member

CheckDuplicate is removed in API v1.44, and no longer used by daemons supporting that API version (v25.0.0-beta.1 and up) regardless of the API version used, but it must be set to true when sent to older daemons (see moby@78479b1).

This patch moves adding the field to the client through an ad-hoc struct so that we don't have to carry the field in the API module.

We can remove this once daemon versions v24.0 and lower are no longer expected to be used (when Mirantis Container Runtime v23 is EOL).

This field was removed from API v1.44 and no longer used by daemons supporting that API version (v25.0.0-beta.1 and up) regardless of the API version used, but for older version of the daemon required this option to be set.

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

api/types/network: CreateRequest: remove deprecated CheckDuplicate field

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

CheckDuplicate is removed in API v1.44, and no longer used by
daemons supporting that API version (v25.0.0-beta.1 and up)
regardless of the API version used, but it must be set to true
when sent to older daemons (see [moby/moby@78479b1]).

This patch moves adding the field to the client through an ad-hoc struct
so that we don't have to carry the field in the API module.

We can remove this once daemon versions v24.0 and lower are no longer
expected to be used (when Mirantis Container Runtime v23 is EOL).
https://github.com/moby/moby/blob/v2.0.0-beta.0/project/BRANCHES-AND-TAGS.md.

This field was removed from API v1.44 and no longer used by daemons supporting
that API version (v25.0.0-beta.1 and up) regardless of the API version used,
but for older version of the daemon required this option to be set.

[moby/moby@78479b1]: moby@78479b1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the rm_network_CheckDuplicate branch from 45be835 to 6d0551e Compare September 17, 2025 12:53
@thaJeztah thaJeztah marked this pull request as ready for review September 18, 2025 08:54
@akerouanton
Copy link
Member

We can remove this once daemon versions v24.0 and lower are no longer expected to be used (when Mirantis Container Runtime v23 is EOL).

Based on EOL MCR Versions, I believe MCR v23 has reached EOL in June, and our BRANCHES-AND-TAGS.md is out-of-date. @corhere could you confirm, and update that file if needed?

Copy link
Member

@akerouanton akerouanton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I'd like to hear from @corhere before we merge this one.

@thaJeztah
Copy link
Member Author

Yes, I noticed that, but also STR that there was some extension to that period. In either case, this PR moves the field definition out of the API, making it internal, so we can remove it without having to update the type definitions.

@robmry
Copy link
Contributor

robmry commented Sep 18, 2025

I'm pretty sure v23 has had its last release - but only recently, so could still be in use. I don't think there's any harm in keeping the compatibility code in the client for a short time.

@thaJeztah
Copy link
Member Author

Yeah, I was planning to open a PR to update the branch status for v23, and am working on raising the minimum API version (or at least the "fallback version") for the client, but likely this API version may still be included for some time; I wanted to get this out of the way first.

@akerouanton any strong objections?

Copy link
Member

@akerouanton akerouanton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get this one in, and we can still drop the anon struct in a folloz-up PR if v23 has reached EOL.

@thaJeztah thaJeztah merged commit c2d4723 into moby:master Sep 18, 2025
396 of 399 checks passed
@thaJeztah thaJeztah deleted the rm_network_CheckDuplicate branch September 18, 2025 12:50
@corhere
Copy link
Contributor

corhere commented Sep 18, 2025

MCR 23 has only been EOL for three months and enterprise users are annoyingly slow to upgrade at times. What's the harm in keeping the back-compat anonymous struct in until we raise the client's minimum supported API version to v1.44?

@akerouanton
Copy link
Member

None, but we started discussing whether we could drop support for API version < v1.44.

@corhere
Copy link
Contributor

corhere commented Sep 18, 2025

I see no problem with requiring users of EOL engines to stick with an EOL'd client.

@thaJeztah
Copy link
Member Author

Yeah, my main goal was to remove deprecated things from the Go API; removing some of the fallbacks for old API versions are the next steps, but won't break the Go API compatibility, which makes it easier to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants