tiup icon indicating copy to clipboard operation
tiup copied to clipboard

tiup mirror renew doesn’t update signature on timestamp.json and snapshot.json

Open borissavelev opened this issue 1 year ago • 2 comments

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

I have a local TiUP repository. It looks like the default expiration time for custom components is 1 month. But, you can use the command tiup mirror renew to extend the expiration date. The issue is that this command doesn't update all JSON files, leading to problems with using the repository.

tiup mirror renew alertmanager --days 365
  1. What did you expect to see?

Correct expires in all JSON files, including timestamp and snapshot

  1. What did you see instead?
for f in *.json ; do printf '%s %s\n' $f  $(jq '.signed.expires' $f) ; done | grep 2024
snapshot.json "2024-05-03T20:48:47+03:00"
timestamp.json "2024-05-03T20:48:47+03:00"
  1. What version of TiUP are you using (tiup --version)?
1.15.0 v1.15.0-nightly-1
Go Version: go1.21.8
Git Ref: master
GitHash: 6f016925ab0d259bb07657f5ab83f2a2d7ef5656

borissavelev avatar Apr 04 '24 06:04 borissavelev

tiup does not support renew these json. you could renew them by 'tiup mirror publish' or 'tiup mirror modify '

kaaaaaaang avatar Apr 26 '24 06:04 kaaaaaaang

thanks for the reply!

it doesn’t indeed. The problem with 'tiup mirror publish' or 'tiup mirror modify' is that you can't specify the expiration period; it's always 1 month (or 30d). I'm looking for an option to make it longer.

borissavelev avatar Apr 26 '24 06:04 borissavelev