Skip to content

Commit 5b366b4

Browse files
committed
changelog, some fixes after merge, cargo clippy
1 parent d8476f3 commit 5b366b4

File tree

9 files changed

+38
-27
lines changed

9 files changed

+38
-27
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/stackable-cockpit/src/platform/demo/params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ pub struct DemoUninstallParameters {
2626
pub demo_namespace: String,
2727

2828
pub skip_operators: bool,
29-
pub skip_crds: bool
29+
pub skip_crds: bool,
3030
}

rust/stackable-cockpit/src/platform/demo/spec.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use kube::api::{ApiResource, GroupVersionKind};
21
use serde::{Deserialize, Serialize};
32
use snafu::{OptionExt, ResultExt, Snafu};
3+
use stackable_operator::kube::api::{ApiResource, GroupVersionKind};
44
use tracing::{Span, debug, info, instrument, warn};
55
use tracing_indicatif::span_ext::IndicatifSpanExt as _;
66
#[cfg(feature = "openapi")]
@@ -251,7 +251,11 @@ impl DemoSpec {
251251

252252
// Delete remaining objects not namespace scoped
253253
client
254-
.delete_all_objects_with_label("stackable.tech/demo", &uninstall_parameters.demo_name, None)
254+
.delete_all_objects_with_label(
255+
"stackable.tech/demo",
256+
&uninstall_parameters.demo_name,
257+
None,
258+
)
255259
.await
256260
.context(DeleteObjectSnafu)?;
257261

rust/stackable-cockpit/src/platform/stack/params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ pub struct StackUninstallParameters {
2424
pub stack_namespace: String,
2525

2626
pub skip_operators: bool,
27-
pub skip_crds: bool
27+
pub skip_crds: bool,
2828
}

rust/stackable-cockpit/src/platform/stack/spec.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use kube::api::{ApiResource, GroupVersionKind};
21
use serde::{Deserialize, Serialize};
32
use serde_yaml::Mapping;
43
use snafu::{OptionExt, ResultExt, Snafu};
4+
use stackable_operator::kube::api::{ApiResource, GroupVersionKind};
55
use tracing::{Span, debug, info, instrument, log::warn};
66
use tracing_indicatif::span_ext::IndicatifSpanExt as _;
77
#[cfg(feature = "openapi")]
@@ -248,14 +248,17 @@ impl StackSpec {
248248

249249
// Delete remaining objects not namespace scoped
250250
client
251-
.delete_all_objects_with_label("stackable.tech/stack", &uninstall_parameters.stack_name, None)
251+
.delete_all_objects_with_label(
252+
"stackable.tech/stack",
253+
&uninstall_parameters.stack_name,
254+
None,
255+
)
252256
.await
253257
.context(DeleteObjectSnafu)?;
254258

255259
// Delete operators and the operator namespace
256260
if !uninstall_parameters.skip_operators {
257-
self
258-
.uninstall_release(release_list, &uninstall_parameters.operator_namespace)
261+
self.uninstall_release(release_list, &uninstall_parameters.operator_namespace)
259262
.await?;
260263

261264
client

rust/stackable-cockpit/src/utils/k8s/client.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,27 @@ use std::{collections::BTreeMap, string::FromUtf8Error};
33
use reqwest::StatusCode;
44
use serde::Deserialize;
55
use snafu::{OptionExt, ResultExt, Snafu};
6-
use tokio::{
7-
sync::RwLock,
8-
time::{self, sleep},
9-
};
106
use stackable_operator::{
117
crd::listener::v1alpha1::Listener,
12-
k8s_openapi::api::{
13-
apps::v1::{Deployment, StatefulSet},
14-
core::v1::{Endpoints, Namespace, Node, Secret, Service},
8+
k8s_openapi::{
9+
api::{
10+
apps::v1::{Deployment, StatefulSet},
11+
core::v1::{Endpoints, Namespace, Node, Secret, Service},
12+
},
13+
apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition,
1514
},
1615
kube::{
1716
self, Api, Discovery, ResourceExt,
1817
api::{DeleteParams, ListParams, Patch, PatchParams, PostParams},
1918
core::{DynamicObject, GroupVersionKind, ObjectList, ObjectMeta, TypeMeta},
20-
discovery::{ApiCapabilities, ApiResource, Scope},
19+
discovery::{self, ApiCapabilities, ApiResource, Scope},
2120
},
2221
kvp::Labels,
2322
};
23+
use tokio::{
24+
sync::RwLock,
25+
time::{self, sleep},
26+
};
2427
use tracing::{Span, info, instrument};
2528
use tracing_indicatif::{indicatif_eprintln, span_ext::IndicatifSpanExt as _};
2629

rust/stackablectl/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Added
8+
9+
- Add `uninstall` subcommand for `demo`/`stack` commands ([#429]).
10+
711
### Changed
812

913
- Bump Rust to `1.93.0` as well as dependencies ([#426]).
1014
- Bump Go to `1.26.0` as well as dependencies ([#426]).
1115

1216
[#426]: https://github.com/stackabletech/stackable-cockpit/pull/426
17+
[#429]: https://github.com/stackabletech/stackable-cockpit/pull/429
1318

1419
## [1.2.2] - 2025-12-03
1520

rust/stackablectl/src/cmds/demo.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ use stackable_cockpit::{
2121
},
2222
xfer,
2323
};
24-
use stackable_operator::{
25-
kvp::{LabelError, Labels},
26-
};
24+
use stackable_operator::kvp::{LabelError, Labels};
2725
use tracing::{Span, debug, info, instrument};
2826
use tracing_indicatif::{self, span_ext::IndicatifSpanExt as _};
2927

@@ -548,8 +546,8 @@ async fn uninstall_cmd(
548546
demo_name: args.demo_name.clone(),
549547
operator_namespace: args.namespaces.operator_namespace.clone(),
550548
demo_namespace: args.namespaces.namespace.clone(),
551-
skip_operators: args.skip_operators_and_crds.clone(),
552-
skip_crds: args.skip_operators_and_crds.clone(),
549+
skip_operators: args.skip_operators_and_crds,
550+
skip_crds: args.skip_operators_and_crds,
553551
},
554552
&client,
555553
transfer_client,

rust/stackablectl/src/cmds/stack.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ use stackable_cockpit::{
2121
},
2222
xfer,
2323
};
24-
use stackable_operator::{
25-
kvp::{LabelError, Labels},
26-
};
24+
use stackable_operator::kvp::{LabelError, Labels};
2725
use tracing::{Span, debug, info, instrument};
2826
use tracing_indicatif::span_ext::IndicatifSpanExt as _;
2927

@@ -499,8 +497,8 @@ async fn uninstall_cmd(
499497
stack_name: args.stack_name.clone(),
500498
operator_namespace: args.namespaces.operator_namespace.clone(),
501499
stack_namespace: args.namespaces.namespace.clone(),
502-
skip_operators: args.skip_operators_and_crds.clone(),
503-
skip_crds: args.skip_operators_and_crds.clone(),
500+
skip_operators: args.skip_operators_and_crds,
501+
skip_crds: args.skip_operators_and_crds,
504502
},
505503
&client,
506504
transfer_client,

0 commit comments

Comments
 (0)