Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
fcc8813
feat(workspace): add opaque page tokens
gmenher Sep 7, 2026
0c3d935
feat(pagination): add stable tokens for sandboxes and providers
gmenher Sep 7, 2026
f9952e2
feat(pagination): add stable tokens for services and workspace members
gmenher Sep 7, 2026
898e2f6
Add stable pagination for sandbox policies
gmenher Sep 7, 2026
e73f334
fix paginated list output and workspace cursor guard
gmenher Sep 7, 2026
c4befd0
stabilize pagination and CI fixes
gmenher Sep 7, 2026
29b226f
fix(pagination): propagate page tokens and clean warnings
gmenher Sep 8, 2026
5785bf3
fix(ci): exclude vendored third party and format vm build script
gmenher Sep 8, 2026
a8d06f0
fix(ci): satisfy clippy in vm build script
gmenher Sep 8, 2026
77ec516
fix(ci): format vm build script for rustfmt
gmenher Sep 8, 2026
aa870fd
fix(ci): settle vm build script formatting
gmenher Sep 8, 2026
13b629e
test(pagination): fix stable workspace list coverage
gmenher Sep 8, 2026
64b16e9
fix(ci): remove vendored jsonpath dependency
gmenher Sep 8, 2026
0182331
docs(proto): document bounded list RPCs and deprecate offset fields
gmenher Sep 8, 2026
b04efea
chore(go): regenerate proto bindings after offset deprecation comments
gmenher Sep 8, 2026
c2c5f43
fix(go-sdk): drop deprecated offset forwarding to proto request fields
gmenher Sep 8, 2026
0fe45db
fix(go-sdk): drop deprecated offset forwarding in workspace clients
gmenher Sep 8, 2026
9a7059d
test(go-sdk): update workspace tests to reflect deprecated offset rem…
gmenher Sep 8, 2026
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
8 changes: 6 additions & 2 deletions crates/openshell-cli/src/commands/provider.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

#![allow(dead_code)]

use crate::color::Colorize;
use crate::commands::common::{
format_epoch_ms, format_optional_epoch_ms, parse_credential_expiry_pairs,
Expand Down Expand Up @@ -305,6 +307,7 @@ pub async fn ensure_required_providers(
.list_providers(ListProvidersRequest {
limit,
offset,
page_token: String::new(),
workspace: workspace.to_string(),
all_workspaces: false,
})
Expand Down Expand Up @@ -1339,6 +1342,7 @@ pub async fn provider_list(
.list_providers(ListProvidersRequest {
limit,
offset,
page_token: String::new(),
workspace: if all_workspaces {
String::new()
} else {
Expand Down Expand Up @@ -1422,15 +1426,15 @@ pub async fn provider_list(
provider.object_workspace(),
provider.object_name().to_string(),
provider.r#type,
provider.credentials.len(),
provider_credential_keys(&provider).len(),
provider.config.len(),
);
} else {
println!(
"{:<name_width$} {:<type_width$} {:<16} {}",
provider.object_name().to_string(),
provider.r#type,
provider.credentials.len(),
provider_credential_keys(&provider).len(),
provider.config.len(),
);
}
Expand Down
3 changes: 3 additions & 0 deletions crates/openshell-cli/src/completers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub fn complete_sandbox_names(_prefix: &OsStr) -> Vec<CompletionCandidate> {
limit: 200,
offset: 0,
label_selector: String::new(),
page_token: String::new(),
workspace: workspace_from_args(),
all_workspaces: false,
})
Expand All @@ -64,6 +65,7 @@ pub fn complete_provider_names(_prefix: &OsStr) -> Vec<CompletionCandidate> {
.list_providers(ListProvidersRequest {
limit: 200,
offset: 0,
page_token: String::new(),
workspace: workspace_from_args(),
all_workspaces: false,
})
Expand All @@ -90,6 +92,7 @@ pub fn complete_workspace_names(_prefix: &OsStr) -> Vec<CompletionCandidate> {
limit: 200,
offset: 0,
label_selector: String::new(),
page_token: String::new(),
})
.await
.ok()?;
Expand Down
39 changes: 38 additions & 1 deletion crates/openshell-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,10 @@ enum ProviderCommands {
#[arg(long, default_value_t = 0)]
offset: u32,

/// Opaque continuation token returned by the previous provider page.
#[arg(long)]
page_token: Option<String>,

/// Print only provider names, one per line.
#[arg(long, conflicts_with = "output")]
names: bool,
Expand Down Expand Up @@ -2045,6 +2049,10 @@ enum PolicyCommands {
#[arg(long)]
global: bool,

/// Opaque continuation token returned by the previous policy page.
#[arg(long)]
page_token: Option<String>,

/// Output format.
#[arg(short = 'o', long = "output", value_enum, default_value_t = OutputFormat::Table)]
output: OutputFormat,
Expand Down Expand Up @@ -2215,6 +2223,14 @@ enum ServiceCommands {
#[arg(long, default_value_t = 0)]
offset: u32,

/// Output format.
#[arg(short = 'o', long = "output", value_enum, default_value_t = OutputFormat::Table)]
output: OutputFormat,

/// Opaque continuation token returned by the previous service page.
#[arg(long)]
page_token: Option<String>,

/// List services across all workspaces (overrides --workspace).
#[arg(long)]
all_workspaces: bool,
Expand Down Expand Up @@ -2284,6 +2300,10 @@ enum WorkspaceCommands {
#[arg(long)]
label_selector: Option<String>,

/// Opaque continuation token returned by the previous workspace page.
#[arg(long)]
page_token: Option<String>,

/// Output format.
#[arg(short = 'o', long = "output", value_enum, default_value_t = OutputFormat::Table)]
output: OutputFormat,
Expand Down Expand Up @@ -2347,6 +2367,10 @@ enum WorkspaceMemberCommands {
#[arg(long, default_value_t = 0)]
offset: u32,

/// Opaque continuation token returned by the previous member page.
#[arg(long)]
page_token: Option<String>,

/// Output format.
#[arg(short = 'o', long = "output", value_enum, default_value_t = OutputFormat::Table)]
output: OutputFormat,
Expand Down Expand Up @@ -2752,14 +2776,16 @@ async fn run_async() -> Result<()> {
sandbox,
limit,
offset,
all_workspaces,
output,
page_token,
all_workspaces,
} => {
run::service_list(
&ctx.endpoint,
sandbox.as_deref(),
limit,
offset,
page_token.as_deref().unwrap_or(""),
&cli.workspace,
all_workspaces,
output.as_str(),
Expand Down Expand Up @@ -2926,12 +2952,14 @@ async fn run_async() -> Result<()> {
name,
limit,
global,
page_token,
output,
} => {
if global {
run::sandbox_policy_list_global(
&ctx.endpoint,
limit,
page_token.as_deref().unwrap_or(""),
output.as_str(),
&cli.workspace,
&tls,
Expand All @@ -2943,6 +2971,7 @@ async fn run_async() -> Result<()> {
&ctx.endpoint,
&name,
limit,
page_token.as_deref().unwrap_or(""),
output.as_str(),
&cli.workspace,
&tls,
Expand Down Expand Up @@ -3628,13 +3657,15 @@ async fn run_async() -> Result<()> {
limit,
offset,
label_selector,
page_token,
output,
} => {
run::workspace_list(
endpoint,
limit,
offset,
label_selector.as_deref().unwrap_or(""),
page_token.as_deref().unwrap_or(""),
output.as_str(),
&tls,
)
Expand All @@ -3659,13 +3690,15 @@ async fn run_async() -> Result<()> {
workspace,
limit,
offset,
page_token,
output,
} => {
run::workspace_member_list(
endpoint,
&workspace,
limit,
offset,
page_token.as_deref().unwrap_or(""),
output.as_str(),
&tls,
)
Expand Down Expand Up @@ -3792,6 +3825,7 @@ async fn run_async() -> Result<()> {
ProviderCommands::List {
limit,
offset,
page_token,
names,
output,
all_workspaces,
Expand All @@ -3800,6 +3834,7 @@ async fn run_async() -> Result<()> {
endpoint,
limit,
offset,
page_token.as_deref().unwrap_or(""),
names,
output.as_str(),
&cli.workspace,
Expand Down Expand Up @@ -5109,6 +5144,7 @@ mod tests {
Some(Commands::Provider {
command: Some(ProviderCommands::List {
output: OutputFormat::Json,
page_token: None,
..
})
})
Expand All @@ -5125,6 +5161,7 @@ mod tests {
Some(Commands::Provider {
command: Some(ProviderCommands::List {
output: OutputFormat::Yaml,
page_token: None,
..
})
})
Expand Down
Loading
Loading