Skip to content

[dpd-api] migrate to RFD 619 pattern#259

Open
sunshowers wants to merge 4 commits into
mainfrom
sunshowers/spr/dpd-api-migrate-to-rfd-619-pattern
Open

[dpd-api] migrate to RFD 619 pattern#259
sunshowers wants to merge 4 commits into
mainfrom
sunshowers/spr/dpd-api-migrate-to-rfd-619-pattern

Conversation

@sunshowers
Copy link
Copy Markdown
Contributor

No description provided.

Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Comment thread dpd-api/src/lib.rs
Comment on lines +524 to +529
//
// TODO: `FreeChannels` is unchanged across versions, so this split may be
// unnecessary — the rationale for gating the endpoint at
// `VERSION_MCAST_STRICT_UNDERLAY` is not obvious from the code alone.
// Revisit in a follow-up to either document the reason or collapse back to
// a single `channels_list` endpoint.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wanted to ask about this -- is this correct?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We don't need the split. It was previously introduced because of a misspelling fix in the API doc comment, which shouldn't have warranted a version change (though it's official documentation). Collapsing it back to a single channels_list endpoint is totally the way to go.

Comment thread dpd-api/src/lib.rs
Comment on lines -1562 to +1512
versions = VERSION_ATTACHED_SUBNETS..,
versions = VERSION_ATTACHED_SUBNETS..,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There were a few tabs which I switched over to spaces.

@sunshowers sunshowers marked this pull request as ready for review April 28, 2026 17:52
Comment thread dpd-api/src/lib.rs
Comment on lines +2189 to +2191
// Required method: the latest version requires a `MulticastGroupTagQuery`
// query parameter that v1 does not have. When the tag is absent from the
// request body, the implementation must look up the existing group's tag
Copy link
Copy Markdown
Contributor

@zeeshanlakhani zeeshanlakhani May 11, 2026

Choose a reason for hiding this comment

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

nit: v1's tag is always present in the body, but it's an Option vs "absent". What's missing is the concrete context type and its switch-specific ops. So maybe more like:

Suggested change
// Required method: the latest version requires a `MulticastGroupTagQuery`
// query parameter that v1 does not have. When the tag is absent from the
// request body, the implementation must look up the existing group's tag
// Required method: v1 carries `tag` as `Option<String>` in the body, while the
// latest version moves it to a required `MulticastGroupTagQuery`. Resolving a
// `None` body tag means reading the existing group's tag from switch state,
// which is reachable only through the concrete context type in the implementation.

Comment thread dpd-api/src/lib.rs
Comment on lines +2236 to +2238
// Required method: the latest version requires a `MulticastGroupTagQuery`
// query parameter that v7 does not have. When the tag is absent from the
// request body, the implementation must look up the existing group's tag
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: follow a similar suggestion to above?

Comment thread dpd-api/src/lib.rs
Comment on lines +525 to +528
// TODO: `FreeChannels` is unchanged across versions, so this split may be
// unnecessary — the rationale for gating the endpoint at
// `VERSION_MCAST_STRICT_UNDERLAY` is not obvious from the code alone.
// Revisit in a follow-up to either document the reason or collapse back to
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adding this again in context of review:

We don't need the split. It was previously introduced because of a misspelling fix in the API doc comment, which shouldn't have warranted a version change (though it's official documentation). Collapsing it back to a single channels_list endpoint is totally the way to go (could do this quickly as a follow-up too).

Copy link
Copy Markdown
Contributor

@zeeshanlakhani zeeshanlakhani left a comment

Choose a reason for hiding this comment

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

Just a couple nits.

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