match_unmapped_resources ignores matched_extensions and re-sends those files to PurlDB
Los mantenedores suelen responder en 1 día
@AradhyaTiwari10 ya está trabajando en esto.
Desde el 16/11/2026.
- #2339 de @AradhyaTiwari10 — abierto
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 25/100
Línea de trabajo
Read match_unmapped_resources() in scanpipe/pipes/d2d.py and the corresponding tests in test_d2d.py. The issue reports that the result of .exclude() is discarded; confirm which resources reach the mocked PurlDB matcher when matched_extensions=[".java"]. Done means only the unmatched extension reaches the matcher and the test passes; a linked pull request is already open.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
match_unmapped_resources() in scanpipe/pipes/d2d.py is supposed to skip the extensions that were already looked up in PurlDB by the match_resources_to_purldb step (matched_extensions=self.ecosystem_config.matchable_resource_extensions), but the filter is never applied:
if matched_extensions:
to_unmapped.exclude(extension__in=matched_extensions)
The result of .exclude() is discarded, so to_unmapped still contains every file with a matched extension (for example all the .class files of a Java project) and they are sent to PurlDB a second time.
System configuration
- ScanCode.io
main(39acd55) - Local install, macOS
- Pipeline:
map_deploy_to_develop
To Reproduce
- Create a project with two
to/files that have no status, for exampleBaz.javaandexpected.json. - Call
d2d.match_unmapped_resources(project, matched_extensions=[".java"], logger=print)with_match_purldb_resourcesmocked. - The log says
Mapping 2 to/ resources with empty status in PurlDB using SHA1andBaz.javais passed to the PurlDB matcher.
Expected behavior
Only expected.json is sent to PurlDB (Mapping 1 to/ resources ...). Files with a matched extension still get the requires-review status at the end of the step, as they do today.
Proposed fix: assign the result, to_unmapped = to_unmapped.exclude(extension__in=matched_extensions), plus a unit test in test_d2d.py that calls match_unmapped_resources with matched_extensions and checks which resources reach the matcher. I have the change and the test ready locally and can open a PR.
- Lenguaje dominante
- Python
- Estrellas
- 226
- Forks
- 222
- Merge medio
- 1 d 5 h
- PR fusionados (30 d)
- 32
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aboutcode-org/scancode.io
-
Register Missing Models in Django Admin (DiscoveredLicense, ProjectMessage, CodebaseRelation, Run, WebhookSubscription)Posiblemente ocupada @Rucha0901 la tomó hace 5 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
aboutcode-org/scancode.io#2329 ·
Los mantenedores suelen responder en 1 día
-
ignored_dependency_scopes does not exclude npm devDependenciesPosiblemente ocupada @MGpromax la tomó hace 83 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
aboutcode-org/scancode.io#2215 ·
Los mantenedores suelen responder en 1 día
-
Delivery Error in scan_single_package: No connection adapters were found for '/notifications/send_scan_notification/Quizá libre de nuevo @akshat-lakhera la tomó hace 30 días y no hay ningún pull request abierto. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
aboutcode-org/scancode.io#2206 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
update `run` cli command to run pipelines without an inputPosiblemente ocupada @NoiceHax la tomó hace 95 días. Abiertonice-to-have
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aboutcode-org/scancode.io#2203 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Local developement docs are outdatedPosiblemente ocupada @nik-767 la tomó hace 125 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
aboutcode-org/scancode.io#2197 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de aboutcode-org/scancode.io
Issues similares
-
author-page correction move-papers
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
acl-org/acl-anthology#10978 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
GoogleCloudPlatform/professional-services-data-validator#1899 ·
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
HKUDS/CLI-Anything#652 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Project-N-E-K-O/N.E.K.O#3813 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Dao-AILab/flash-attention#3191 ·
Los mantenedores suelen responder en 4 días