tiup mirror renew doesn’t update signature on timestamp.json and snapshot.json
Bug Report
Please answer these questions before submitting your issue. Thanks!
- 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
- What did you expect to see?
Correct expires in all JSON files, including timestamp and snapshot
- 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"
- 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
tiup does not support renew these json. you could renew them by 'tiup mirror publish' or 'tiup mirror modify '
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.