Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem in stats watcher #221

Merged

Conversation

joselsegura
Copy link
Collaborator

Description

StatsWatcher class now is an EngineWatcher, so it receives on_extract events. The current implementation is buggy, as it expects to receive always an Insights "extractor" object (one of TarExtractor or ZipExtractor). But currently the MultiplexorEngine, for example, is providing a different object (tarfile.TarFile) with a different interface.

The new implementation takes into account those differences

Fixes #CCXDEV-12836

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Testing steps

New unit tests

Checklist

  • pre-commit run -a passes
  • updated documentation wherever necessary
  • added or modified tests if necessary
  • updated schemas and validators in insights-data-schemas in case of input/output change

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.10%. Comparing base (2bfb4a0) to head (9b6a660).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #221      +/-   ##
==========================================
+ Coverage   85.38%   86.10%   +0.72%     
==========================================
  Files          34       34              
  Lines        1197     1209      +12     
==========================================
+ Hits         1022     1041      +19     
+ Misses        175      168       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joselsegura joselsegura merged commit a49ab0e into RedHatInsights:main May 14, 2024
8 checks passed
@joselsegura joselsegura deleted the stats_watcher_interface branch May 14, 2024 10:31
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