Skip to content
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

Update progenitor from v0.4.0 -> v0.5.0 #4874

Merged
merged 3 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 76 additions & 76 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions clients/dns-service-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ pub fn is_retryable(error: &DnsConfigError<crate::types::Error>) -> bool {
let response_value = match error {
DnsConfigError::CommunicationError(_) => return true,
DnsConfigError::InvalidRequest(_)
| DnsConfigError::InvalidResponsePayload(_)
| DnsConfigError::UnexpectedResponse(_) => return false,
| DnsConfigError::InvalidResponsePayload(_, _)
| DnsConfigError::UnexpectedResponse(_)
| DnsConfigError::InvalidUpgrade(_)
| DnsConfigError::ResponseBodyError(_) => return false,
DnsConfigError::ErrorResponse(response_value) => response_value,
};

Expand Down
7 changes: 7 additions & 0 deletions common/src/api/external/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ impl<T: ClientError> From<progenitor::progenitor_client::Error<T>> for Error {
// our version constraints (i.e. that the call was to a newer
// service with an incompatible response).
progenitor::progenitor_client::Error::InvalidResponsePayload(
_bytes,
ee,
) => Error::internal_error(&format!(
"InvalidResponsePayload: {}",
bnaecker marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -539,6 +540,12 @@ impl<T: ClientError> From<progenitor::progenitor_client::Error<T>> for Error {
r.status(),
))
}
progenitor::progenitor_client::Error::InvalidUpgrade(e) => {
Error::internal_error(&format!("InvalidUpgrade: {e}",))
}
progenitor::progenitor_client::Error::ResponseBodyError(_) => {
Error::internal_error(&format!("ResponseBodyError: {e}",))
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/sagas/switch_port_settings_apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ async fn spa_undo_ensure_switch_port_settings(
let log = sagactx.user_data().log();

let port_id: PortId = PortId::from_str(&params.switch_port_name)
.map_err(|e| external::Error::internal_error(e))?;
.map_err(|e| external::Error::internal_error(e.to_string().as_str()))?;
bnaecker marked this conversation as resolved.
Show resolved Hide resolved

let orig_port_settings_id = sagactx
.lookup::<Option<Uuid>>("original_switch_port_settings_id")
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/sagas/switch_port_settings_clear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ async fn spa_undo_clear_switch_port_settings(
let log = sagactx.user_data().log();

let port_id: PortId = PortId::from_str(&params.port_name)
.map_err(|e| external::Error::internal_error(e))?;
.map_err(|e| external::Error::internal_error(e.to_string().as_str()))?;
bnaecker marked this conversation as resolved.
Show resolved Hide resolved

let orig_port_settings_id = sagactx
.lookup::<Option<Uuid>>("original_switch_port_settings_id")
Expand Down
4 changes: 3 additions & 1 deletion openapi/bootstrap-agent.json
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@
]
},
"Certificate": {
"description": "Certificate\n\n<details><summary>JSON schema</summary>\n\n```json { \"type\": \"object\", \"required\": [ \"cert\", \"key\" ], \"properties\": { \"cert\": { \"type\": \"string\" }, \"key\": { \"type\": \"string\" } } } ``` </details>",
"type": "object",
"properties": {
"cert": {
Expand Down Expand Up @@ -903,6 +904,7 @@
"format": "uuid"
},
"RecoverySiloConfig": {
"description": "RecoverySiloConfig\n\n<details><summary>JSON schema</summary>\n\n```json { \"type\": \"object\", \"required\": [ \"silo_name\", \"user_name\", \"user_password_hash\" ], \"properties\": { \"silo_name\": { \"$ref\": \"#/components/schemas/Name\" }, \"user_name\": { \"$ref\": \"#/components/schemas/UserId\" }, \"user_password_hash\": { \"$ref\": \"#/components/schemas/NewPasswordHash\" } } } ``` </details>",
"type": "object",
"properties": {
"silo_name": {
Expand Down Expand Up @@ -967,7 +969,7 @@
]
},
"UserId": {
"description": "Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID though they may contain a UUID.",
"description": "Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID though they may contain a UUID.\n\n<details><summary>JSON schema</summary>\n\n```json { \"title\": \"A name unique within the parent collection\", \"description\": \"Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID though they may contain a UUID.\", \"type\": \"string\", \"maxLength\": 63, \"minLength\": 1, \"pattern\": \"^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)^[a-z]([a-zA-Z0-9-]*[a-zA-Z0-9]+)?$\" } ``` </details>",
"type": "string"
}
},
Expand Down
Loading
Loading