Skip to content

Conversation

dmartinol
Copy link
Collaborator

Fixes #2004

  • Split the monolithic Collector interface with SyncStatusCollector and APIStatusCollector to pass only the needed one to the processing methods
  • Use an Error type to transport condition and phase information to the root, instead of a generic error
  • This way, the low-level methods do not need the collectors because they raise the error that carries the desired information

This change is needed to solve #1749 for error paths: some more changes may needed to fix the e2e tests.

@dmartinol dmartinol requested a review from jhrozek September 25, 2025 16:58
Copy link

codecov bot commented Sep 25, 2025

Codecov Report

❌ Patch coverage is 26.05364% with 193 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.85%. Comparing base (417c167) to head (0efa38f).

Files with missing lines Patch % Lines
...ator/pkg/mcpregistrystatus/mocks/mock_collector.go 0.00% 77 Missing ⚠️
...thv-operator/controllers/mcpregistry_controller.go 0.00% 62 Missing ⚠️
cmd/thv-operator/pkg/sync/manager.go 23.80% 32 Missing ⚠️
cmd/thv-operator/pkg/registryapi/manager.go 0.00% 17 Missing ⚠️
...thv-operator/pkg/registryapi/mocks/mock_manager.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2016      +/-   ##
==========================================
- Coverage   47.91%   47.85%   -0.07%     
==========================================
  Files         233      235       +2     
  Lines       29172    29226      +54     
==========================================
+ Hits        13979    13985       +6     
- Misses      14165    14215      +50     
+ Partials     1028     1026       -2     

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

Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
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.

Review the design of Collector interface
1 participant