Skip to content

feat: AdvisoryUpdateEvent supports multiple workspace IDs#2222

Closed
katarinazaprazna wants to merge 1 commit into
RedHatInsights:masterfrom
katarinazaprazna:modify-update-advisory-event-contract
Closed

feat: AdvisoryUpdateEvent supports multiple workspace IDs#2222
katarinazaprazna wants to merge 1 commit into
RedHatInsights:masterfrom
katarinazaprazna:modify-update-advisory-event-contract

Conversation

@katarinazaprazna
Copy link
Copy Markdown
Collaborator

@katarinazaprazna katarinazaprazna commented Jun 1, 2026

Updated AdvisoryUpdateEvent structure to support multiple workspace IDs

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 advisory update events targeting multiple workspaces instead of a single workspace ID.

New Features:

  • Allow AdvisoryUpdateEvent to carry multiple workspace identifiers per event.

Enhancements:

  • Change AdvisoryUpdateEvent schema to use a list of workspace IDs rather than a single workspace ID.
  • Update advisory update event tests to cover the new multi-workspace payload shape.

Updated AdvisoryUpdateEvent structure to support multiple workspace IDs
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Jun 1, 2026

Reviewer's Guide

AdvisoryUpdateEvent now supports multiple workspaces by replacing the single UUID workspace_id with a slice of workspace_ids strings, and updating related tests and dependencies accordingly.

File-Level Changes

Change Details Files
Refactor AdvisoryUpdateEvent to use multiple workspace IDs instead of a single UUID workspace ID.
  • Replace WorkspaceID uuid.UUID field with WorkspaceIDs []string in AdvisoryUpdateEvent and update JSON tag to workspace_ids
  • Remove google/uuid import now that UUID type is no longer used
  • Keep other fields (RhAccountID, AdvisoryIDs, ProducedAt) unchanged aside from alignment
base/mqueue/advisory_update_event.go
Update tests to match the new AdvisoryUpdateEvent WorkspaceIDs field and verify serialization and write behavior.
  • Introduce testWorkspaceIDs slice of deterministic UUID strings instead of a single generated UUID
  • Update AdvisoryUpdateEvent construction in tests to use WorkspaceIDs instead of WorkspaceID
  • Adjust assertions to compare WorkspaceIDs slices after marshal/unmarshal and during write events validation
  • Remove uuid usage from tests and keep ProducedAt checks intact
base/mqueue/advisory_update_event_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

@katarinazaprazna katarinazaprazna changed the title feat: update AdvisoryUpdateEvent to support multiple workspace IDs feat: AdvisoryUpdateEvent supports multiple workspace IDs Jun 1, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.03%. Comparing base (743010c) to head (ba6bfbc).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2222      +/-   ##
==========================================
+ Coverage   59.00%   59.03%   +0.02%     
==========================================
  Files         137      137              
  Lines        8831     8831              
==========================================
+ Hits         5211     5213       +2     
+ Misses       3072     3070       -2     
  Partials      548      548              
Flag Coverage Δ
unittests 59.03% <ø> (+0.02%) ⬆️

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.

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