Skip to content

Conversation

srinjoydutta03
Copy link
Contributor

This PR refactors MetadataRepository to replace direct calls to

  • self._storage_backend.get(Snapshot.type), self._storage_backend.get(Targets.type), and self._storage_backend.get(Root.type)
  • with the internal methods _storage_load_snapshot(), _storage_load_targets(), and _storage_load_root().

Unit tests are updated accordingly in test_repository.py

Tests

Local tests are sucessfully run without any errors

Closes: #757

CC: @kairoaraujo

@srinjoydutta03 srinjoydutta03 force-pushed the refactor-repository branch 2 times, most recently from e4f70f4 to f5caeb5 Compare May 25, 2025 18:05
@srinjoydutta03 srinjoydutta03 marked this pull request as draft May 25, 2025 18:08
Signed-off-by: Srinjoy Dutta <[email protected]>
@srinjoydutta03 srinjoydutta03 marked this pull request as ready for review May 25, 2025 18:23
@srinjoydutta03
Copy link
Contributor Author

@kairoaraujo Sorry for the unnecessary commits :( , got messed up between the commit histories

Copy link

codecov bot commented May 26, 2025

Codecov Report

Attention: Patch coverage is 56.52174% with 10 lines in your changes missing coverage. Please review.

Project coverage is 75.84%. Comparing base (714a29d) to head (3319bea).
Report is 201 commits behind head on main.

Files with missing lines Patch % Lines
repository_service_tuf_worker/repository.py 56.52% 10 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (714a29d) and HEAD (3319bea). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (714a29d) HEAD (3319bea)
2 1
Additional details and impacted files
@@             Coverage Diff              @@
##              main     #758       +/-   ##
============================================
- Coverage   100.00%   75.84%   -24.16%     
============================================
  Files           15       14        -1     
  Lines         1071     1511      +440     
============================================
+ Hits          1071     1146       +75     
- Misses           0      365      +365     

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

@kairoaraujo kairoaraujo merged commit 1f726a3 into repository-service-tuf:main Aug 19, 2025
22 checks passed
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.

Task: refactoring and implement use of self._storage_backend.get()
2 participants