Cache refresh policies based on scancode CLI options/scancode output version updates

Offen
#5,472 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
15/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
tooling

Rechercherichtung

The payload names no file or test, so start from the two linked threads: discussion r3948561703 on PR 5289 and issue 3941, which cover cache versioning. The open question is whether to hash the data fields and CLI options into the cache index path, and how stale-cache errors are handled. Maintainers need to settle that design before a patch is meaningful, so done means an agreed policy in the thread, not a code change yet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

maintainers-only

From https://github.com/aboutcode-org/scancode-toolkit/pull/5289#discussion_r3948561703, as a follow up:

Should we include some functionality to re-compute the cache for a file based on data structure changes caused by different versions of scancode, or different CLI options used with different output data formats? There is some discussion on this at https://github.com/aboutcode-org/scancode-toolkit/issues/3941

We need to check that we atleast handle the errors resulting out of this. Additionally it would be nice to somehow include the data format versions in the index cache too, smartly avoiding cache recompute whenever possible.

Output data formats are not always changes based on scancode versions, and an update in the output data format version also doesn't correspond to updates in all the scanner output data. So we need to probably compute a hash based on all the data fields present for a particular scanner data based on the keys present in the mapping and include this in the index file path? This would cover both variations caused by scancode version changes and CLI options used.

Vorherrschende Sprache
Python
Sterne
2.7k
Forks
871
Ø Merge
1 T. 10 Std.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus aboutcode-org/scancode-toolkit

Alle Issues in aboutcode-org/scancode-toolkit

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.