RHINENG-26118: add patchman.advisory.update Kafka topic#2194
Open
katarinazaprazna wants to merge 3 commits into
Open
RHINENG-26118: add patchman.advisory.update Kafka topic#2194katarinazaprazna wants to merge 3 commits into
patchman.advisory.update Kafka topic#2194katarinazaprazna wants to merge 3 commits into
Conversation
Reviewer's GuideAdds configuration and contract support for a new File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2194 +/- ##
==========================================
- Coverage 59.06% 59.06% -0.01%
==========================================
Files 136 137 +1
Lines 8761 8775 +14
==========================================
+ Hits 5175 5183 +8
- Misses 3040 3044 +4
- Partials 546 548 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f36b936 to
e0d1034
Compare
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="base/mqueue/advisory_update_event_test.go" line_range="34" />
<code_context>
+ assert.Equal(t, *event.WorkspaceID, *parsed.WorkspaceID)
+ assert.Equal(t, event.InventoryID, parsed.InventoryID)
+ assert.Equal(t, event.AdvisoryIDs, parsed.AdvisoryIDs)
+ assert.NotNil(t, parsed.ProducedAt)
+}
+
</code_context>
<issue_to_address>
**suggestion (testing):** Strengthen the assertion to verify the `ProducedAt` value is preserved, not just non-nil.
Since `ProducedAt` is set before marshaling, assert equality with the original value (e.g. `assert.Equal(t, *event.ProducedAt, *parsed.ProducedAt)`) rather than just non-nil, so the timestamp round-trip is fully verified. The same pattern can be applied to the other tests that currently use `assert.NotNil` on `ProducedAt`.
Suggested implementation:
```golang
assert.Equal(t, *event.WorkspaceID, *parsed.WorkspaceID)
assert.Equal(t, event.InventoryID, parsed.InventoryID)
assert.Equal(t, event.AdvisoryIDs, parsed.AdvisoryIDs)
assert.NotNil(t, parsed.ProducedAt)
assert.Equal(t, *event.ProducedAt, *parsed.ProducedAt)
```
To fully apply your comment across the test suite, also:
1. Search in `base/mqueue/advisory_update_event_test.go` for other occurrences of `assert.NotNil(t, parsed.ProducedAt)` (or similar patterns with a different variable name, e.g. `assert.NotNil(t, parsedEvent.ProducedAt)`).
2. For each occurrence, add an equality assertion of the form `assert.Equal(t, *<originalEventVar>.ProducedAt, *<parsedVar>.ProducedAt)` next to or instead of the `NotNil` check, using the appropriate variable names for that test.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
MichaelMraka
previously requested changes
May 15, 2026
Kafka topics are provisioned externally by the Platform team, Clowder does not need to create them. Our components reference topics via environment variables in their deployment specs, which are independent of this section.
e0d1034 to
1c16d3d
Compare
45b4ade to
1c16d3d
Compare
TenSt
requested changes
May 15, 2026
8bf6cdc to
422341b
Compare
422341b to
c62a807
Compare
TenSt
approved these changes
May 15, 2026
All the requested changes were implemented
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.
patchman.advisory.updateKafka topic configkafkaTopicssection from ClowdApp - topics are provisioned externally by the Platform teamAdvisoryUpdateEventmessage contract andWriteEventsfunctionSecure Coding Practices Checklist GitHub Link
Secure Coding Checklist
Summary by Sourcery
Add configuration and infrastructure support for a new advisory update Kafka topic.
New Features:
Build:
Summary by Sourcery
Add support for publishing advisory update events to Kafka and align topic configuration with external provisioning.
New Features:
Enhancements:
Deployment:
Tests: