Skip to content

rust(feature): support calculated channels in cli#501

Open
tsift wants to merge 5 commits intomainfrom
rust/support-calculated-channels-in-cli
Open

rust(feature): support calculated channels in cli#501
tsift wants to merge 5 commits intomainfrom
rust/support-calculated-channels-in-cli

Conversation

@tsift
Copy link
Contributor

@tsift tsift commented Mar 20, 2026

Adds support in the sift-cli export sub-command for calculated channels.

Previously these were entirely unsupported, though now they can be specified with similar semantics to regular channels.
This should match the export capability through the UI.

@solidiquis solidiquis changed the title Rust/support calculated channels in cli rust(feature): support calculated channels in cli Mar 20, 2026

/// Regular expression used to filter calculated channels to include in the export
#[arg(long)]
pub calc_channel_regex: Option<String>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we just call it calculated_channel_* for uniformity with docs/language/etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


let asset_ids = vec![asset_id.to_string()];
let scope = ResolveScope::Assets(&asset_ids);
let mut calculated_channel_configs: Vec<CalculatedChannelConfig> = Vec::new();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like type inference would already work here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tsift tsift requested a review from solidiquis March 20, 2026 22:13
.into_inner();

if assets.is_empty() {
return Err(anyhow!("no run found"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not from your PR, but can we fix this typo? It should say no asset found.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also turn this into a bail!

}

let export_req = ExportDataRequest {
channel_ids,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a user provides only invalid channels or calculated channels, it looks like we revert back to exporting the whole run if I understand this correctly. Should we in that case just return an error instead? Otherwise we're kicking off a huge job the user probably doesn't want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants