Skip to content

Remove Port{Fec,Speed} in favor of Link{Fec,Speed}#10417

Open
jgallagher wants to merge 3 commits intomainfrom
john/remove-dup-types
Open

Remove Port{Fec,Speed} in favor of Link{Fec,Speed}#10417
jgallagher wants to merge 3 commits intomainfrom
john/remove-dup-types

Conversation

@jgallagher
Copy link
Copy Markdown
Contributor

Prior to this PR, we had both PortFec+LinkFec and PortSpeed+LinkSpeed (both pairs of enums that were identical except for their names and doc comments). Per @rcgoodfellow in chat, Link* is a more accurate name, so this PR keeps that one and removes the Port* enums.

LinkFec/LinkSpeed were already used in the Nexus external API, so that one doesn't change at all. A bunch of internal APIs were using the Port* version, so those had a lot of wire-compatible churn to include the new docstrings. The diff stat here ignoring OpenAPI spec churn is +142, -219 (net negative from removing the duplicate types and associated From impls).

This was originally part of #10344, but was deferred to wait for some drift fixes, all of which have now landed, courtesy of @ahl and @sunshowers. Closes #10403.

@jgallagher jgallagher added the networking Related to the networking. label May 8, 2026
Copy link
Copy Markdown
Contributor

@ahl ahl left a comment

Choose a reason for hiding this comment

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

love it; thanks! sorry for the drift shenanigans!

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

Labels

networking Related to the networking.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Squish Port{Fec,Speed} and Link{Fec,Speed} into one type

2 participants