aboutcode-org / aboutcode-org/purldb

Incorrect set comparison between package names and PURLs in NPM sync logic

Aperta
#890 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
HTML
Stelle
67
Fork
69
Merge medio
8g 8h
PR unite (30g)
1

Descrizione

This line https://github.com/aboutcode-org/purldb/blob/main/minecode_pipelines/pipes/npm.py#L234
`packages_to_sync = list(set(packages).difference(set(synced_packages)))`

does not work because the the "synced_packages" is a list of PURLs (see https://raw.githubusercontent.com/aboutcode-data/minecode-pipelines-config/refs/heads/main/npm/packages_checkpoint.json) while the "packages" is a list of the package names (see https://github.com/aboutcode-org/purldb/blob/main/minecode_pipelines/miners/npm.py#L129)

In another word, the elements in these two sets never match, so everything between these 2 sets are always different.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.