Skip to content

Add ALL wildcard support to streaming API packet subscriptions#2940

Merged
jmthomas merged 7 commits into
mainfrom
stream_all
Mar 6, 2026
Merged

Add ALL wildcard support to streaming API packet subscriptions#2940
jmthomas merged 7 commits into
mainfrom
stream_all

Conversation

@jmthomas
Copy link
Copy Markdown
Member

@jmthomas jmthomas commented Mar 5, 2026

Allow clients to subscribe to all packets using ALL in place of target or packet name (e.g. DECOM__CMD__ALL__CONVERTED) instead of listing every packet individually. The server expands ALL into concrete packet keys at subscription time, skipping UNKNOWN targets/packets and silently skipping unauthorized packets. This reduces the subscription message from 1000+ entries to a single key for CommandHistory.

Allow clients to subscribe to all packets using ALL in place of target
or packet name (e.g. DECOM__CMD__ALL__CONVERTED) instead of listing
every packet individually. The server expands ALL into concrete packet
keys at subscription time, skipping UNKNOWN targets/packets and
silently skipping unauthorized packets. This reduces the subscription
message from 1000+ entries to a single key for CommandHistory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jmthomas jmthomas requested a review from ryanmelt March 5, 2026 21:00
type = (cmd_or_tlm == 'CMD') ? :CMD : :TLM
targets = OpenC3::TargetModel.names(scope: scope)
targets.each do |target_name|
next if target_name == 'UNKNOWN'
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I added the filter for UNKNOWN because it was crashing the stream

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

UNKNOWN should be valid for RAW but not for DECOM.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 94.59459% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.47%. Comparing base (2f44e13) to head (fc1f450).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...nc3-cosmos-cmd-tlm-api/app/models/streaming_api.rb 94.59% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2940      +/-   ##
==========================================
+ Coverage   77.81%   78.47%   +0.66%     
==========================================
  Files         453      673     +220     
  Lines       33986    55311   +21325     
  Branches      728      728              
==========================================
+ Hits        26447    43407   +16960     
- Misses       7461    11826    +4365     
  Partials       78       78              
Flag Coverage Δ
python 79.75% <ø> (-16.29%) ⬇️
ruby-api 80.56% <94.59%> (-0.49%) ⬇️
ruby-backend 82.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread openc3-cosmos-cmd-tlm-api/app/models/streaming_api.rb Outdated
type = (cmd_or_tlm == 'CMD') ? :CMD : :TLM
targets = OpenC3::TargetModel.names(scope: scope)
targets.each do |target_name|
next if target_name == 'UNKNOWN'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

UNKNOWN should be valid for RAW but not for DECOM.

@jmthomas jmthomas requested a review from ryanmelt March 6, 2026 00:51
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 6, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
12.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@jmthomas jmthomas merged commit fecedaf into main Mar 6, 2026
50 of 52 checks passed
@jmthomas jmthomas deleted the stream_all branch March 6, 2026 04:16
jmthomas added a commit that referenced this pull request Mar 21, 2026
Add ALL wildcard support to streaming API packet subscriptions
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.

2 participants