repository-service-tuf / repository-service-tuf-worker

Repository Service for TUF: Worker
MIT License
8 stars 15 forks source link

Add support for custom delegated targets #457

Closed MVrachev closed 3 months ago

MVrachev commented 4 months ago

Fixes #438

Add support for custom delegated targets which could be used by PyPI and other of our users. This will allow for greater flexibility and we could support special use cases for bigger users.

Note: it's related to pr https://github.com/repository-service-tuf/repository-service-tuf-api/pull/542. When testing use both this and the API pr.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (714a29d) to head (d407d1e). Report is 10 commits behind head on main.

:exclamation: Current head d407d1e differs from pull request most recent head 0fa48a7. Consider uploading reports for the commit 0fa48a7 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #457 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 15 15 Lines 1071 1122 +51 ========================================= + Hits 1071 1122 +51 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

MVrachev commented 4 months ago

Ready for review @kairoaraujo.

MVrachev commented 4 months ago

There is only one change remaining in the scope of this pr - adding and removing artifacts.

MVrachev commented 4 months ago

The pr is ready for review. I added support for:

So, @kairoaraujo I think I implemented everything I needed.

kairoaraujo commented 4 months ago

The pr is ready for review. I added support for:

  • bootstrap with custom target delegations
  • automatic updates of custom target delegations
  • update of expiration of custom target delegations
  • add and remove artifacts from/to custom target delegations

So, @kairoaraujo I think I implemented everything I needed.

Hi @MVrachev, It is a fascinating feature. Thank you for your work on it. I'm reviewing and testing it. It is impressive work!

MVrachev commented 3 months ago

@kairoaraujo I rebased on top of main. My changes are only at the last commit where instead of raising a StopIteration I return None as you suggested at _get_role_for_target_path and I logged the target without a delegated role for add_targets as well.