fix(evaluator): send always current timestamp in ISO format to inventory views#2238
Merged
jdobes merged 1 commit intoRedHatInsights:masterfrom Feb 24, 2026
Merged
Conversation
…ory views simplifies logic around last_timestamp null value
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the evaluator so that inventory views are always sent with the current UTC timestamp in ISO 8601 format, removes dependency on last_evaluation, and increases build pod resources for the Tekton pipeline build step. Sequence diagram for evaluator sending inventory views with current ISO timestampsequenceDiagram
participant EvaluatorProcessor as EvaluatorProcessor
participant SystemPlatform as SystemPlatform
participant InventoryViews as InventoryViews
EvaluatorProcessor->>SystemPlatform: _evaluate_system()
activate SystemPlatform
SystemPlatform-->>EvaluatorProcessor: inventory_id, org_id, rh_account_id, vulnerability_counts
deactivate SystemPlatform
EvaluatorProcessor->>InventoryViews: send_inventory_views(inventory_id, org_id, rh_account_id, total_cves, critical_cves, high_severity_cves, medium_severity_cves, low_severity_cves, other_severity_cves)
activate InventoryViews
InventoryViews->>InventoryViews: timestamp = datetime_now_utc_isoformat()
InventoryViews-->>EvaluatorProcessor: send message with org_id, timestamp, hosts
deactivate InventoryViews
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
0a9a289 to
a917ed9
Compare
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Now that
send_inventory_viewsalways uses the current time, consider injecting a clock or wrapping the timestamp generation in a small helper to make this behavior easier to test deterministically and to avoid time-sensitive test flakiness. - Since you no longer use
last_evaluation, double-check other callers and any related type hints or documentation forsend_inventory_viewsso they no longer reference or expect that parameter.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Now that `send_inventory_views` always uses the current time, consider injecting a clock or wrapping the timestamp generation in a small helper to make this behavior easier to test deterministically and to avoid time-sensitive test flakiness.
- Since you no longer use `last_evaluation`, double-check other callers and any related type hints or documentation for `send_inventory_views` so they no longer reference or expect that parameter.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
SC Environment Impact AssessmentOverall Impact: ⚪ NONE No SC Environment-specific impacts detected in this PR. What was checkedThis PR was automatically scanned for:
|
rodrigonull
approved these changes
Feb 24, 2026
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.
simplifies logic around last_timestamp null value
Secure Coding Practices Checklist GitHub Link
Secure Coding Checklist
Summary by Sourcery
Ensure inventory view events always include the current UTC timestamp in ISO format and adjust pipeline build resources accordingly.
Bug Fixes:
Build: