pingcap / pingcap/tiup

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

Open
#2,399 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/bug
Dominant language
Go
Stars
466
Forks
338
Avg merge
3d 7h
Merged PRs (30d)
8

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the tiup mirror renew alertmanager --days 365 command and its metadata-signing flow. Inspect how timestamp.json and snapshot.json are produced or updated; the work is done when their signed.expires values are renewed along with the other JSON files and the local repository remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.