Snapshot and Timestamp default content
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia leggendo i costruttori di Snapshot e Timestamp e i metodi Repository.snapshot() e Repository.timestamp() per capire in che modo i relativi metadati predefiniti influenzano i controlli di generazione. Confronta i valori predefiniti proposti empty-dict e MetaFile(0) con le regole di validità esistenti di MetaFile; il lavoro è completato quando gli oggetti appena costruiti non indicano erroneamente che siano stati generati metadati di snapshot o timestamp.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Snapshot and Timestamp constructors try to be clever:
self.meta = meta if meta is not None else {"targets.json": MetaFile(1)}
and
self.snapshot_meta = snapshot_meta or MetaFile(1)
So they set the metafile content without knowing what it really should be
this is annoying as Repository.snapshot() and Repository.timestamp() now think a snapshot and timestamp are not needed -- even though none have been generated yet.
I can work around this but especially for snapshot the default value seems wrong: empty dict would be more correct -- the meta dict should be filled by a conscious decision not by a default value that might be right.
For timestamp there might not be a correct value though. I think MetaFile(0) would be best (although it requires loosening the check for valid MetaFiles): it's at least clear that timestamp doesn't have a snapshot version yet
- Lingua principale
- Python
- Stelle
- 1.7k
- Fork
- 304
- Merge medio
- 1g 2h
- PR unite (30g)
- 17
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di theupdateframework/python-tuf
-
switch to main branch? Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
theupdateframework/python-tuf#3001 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
theupdateframework/python-tuf#2979 · 1 commento ·
-
Use Immutable Releases Apertaenhancement github_actions
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
theupdateframework/python-tuf#2920 · 1 commento · 2 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
theupdateframework/python-tuf#2842 · 3 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
theupdateframework/python-tuf#2836 · 7 commenti ·
Tutte le issue di theupdateframework/python-tuf
Issue simili
-
link-check link-check:sphinx-theme
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
OpenHands/extensions#626 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
CSCfi/sd-search-api#39 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100