Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
release:
types: [published]
env:
GHA_RUST_VERSIONS: '{ "rust:msrv": "1.85", "rust:current": "1.88", "rust:nightly": "nightly" }'
GHA_RUST_VERSIONS: '{ "rust:msrv": "1.85", "rust:current": "1.89", "rust:nightly": "nightly" }'
GHA_GO_VERSIONS: '{ "go:current": "1.23.8" }'
jobs:
build:
Expand Down
11 changes: 7 additions & 4 deletions src/integration-tests/src/bigquery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,13 @@ async fn cleanup_stale_datasets(
.into_iter()
.filter_map(|r| {
let dataset = r.unwrap();
if let Some("true") = dataset.labels.get("integration-test").map(String::as_str) {
if dataset.creation_time < stale_deadline {
return Some(dataset);
}
if dataset
.labels
.get("integration-test")
.is_some_and(|v| v == "true")
&& dataset.creation_time < stale_deadline
{
return Some(dataset);
}
None
})
Expand Down
11 changes: 7 additions & 4 deletions src/integration-tests/src/firestore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,13 @@ async fn cleanup_stale_documents() -> Result<()> {
if let Some(true) = doc.create_time.map(|v| v >= stale_deadline) {
continue;
}
if let Some(integration) = doc.fields.get("integration-test") {
if let Some(&true) = integration.boolean_value() {
stale_documents.push(doc.name);
}
if doc
.fields
.get("integration-test")
.and_then(|v| v.boolean_value())
.is_some_and(|v| *v)
{
stale_documents.push(doc.name);
}
}
let stale_documents = stale_documents;
Expand Down
17 changes: 10 additions & 7 deletions src/integration-tests/src/secret_manager/openapi_locational.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,16 @@ async fn cleanup_stale_secrets(
.send()
.await?;
for secret in response.secrets {
if let Some("true") = secret.labels.get("integration-test").map(String::as_str) {
if let Some(true) = secret.create_time.map(|v| v < stale_deadline) {
secret
.name
.into_iter()
.for_each(|name| stale_secrets.push(name));
}
if secret
.labels
.get("integration-test")
.is_some_and(|v| v == "true")
&& secret.create_time.is_some_and(|v| v < stale_deadline)
{
secret
.name
.into_iter()
.for_each(|name| stale_secrets.push(name));
}
}
if response
Expand Down
11 changes: 7 additions & 4 deletions src/integration-tests/src/secret_manager/protobuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,13 @@ async fn cleanup_stale_secrets(
));
}

if let Some("true") = secret.labels.get("integration-test").map(String::as_str) {
if let Some(true) = secret.create_time.map(|v| v < stale_deadline) {
stale_secrets.push(secret.name);
}
if secret
.labels
.get("integration-test")
.is_some_and(|v| v == "true")
&& secret.create_time.is_some_and(|v| v < stale_deadline)
{
stale_secrets.push(secret.name);
}
}

Expand Down
21 changes: 12 additions & 9 deletions src/integration-tests/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1187,15 +1187,18 @@ async fn cleanup_stale_buckets(client: &StorageControl, project_id: &str) -> Res
let mut names = Vec::new();
while let Some(bucket) = buckets.next().await {
let bucket = bucket?;
if let Some("true") = bucket.labels.get("integration-test").map(String::as_str) {
if let Some(true) = bucket.create_time.map(|v| v < stale_deadline) {
let client = client.clone();
let name = bucket.name.clone();
pending.push(tokio::spawn(
async move { cleanup_bucket(client, name).await },
));
names.push(bucket.name);
}
if bucket
.labels
.get("integration-test")
.is_some_and(|v| v == "true")
&& bucket.create_time.is_some_and(|v| v < stale_deadline)
{
let client = client.clone();
let name = bucket.name.clone();
pending.push(tokio::spawn(
async move { cleanup_bucket(client, name).await },
));
names.push(bucket.name);
}
}

Expand Down
11 changes: 7 additions & 4 deletions src/integration-tests/src/workflows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,13 @@ async fn cleanup_stale_workflows(
let mut stale_workflows = Vec::new();
while let Some(workflow) = paginator.next().await {
let item = workflow?;
if let Some("true") = item.labels.get("integration-test").map(String::as_str) {
if let Some(true) = item.create_time.map(|v| v < stale_deadline) {
stale_workflows.push(item.name);
}
if item
.labels
.get("integration-test")
.is_some_and(|v| v == "true")
&& item.create_time.is_some_and(|v| v < stale_deadline)
{
stale_workflows.push(item.name);
}
}
let pending = stale_workflows
Expand Down
Loading