-
Notifications
You must be signed in to change notification settings - Fork 62
Bump dropshot from b562f4f to fef3a0e
#710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Bumps [dropshot](https://github.com/oxidecomputer/dropshot) from `b562f4f` to `0018f66`. - [Release notes](https://github.com/oxidecomputer/dropshot/releases) - [Commits](oxidecomputer/dropshot@b562f4f...0018f66) --- updated-dependencies: - dependency-name: dropshot dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
b7a6552 to
4bf75e2
Compare
Bumps [dropshot](https://github.com/oxidecomputer/dropshot) from `b562f4f` to `fef3a0e`. - [Release notes](https://github.com/oxidecomputer/dropshot/releases) - [Commits](oxidecomputer/dropshot@b562f4f...fef3a0e) --- updated-dependencies: - dependency-name: dropshot dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
4bf75e2 to
f0bcf64
Compare
davepacheco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing major here but a few small suggestions. This is neat! I really like the way progenitor splits out the error cases, of which getting an explicit error HTTP response is only one.
nexus/src/sagas.rs
Outdated
| let id = RegionId(region.id().to_string()); | ||
| client.region_delete(&id).await | ||
| client.region_delete(&id).await.map_err(|_| { | ||
| // TODO we may want to more carefully consider errors from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep at least the message from the underlying error so that if we see this in the field we'll know what it was?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can do
common/src/api/external/error.rs
Outdated
| if rv.status().is_client_error() { | ||
| Error::invalid_request(&message) | ||
| } else { | ||
| Error::internal_error(&message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline: I think a 503 here should still be a 503 out the front door.
I understand if we don't want to bother being too pedantic here, but there are some other cases that probably shouldn't go straight out: 401 and 403, for example. It might be safer to have an allow-list of codes that we pass through (maybe: 400, 404, 409, 422, 503) and make everything else a 500?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With regard to the allow list: 1. I like it 2. it seems challenging to do robustly without some additional facilities from dropshot. For example, consider a 404 not found:
In the Error type it's represented like this:
ObjectNotFound { type_name: ResourceType, lookup_type: LookupType },What we get from the progenitor/dropshot call is (effectively) a dropshot::HttpError which has a message field that was populated like this:
let message = format!(
"not found: {} with {} \"{}\"",
t, lookup_field, lookup_value
);
HttpError::for_client_error(
Some(String::from("ObjectNotFound")),
http::StatusCode::NOT_FOUND,
message,
)So: in this impl From<progenitor::progenitor_client::Error<T>> for Error if we were to see that the status was 404 we would need to parse out the message field into the components for the ObjectNotFound variant. That seems both flaky for services within the nexus repo and completely untenable for external services such as crucible which e.g. populates the message field differently:
Err(HttpError::for_not_found(
None,
format!("region {:?} snapshot {:?} not found", p.id, p.name),
))
All of this is to say that I agree that maintaining structured errors across service boundaries seems useful and I think we need some more infrastructure to build that robustly.
Co-authored-by: David Pacheco <dap@oxidecomputer.com>
Co-authored-by: David Pacheco <dap@oxidecomputer.com>
Co-authored-by: David Pacheco <dap@oxidecomputer.com>
|
A newer version of dropshot exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged. |
Bumps dropshot from
b562f4ftofef3a0e.Commits
fef3a0eBump rcgen from 0.9.1 to 0.9.2 (#289)f744d95Bump slog-bunyan from 2.3.0 to 2.4.0 (#290)0018f66Error responses in OpenAPI output (#286)784399aIntroduce structured and unstructured response headers (#283)8e668f8Update actions/setup-node action to v3 (#287)7bb1091add debug for better integrations with rust tracing (#278)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)