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

Conserv457 service model update #7

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
552 changes: 162 additions & 390 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[patch]
[patch.crates-io]
[patch.crates-io.hyper-proxy]
git = 'https://github.com/rigetti/hyper-proxy'

[workspace]
members = ['qcs-api-client-common', 'qcs-api-client-grpc', 'qcs-api-client-openapi']
resolver = '2'
Expand Down
16 changes: 16 additions & 0 deletions qcs-api-client-common/CHANGELOG-py.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 0.9.3-rc.1 (2024-09-13)

### Features

#### add support for new 'post-processing' phase

### Fixes

#### trying to force Knope to do a new prerelease

## 0.9.3-rc.0 (2024-09-13)

### Features

#### add support for new 'post-processing' phase

## 0.9.2 (2024-08-29)

### Fixes
Expand Down
16 changes: 16 additions & 0 deletions qcs-api-client-common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 0.9.3-rc.1 (2024-09-13)

### Features

#### add support for new 'post-processing' phase

### Fixes

#### trying to force Knope to do a new prerelease

## 0.9.3-rc.0 (2024-09-13)

### Features

#### add support for new 'post-processing' phase

## 0.9.2 (2024-08-29)

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion qcs-api-client-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "qcs-api-client-common"
version = "0.9.2"
version = "0.9.3-rc.1"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion qcs-api-client-common/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "qcs-api-client-common"
version = "0.9.2"
version = "0.9.3-rc.1"
description = "Contains core QCS client functionality and middleware implementations."
readme = "README-py.md"
license = { text = "Apache-2.0" }
Expand Down
13 changes: 10 additions & 3 deletions qcs-api-client-common/src/backoff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use std::time::Duration;

use http::StatusCode;

pub use ::backoff::*;
use ::backoff::backoff::Backoff;
pub use ::backoff::*;

/// Create a default [`ExponentialBackoff`] for use with QCS.
///
Expand Down Expand Up @@ -85,7 +85,11 @@ pub fn duration_from_reqwest_error(
// There is no exposed method to inspect the inner hyper error in the reqwest error, only
// `is_*` methods. There is no reqwest method corresponding to the hyper `is_closed`, so we
// inspect the debug string instead.
if error.is_timeout() || error.is_connect() || error.is_request() || format!("{error:?}").contains("source: hyper::Error(ChannelClosed)") {
if error.is_timeout()
|| error.is_connect()
|| error.is_request()
|| format!("{error:?}").contains("source: hyper::Error(ChannelClosed)")
{
backoff.next_backoff()
} else {
None
Expand All @@ -105,7 +109,10 @@ pub fn duration_from_io_error(
) -> Option<Duration> {
use std::io::ErrorKind;
if can_retry_method(method) {
if matches!(error.kind(), ErrorKind::ConnectionReset | ErrorKind::ConnectionAborted) {
if matches!(
error.kind(),
ErrorKind::ConnectionReset | ErrorKind::ConnectionAborted
) {
backoff.next_backoff()
} else {
None
Expand Down
16 changes: 16 additions & 0 deletions qcs-api-client-grpc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 0.9.3-rc.1 (2024-09-13)

### Features

#### add support for new 'post-processing' phase

### Fixes

#### trying to force Knope to do a new prerelease

## 0.9.3-rc.0 (2024-09-13)

### Features

#### add support for new 'post-processing' phase

## 0.9.2 (2024-08-29)

### Fixes
Expand Down
4 changes: 2 additions & 2 deletions qcs-api-client-grpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "qcs-api-client-grpc"
version = "0.9.2"
version = "0.9.3-rc.1"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -13,7 +13,7 @@ description = "gRPC client for the QCS API"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
qcs-api-client-common = { path = "../qcs-api-client-common", version = "0.9.2" }
qcs-api-client-common = { path = "../qcs-api-client-common", version = "0.9.3-rc.1" }
http-body = "0.4.5"
hyper = "0.14.23"
hyper-proxy = { version = "0.9.1", default-features = false, features = [
Expand Down
3 changes: 2 additions & 1 deletion qcs-api-client-grpc/proto/controller/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ message BatchExecuteControllerJobsResponse {
}

// A request to execute a given ControllerJob on a specific target with one or more configurations.
//
//
// This action is *atomic* in that a job for each configuration will be queued, or none of them will.
// On success, the response will contain a sequence of job IDs where the number and order of IDs returned
// will correspond to the number and order of configurations given. However, note that execution in the
Expand Down Expand Up @@ -117,6 +117,7 @@ message GetControllerJobStatusResponse {
SUCCEEDED = 3;
FAILED = 4;
CANCELED = 5;
POST_PROCESSING = 6;
}
}

Expand Down
3 changes: 3 additions & 0 deletions qcs-api-client-grpc/src/gen/services.controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ pub mod get_controller_job_status_response {
Succeeded = 3,
Failed = 4,
Canceled = 5,
PostProcessing = 6,
}
impl Status {
/// String value of the enum field names used in the ProtoBuf definition.
Expand All @@ -214,6 +215,7 @@ pub mod get_controller_job_status_response {
Status::Succeeded => "SUCCEEDED",
Status::Failed => "FAILED",
Status::Canceled => "CANCELED",
Status::PostProcessing => "POST_PROCESSING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand All @@ -225,6 +227,7 @@ pub mod get_controller_job_status_response {
"SUCCEEDED" => Some(Self::Succeeded),
"FAILED" => Some(Self::Failed),
"CANCELED" => Some(Self::Canceled),
"POST_PROCESSING" => Some(Self::PostProcessing),
_ => None,
}
}
Expand Down
3 changes: 3 additions & 0 deletions qcs-api-client-grpc/src/gen/services.controller.serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,7 @@ impl serde::Serialize for get_controller_job_status_response::Status {
Self::Succeeded => "SUCCEEDED",
Self::Failed => "FAILED",
Self::Canceled => "CANCELED",
Self::PostProcessing => "POST_PROCESSING",
};
serializer.serialize_str(variant)
}
Expand All @@ -1302,6 +1303,7 @@ impl<'de> serde::Deserialize<'de> for get_controller_job_status_response::Status
"SUCCEEDED",
"FAILED",
"CANCELED",
"POST_PROCESSING",
];

struct GeneratedVisitor;
Expand Down Expand Up @@ -1348,6 +1350,7 @@ impl<'de> serde::Deserialize<'de> for get_controller_job_status_response::Status
"SUCCEEDED" => Ok(get_controller_job_status_response::Status::Succeeded),
"FAILED" => Ok(get_controller_job_status_response::Status::Failed),
"CANCELED" => Ok(get_controller_job_status_response::Status::Canceled),
"POST_PROCESSING" => Ok(get_controller_job_status_response::Status::PostProcessing),
_ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
}
}
Expand Down
16 changes: 16 additions & 0 deletions qcs-api-client-openapi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 0.10.3-rc.1 (2024-09-13)

### Features

#### add support for new 'post-processing' phase

### Fixes

#### trying to force Knope to do a new prerelease

## 0.10.3-rc.0 (2024-09-13)

### Features

#### add support for new 'post-processing' phase

## 0.10.2 (2024-08-29)

### Fixes
Expand Down
4 changes: 2 additions & 2 deletions qcs-api-client-openapi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "qcs-api-client-openapi"
description = "Auto-generated bindings to the QCS OpenAPI"
version = "0.10.2"
version = "0.10.3-rc.1"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/rigetti/qcs-api-client-rust"
Expand All @@ -10,7 +10,7 @@ keywords = ["API", "QCS", "Rigetti", "quantum"]
categories = ["api-bindings"]

[dependencies]
qcs-api-client-common = { path = "../qcs-api-client-common", version = "0.9.2" }
qcs-api-client-common = { path = "../qcs-api-client-common", version = "0.9.3-rc.1" }
serde = { version = "1.0.140", features = ["derive"] }
serde_json = "1.0.82"
url = "2.2.2"
Expand Down
Loading