Skip to content

feat(RHINENG-29493): add Satellite workload - #2301

Merged
katarinazaprazna merged 1 commit into
RedHatInsights:masterfrom
computercamplove:RHINENG-29493
Aug 12, 2026
Merged

katarinazaprazna merged 1 commit into
RedHatInsights:masterfrom
computercamplove:RHINENG-29493

Conversation

@computercamplove

@computercamplove computercamplove commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

add Satellite workload
https://redhat.atlassian.net/browse/RHINENG-29493

Backend Implementation

The backend (HBI + puptoo) now supports Satellite workload detection.

### Schema (`workloads.satellite`)

```json
{
  "workloads": {
    "satellite": {
      "type": "server",       // enum: "server" | "capsule"
      "version": "6.17.6.1"   // string, max 30 chars, supports wildcard filtering
    }
  }
}

Secure Coding Practices Checklist GitHub Link

Secure Coding Checklist

  • Input Validation
  • Output Encoding
  • Authentication and Password Management
  • Session Management
  • Access Control
  • Cryptographic Practices
  • Error Handling and Logging
  • Data Protection
  • Communication Security
  • System Configuration
  • Database Security
  • File Management
  • Memory Management
  • General Coding Practices

Summary by Sourcery

Support Satellite workload detection and storage across the ingestion pipeline and inventory API, including schema, database, and filtering updates.

New Features:

  • Add Satellite workload support to host system profiles and inventory records, including type and version metadata.
  • Enable filtering of systems by Satellite workload via system_profile filters.

Enhancements:

  • Extend workload-related upload and listener logic to persist Satellite workload presence in the system_inventory table.

Deployment:

  • Introduce database migrations to add and remove the satellite_workload flag column in system_inventory.

Tests:

  • Add and update tests and seed data to cover Satellite workload detection, storage, and API filtering behavior.

@computercamplove
computercamplove requested a review from a team as a code owner August 12, 2026 08:47
@sourcery-ai

sourcery-ai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds Satellite workload support end-to-end: schema/model definitions, ingestion, persistence, filtering, and test coverage for the new workloads.satellite attribute and its boolean inventory flag.

File-Level Changes

Change Details Files
Add Satellite workload representation to inventory/workload schema.
  • Extend Workloads struct with Satellite field and define SatelliteWorkload struct holding type and version.
  • Ensure test host profiles include Satellite workload data for integration-style tests.
base/inventory/inventory.go
listener/common_test.go
Persist Satellite workload presence in system_inventory and expose it via models.
  • Add satellite_workload BOOLEAN column to system_inventory schema and migration up/down scripts.
  • Extend SystemInventory model with SatelliteWorkload bool field mapped to the new column.
  • Update dev/test_data.sql inserts to populate satellite_workload for relevant test systems.
database_admin/schema/create_schema.sql
database_admin/migrations/164_add_satellite_workload.up.sql
database_admin/migrations/164_add_satellite_workload.down.sql
base/models/models.go
dev/test_data.sql
Wire Satellite workload into upload pipeline and inventory flag computations.
  • Include satellite_workload in the list of updatable columns in updateSystemPlatform.
  • Set SatelliteWorkload flag based on presence of Satellite.Type in host SystemProfile during uploads.
  • Assert SatelliteWorkload is correctly stored and updated in upload-related tests.
listener/upload.go
listener/upload_test.go
Enable API filtering on Satellite workload and cover it with controller tests.
  • Add system_profile][satellite filter mapping to workloadFilters so queries can filter by Satellite workload presence.
  • Introduce TestSatelliteFilter to validate filtering behavior, total items, returned ID, and meta filter map.
manager/controllers/utils.go
manager/controllers/systems_test.go

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@computercamplove
computercamplove force-pushed the RHINENG-29493 branch 2 times, most recently from 0b125c0 to 6e4222e Compare August 12, 2026 09:16
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.83%. Comparing base (e7bcdb1) to head (6e4222e).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2301   +/-   ##
=======================================
  Coverage   58.83%   58.83%           
=======================================
  Files         150      150           
  Lines        9597     9599    +2     
=======================================
+ Hits         5646     5648    +2     
  Misses       3359     3359           
  Partials      592      592           
Flag Coverage Δ
unittests 58.83% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@TenSt TenSt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@TenSt TenSt self-assigned this Aug 12, 2026
@katarinazaprazna
katarinazaprazna merged commit 2144060 into RedHatInsights:master Aug 12, 2026
8 checks passed
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.

4 participants