internal API for fetching MgsUpdateDriver status does not work#8475
internal API for fetching MgsUpdateDriver status does not work#8475davepacheco merged 4 commits intomainfrom
Conversation
| }, | ||
| ); | ||
| }) | ||
| .unwrap(); |
| } | ||
|
|
||
| impl IdOrdItem for WaitingStatus { | ||
| type Key<'a> = &'a Arc<BaseboardId>; |
There was a problem hiding this comment.
Can just be &'a BaseboardId I think
There was a problem hiding this comment.
(I think the Arc was added to allow cheap cloning for keys in IdMaps. Since iddqd can work with borrowed forms, it shouldn't really be necessary
to have Arc at all once all users have moved over)
There was a problem hiding this comment.
I'm not positive but I don't think so. I'm assuming that would make these structs borrow from somewhere else, but they get sent over a watch channel so I'm not sure how that would work. Also, I think the source of these is MgsUpdateDriver, which also keeps these as Arc, and shares them with the inventory collection that they originally were found in.
There was a problem hiding this comment.
Hmm, that wouldn't stop this specific spot from being &'a BaseboardId I think?
|
Thanks for the review! |
While debugging #8466, I tried to fetch the status from the MgsUpdateDriver, but it returned a 500 error. The Nexus log showed:
This is a serde serialization error being reported when dropshot tries to serialize the return value. The problem is that this structures has a
BTreeMapwhose key is aBaseboardId, which does not itself serialize to a string. Elsewhere when we needed this, we switched to anIdMapanyway. That serializes to an array of objects, which avoids this problem. Here, I've switched it to aniddqd::IdOrdMap.This PR currently has two commits:
MgsUpdateDriverStatusdoesn't work.IdOrdMapinstead.