[gateway] turn API into a trait#6145
Conversation
Created using spr 1.3.6-beta.1
| "summary": "Detach the websocket connection attached to the given SP component's", | ||
| "description": "serial console, if such a connection exists.", |
There was a problem hiding this comment.
Hmm, Dropshot should probably consider the first paragraph (or maybe the first sentence?) to be the summary -- line breaks affecting this is a bit weird.
There was a problem hiding this comment.
First paragraph would match the old way of defining endpoints. We rely on this heavily in Nexus.
There was a problem hiding this comment.
Looks like the logic might have gotten stepped on here:
Edit: or not. The code moved but the tests are the same so it must still work. I guess this must be a difference in implementation in the new macro.
There was a problem hiding this comment.
First paragraph would match the old way of defining endpoints. We rely on this heavily in Nexus.
Hmm, well even before this change it was splitting on the first line break, right? Strange, will look tomorrow.
I tried to keep this bit of code identical between the two macros, but might have missed something.
There was a problem hiding this comment.
Oh yeah, I see you're right: the existing code also worked that way. We just have been diligent about using it correctly in the external API, largely because if we don't, we see the consequence on the docs site — the summaries are used as the sidebar link titles.
Not sure the basic behavior needs to change. Might be enough to just make it easier to notice you've messed up, like with a warning of some kind.
There was a problem hiding this comment.
Oh yeah, I see you're right: the existing code also worked that way. We just have been diligent about using it correctly in the external API, largely because if we don't, we see the consequence on the docs site — the summaries are used as the sidebar link titles.
Ahh -- the first line acts as the sidebar title so it's deliberately kept very short for that reason.
I think it's worth exploring better splitting algorithms for sure.
…v dep Created using spr 1.3.6-beta.1
jgallagher
left a comment
There was a problem hiding this comment.
With the caveat that I didn't scrutinize the changes where it looks like things were just being moved around, this looks good to me. Thank you for the better organization under gateway-types than we had previously in gateway!
Somewhat large, but with no functional changes -- this is pure code movement.
In a few spots I had to move away from
Fromimpls, so that gateway-types doesnot depend on gateway-sp-comms. I think those changes are for the best.
As a bonus, sp-sim no longer has to depend on omicron-gateway, cutting down the
number of build units for it from 600 to 468. That's a really nice improvement.