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

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

Bug: force metadata update with custom delegation will update all custom delegations #503

Closed MVrachev closed 1 month ago

MVrachev commented 2 months ago

What steps did you take?

Steps to reproduce:

  1. Run make run-dev
  2. Bootstrap using custom delegation payload - https://github.com/repository-service-tuf/repository-service-tuf-api/blob/main/tests/data_examples/bootstrap/payload_custom_targets.json
  3. Call POST /api/v1/metadata/online/ with payload:
    {
    "roles": [
    "targets",
    "foo"
    ]
    }
  4. Check that both foo and bar will be updated when only foo was supposed to be updated
  5. Check logs and see that they say that top-level online roles and foo were updated. bar is not mentioned even though it's updated.

What behavior did you expect?

Update only roles that are required - snapshot, timestamp, targets and foo and DO NOT update bar.

Code of Conduct