Skip to content

Commit dd9d304

Browse files
bradheCopilot
andauthored
Release v0.3.19 (#56)
* chore: Upgrade Tower API version * Let Tower SDK use the local session when running in `--local` mode (#55) * feat: Pass local context into local runs This PR allows users to pass their current auth context into locally-ran apps. This means that you'll authenticate with the server using your current session, etc. * chore: Raise an AppNotFoundError when we fail to find an app * Update crates/tower-cmd/src/run.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update crates/tower-cmd/src/run.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: Add test for other error types --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: Bump version to v0.3.19 --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent abf0e8a commit dd9d304

137 files changed

Lines changed: 1144 additions & 940 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ resolver = "2"
44

55
[workspace.package]
66
edition = "2021"
7-
version = "0.3.18"
7+
version = "0.3.19"
8+
89

910

1011
description = "Tower is the best way to host Python data apps in production"

crates/tower-api/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ For more information, please visit [https://tower.dev](https://tower.dev)
88

99
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
1010

11-
- API version: v0.6.3
11+
- API version: v0.6.4
1212
- Package version: 1.0.0
1313
- Generator version: 7.13.0
1414
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
@@ -187,11 +187,10 @@ Class | Method | HTTP request | Description
187187
- [RunFailureAlert](docs/RunFailureAlert.md)
188188
- [RunLogLine](docs/RunLogLine.md)
189189
- [RunParameter](docs/RunParameter.md)
190-
- [RunResults](docs/RunResults.md)
191190
- [RunStatistics](docs/RunStatistics.md)
191+
- [RunTimeseriesPoint](docs/RunTimeseriesPoint.md)
192192
- [SearchRunsResponse](docs/SearchRunsResponse.md)
193193
- [Secret](docs/Secret.md)
194-
- [SeriesPoint](docs/SeriesPoint.md)
195194
- [Session](docs/Session.md)
196195
- [SseWarning](docs/SseWarning.md)
197196
- [StatisticsSettings](docs/StatisticsSettings.md)

crates/tower-api/src/apis/configuration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* REST API to interact with Tower Services.
55
*
6-
* The version of the OpenAPI document: v0.6.3
6+
* The version of the OpenAPI document: v0.6.4
77
* Contact: hello@tower.dev
88
* Generated by: https://openapi-generator.tech
99
*/

crates/tower-api/src/apis/default_api.rs

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* REST API to interact with Tower Services.
55
*
6-
* The version of the OpenAPI document: v0.6.3
6+
* The version of the OpenAPI document: v0.6.4
77
* Contact: hello@tower.dev
88
* Generated by: https://openapi-generator.tech
99
*/
@@ -216,8 +216,14 @@ pub struct ExportSecretsParams {
216216
/// struct for passing parameters to the method [`generate_run_statistics`]
217217
#[derive(Clone, Debug)]
218218
pub struct GenerateRunStatisticsParams {
219-
/// Time period for statistics (24h, 7d, 30d)
220-
pub period: Option<String>
219+
/// Start date and time for statistics (inclusive)
220+
pub start_at: String,
221+
/// End date and time for statistics (inclusive)
222+
pub end_at: String,
223+
/// Filter runs by status(es). Define multiple with a comma-separated list. Supplying none will return all statuses.
224+
pub status: Option<Vec<String>>,
225+
/// Timezone for the statistics (e.g., 'America/New_York'). Defaults to UTC.
226+
pub timezone: Option<String>
221227
}
222228

223229
/// struct for passing parameters to the method [`invite_team_member`]
@@ -275,12 +281,12 @@ pub struct ListAppsParams {
275281
pub page: Option<i64>,
276282
/// The number of records to fetch on each page.
277283
pub page_size: Option<i64>,
278-
/// Time period for statistics (24h, 7d, 30d, or none)
279-
pub period: Option<String>,
280284
/// Number of recent runs to fetch (-1 for all runs, defaults to 20)
281285
pub num_runs: Option<i64>,
282-
/// Filter apps by status(es) (comma separated for multiple). Valid values: active, failed, disabled etc.
283-
pub status: Option<Vec<String>>
286+
/// Sort order for the results.
287+
pub sort: Option<String>,
288+
/// Filter to see apps with certain statuses.
289+
pub filter: Option<String>
284290
}
285291

286292
/// struct for passing parameters to the method [`list_catalogs`]
@@ -2560,8 +2566,16 @@ pub async fn generate_run_statistics(configuration: &configuration::Configuratio
25602566
let uri_str = format!("{}/stats/runs", configuration.base_path);
25612567
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
25622568

2563-
if let Some(ref param_value) = params.period {
2564-
req_builder = req_builder.query(&[("period", &param_value.to_string())]);
2569+
if let Some(ref param_value) = params.status {
2570+
req_builder = match "csv" {
2571+
"multi" => req_builder.query(&param_value.into_iter().map(|p| ("status".to_owned(), p.to_string())).collect::<Vec<(std::string::String, std::string::String)>>()),
2572+
_ => req_builder.query(&[("status", &param_value.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
2573+
};
2574+
}
2575+
req_builder = req_builder.query(&[("start_at", &params.start_at.to_string())]);
2576+
req_builder = req_builder.query(&[("end_at", &params.end_at.to_string())]);
2577+
if let Some(ref param_value) = params.timezone {
2578+
req_builder = req_builder.query(&[("timezone", &param_value.to_string())]);
25652579
}
25662580
if let Some(ref user_agent) = configuration.user_agent {
25672581
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
@@ -2836,17 +2850,14 @@ pub async fn list_apps(configuration: &configuration::Configuration, params: Lis
28362850
if let Some(ref param_value) = params.page_size {
28372851
req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
28382852
}
2839-
if let Some(ref param_value) = params.period {
2840-
req_builder = req_builder.query(&[("period", &param_value.to_string())]);
2841-
}
28422853
if let Some(ref param_value) = params.num_runs {
28432854
req_builder = req_builder.query(&[("num_runs", &param_value.to_string())]);
28442855
}
2845-
if let Some(ref param_value) = params.status {
2846-
req_builder = match "csv" {
2847-
"multi" => req_builder.query(&param_value.into_iter().map(|p| ("status".to_owned(), p.to_string())).collect::<Vec<(std::string::String, std::string::String)>>()),
2848-
_ => req_builder.query(&[("status", &param_value.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
2849-
};
2856+
if let Some(ref param_value) = params.sort {
2857+
req_builder = req_builder.query(&[("sort", &param_value.to_string())]);
2858+
}
2859+
if let Some(ref param_value) = params.filter {
2860+
req_builder = req_builder.query(&[("filter", &param_value.to_string())]);
28502861
}
28512862
if let Some(ref user_agent) = configuration.user_agent {
28522863
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());

crates/tower-api/src/models/accept_invitation_params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* REST API to interact with Tower Services.
55
*
6-
* The version of the OpenAPI document: v0.6.3
6+
* The version of the OpenAPI document: v0.6.4
77
* Contact: hello@tower.dev
88
* Generated by: https://openapi-generator.tech
99
*/

crates/tower-api/src/models/accept_invitation_response.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* REST API to interact with Tower Services.
55
*
6-
* The version of the OpenAPI document: v0.6.3
6+
* The version of the OpenAPI document: v0.6.4
77
* Contact: hello@tower.dev
88
* Generated by: https://openapi-generator.tech
99
*/

crates/tower-api/src/models/account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* REST API to interact with Tower Services.
55
*
6-
* The version of the OpenAPI document: v0.6.3
6+
* The version of the OpenAPI document: v0.6.4
77
* Contact: hello@tower.dev
88
* Generated by: https://openapi-generator.tech
99
*/

crates/tower-api/src/models/acknowledge_alert_response.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* REST API to interact with Tower Services.
55
*
6-
* The version of the OpenAPI document: v0.6.3
6+
* The version of the OpenAPI document: v0.6.4
77
* Contact: hello@tower.dev
88
* Generated by: https://openapi-generator.tech
99
*/

crates/tower-api/src/models/alert.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* REST API to interact with Tower Services.
55
*
6-
* The version of the OpenAPI document: v0.6.3
6+
* The version of the OpenAPI document: v0.6.4
77
* Contact: hello@tower.dev
88
* Generated by: https://openapi-generator.tech
99
*/
@@ -13,27 +13,22 @@ use serde::{Deserialize, Serialize};
1313

1414
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
1515
pub struct Alert {
16-
/// Whether the alert has been acknowledged
1716
#[serde(rename = "acked")]
1817
pub acked: bool,
19-
/// Type of the alert
2018
#[serde(rename = "alert_type")]
2119
pub alert_type: String,
22-
/// When the alert was created
2320
#[serde(rename = "created_at")]
2421
pub created_at: String,
2522
#[serde(rename = "detail")]
2623
pub detail: Box<models::RunFailureAlert>,
27-
/// Sequence number of the alert
2824
#[serde(rename = "seq")]
29-
pub seq: i32,
30-
/// Current status of the alert
25+
pub seq: i64,
3126
#[serde(rename = "status")]
3227
pub status: String,
3328
}
3429

3530
impl Alert {
36-
pub fn new(acked: bool, alert_type: String, created_at: String, detail: models::RunFailureAlert, seq: i32, status: String) -> Alert {
31+
pub fn new(acked: bool, alert_type: String, created_at: String, detail: models::RunFailureAlert, seq: i64, status: String) -> Alert {
3732
Alert {
3833
acked,
3934
alert_type,

0 commit comments

Comments
 (0)