Skip to content

remove unused vmaas_cache - #2376

Open
MichaelMraka wants to merge 1 commit into
RedHatInsights:masterfrom
MichaelMraka:pr3
Open

MichaelMraka wants to merge 1 commit into
RedHatInsights:masterfrom
MichaelMraka:pr3

Conversation

@MichaelMraka

@MichaelMraka MichaelMraka commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

simplify code
remove feature unused since 2024 due to memory issues

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

Remove the obsolete VMaaS cache from evaluation and monitoring while preserving and clarifying update status behavior through direct VMaaS calls.

Enhancements:

  • Remove the unused VMaaS response cache and its configuration, metrics, dashboard panels, and dependency to simplify evaluation and avoid cache-related memory overhead.

Tests:

  • Update evaluator tests to exercise direct VMaaS responses and consolidate platform update coverage without relying on the removed cache.

@MichaelMraka
MichaelMraka requested a review from a team as a code owner October 30, 2026 15:10
@sourcery-ai

sourcery-ai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

The PR removes the unused VMaaS response cache end to end, including runtime behavior, configuration, metrics, dashboard visibility, implementation dependency, and cache-dependent tests; the evaluator tests now validate direct VMaaS calls and expected advisory-status merging behavior.

File-Level Changes

Change Details Files
Removed the VMaaS response cache and all associated configuration, lifecycle management, metrics, dependencies, and dashboard panels.
  • Deleted cache lookup, deep-copy, insertion, validity-check, and initialization paths.
  • Removed VMaaS cache configuration flags, Prometheus metrics, and the unused copier dependency.
  • Removed Grafana panels for VMaaS cache hit ratio and cache size.
evaluator/evaluate.go
evaluator/metrics.go
evaluator/vmaas_cache.go
go.mod
go.sum
dashboards/app-sre/grafana-dashboard-insights-patchman-engine-general.configmap.yaml
Updated evaluator tests to exercise live VMaaS responses instead of prepopulated cache data and to share representative platform fixtures.
  • Removed cache-specific setup and the cache behavior test.
  • Added shared VMaaS/YUM fixtures and status-map assertions for Satellite, bootc, and template advisory evaluation.
  • Added coverage that template advisory evaluation excludes yum-only updates and preserved expected installable/applicable statuses.
evaluator/evaluate_test.go
evaluator/template_advisory_e2e_test.go
evaluator/template_advisory_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[bot]
sourcery-ai Bot previously approved these changes Oct 30, 2026

@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 assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

simplify code
remove feature unused since 2024 due to memory issues

@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.

Sourcery assessment

Approved.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.05%. Comparing base (6d3658d) to head (ceb3f6e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2376      +/-   ##
==========================================
- Coverage   60.14%   60.05%   -0.09%     
==========================================
  Files         158      157       -1     
  Lines       10161    10101      -60     
==========================================
- Hits         6111     6066      -45     
+ Misses       3424     3413      -11     
+ Partials      626      622       -4     
Flag Coverage Δ
unittests 60.05% <100.00%> (-0.09%) ⬇️

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.

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