feat(asic-rs): use asic-rs components to help classify errors#363
feat(asic-rs): use asic-rs components to help classify errors#363b-rowan wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d962217e0c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Worth mentioning this does lose some very slight granularity on error levels, namely, messages from asic-rs will no longer be classed as |
d962217 to
24f0537
Compare
Fixes: block#312 Signed-off-by: Brett Rowan <121075405+b-rowan@users.noreply.github.com>
24f0537 to
624a008
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 624a008090
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Some(MinerComponent::HashBoard { chip_idx: None, .. }) => { | ||
| pb::MinerError::HashboardNotPresent | ||
| } |
There was a problem hiding this comment.
Don't turn every hashboard component into a missing-board error
When asic-rs supplies component: Some(MinerComponent::HashBoard { chip_idx: None, .. }), this identifies the component the vendor message belongs to, but it does not mean the board is absent. With this branch, any hashboard-scoped message that does not contain the few early text keywords—e.g. a board voltage/current/protection warning or another vendor-specific board fault—gets reported as HashboardNotPresent, which is a different diagnosis and can send operators toward replacing/reseating a board instead of seeing an unmapped board error. Use the component to set component_type, but only choose HashboardNotPresent when the message/code actually indicates absence.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not sure about this, I suppose it depends on the error code, but likely not a better way to classify errors. Can take a more in depth look into the different error types, but not sure if there is a better option here.
Updates error classification to use the new
MinerComponentto help classify errors when they come from asic-rs.Also adds some tests for different edge cases in this new scenario, such as errors with or without components, and with or without error messages.
Fixes: #312