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

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

Task: review how we recover from failures while updating/saving root #512

Open MVrachev opened 1 month ago

MVrachev commented 1 month ago

What is the task about?

We need to make sure that we store our md files in a particular order, so that in case of a failure, we can easily recover. Because of that, the order we need to follow regarding how we update and persist new metadata is the following:

  1. bins/custom delegated target roles
  2. targets
  3. snapshot
  4. timestamp
  5. root

It's great we make sure that we solve the order from 1 to 4 with the implementation of _run_online_roles_bump() (see my comment here https://github.com/repository-service-tuf/repository-service-tuf-worker/pull/501#issuecomment-2084816695), but the question is do we have the same guarantee for root? That's something it's worth a review and if needed to make changes

References

Continuation of https://github.com/repository-service-tuf/repository-service-tuf-worker/issues/494

Code of Conduct