rust(feature): support calculated channels in cli#501
Open
Conversation
solidiquis
requested changes
Mar 20, 2026
rust/crates/sift_cli/src/cli/mod.rs
Outdated
|
|
||
| /// Regular expression used to filter calculated channels to include in the export | ||
| #[arg(long)] | ||
| pub calc_channel_regex: Option<String>, |
Collaborator
There was a problem hiding this comment.
nit: can we just call it calculated_channel_* for uniformity with docs/language/etc?
|
|
||
| let asset_ids = vec![asset_id.to_string()]; | ||
| let scope = ResolveScope::Assets(&asset_ids); | ||
| let mut calculated_channel_configs: Vec<CalculatedChannelConfig> = Vec::new(); |
Collaborator
There was a problem hiding this comment.
I feel like type inference would already work here?
nathan-sift
requested changes
Mar 20, 2026
| .into_inner(); | ||
|
|
||
| if assets.is_empty() { | ||
| return Err(anyhow!("no run found")); |
Contributor
There was a problem hiding this comment.
Not from your PR, but can we fix this typo? It should say no asset found.
Collaborator
There was a problem hiding this comment.
can we also turn this into a bail!
| } | ||
|
|
||
| let export_req = ExportDataRequest { | ||
| channel_ids, |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support in the
sift-cliexportsub-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.