Validators cause unwanted fetch of file URL
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 42/100
Línea de trabajo
Comienza con la lógica del validador en pywps/validator/complexvalidator.py en las líneas indicadas y con la implementación de UrlHandler.file en pywps/inout/basic.py. Reproduce el problema con un ComplexInput que use MODE.SIMPLE y una URL remota. Se considera terminado cuando la validación simple comprueba el tipo sin obtener la URL, mientras que la validación estricta mantiene la obtención del contenido cuando sea necesario.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
When the WPS execution occurs and that an input reference URL (for example remote JSON for below references), the format validator will actually pull the file because file property refers to UrlHandler.file, which in turn does the request and write the chucks locally.
In UrlHandler.file :
https://github.com/geopython/pywps/blob/d05483d75e753b3cda303f5c0bb778a0f9465393/pywps/inout/basic.py#L461-L467
This might be ok for usual data processing execution because most processes want the file to be generated locally at some point, but it shouldn't be done during validation when MODE < STRICT as it is not required for checking the extension from the name (which is what MODE.SIMPLE attempts to do).
The behavior is valid when MODE >= STRICT because the full contents are validated, but it is not required for simple mime-type checks.
My general use case is that I need to reference https://<somewhere> files and pass them down to further remote processes. Therefore, I want to validate that the file type is correct, but not fetch them right away (the child process will do so).
As the file could be quite big, fetching it 2 times (parent/child process) for basic validation is not great. Since the file is not required locally until I explicitly call file property, the validator shouldn't do so if it doesn't need it.
Environment
- operating system:
- Python version:
- PyWPS version: 4.2.4
- source/distribution
- git clone
- Debian
- PyPI
- zip/tar.gz
- other (please specify):
- web server
- Apache/mod_wsgi
- CGI
- other (please specify):
Steps to Reproduce
- Setup a WPS with an
ComplexInputand some format withMODE.SIMPLE. - Execute the WPS process and see that the file is fetched before even arriving in the handler.
Additional Information
Part of requirements for developing OGC EMS which dispatches execution to remote ADES.
https://github.com/crim-ca/weaver
- Lenguaje dominante
- Python
- Estrellas
- 186
- Forks
- 117
- Merge medio
- 17 d 23 h
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni 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 geopython/pywps
-
ReadTheDocs OAuth App InstallationQuizá libre de nuevo @tomkralidis la tomó hace 92 días y no hay ningún pull request abierto. Abiertodocumentation
-
Modernizing the packaging of the libraryQuizá libre de nuevo @Zeitsperre la tomó hace 305 días y no hay ningún pull request abierto. Abiertodocumentation enhancement packaging
-
DBLog test are bound to other testPosiblemente ocupada @C1-BA-B1-F3 la tomó hace 17 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
ComplexOutput data as reference always generates a file named "input.csv", should be "output".Posiblemente ocupada @C1-BA-B1-F3 la tomó hace 17 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Todos los issues de geopython/pywps
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
[Device Support Request] HOBEIAN ZG-204ZL (Tuya PIR motion sensor with illuminance)Posiblemente ocupada @lenucksi la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
zigpy/zha-device-handlers#5493 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
drevendev/BeautifulRepo#42 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
writerslogic/holographic-memory#93 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
antoine-tena/kiln#47 ·
Los mantenedores suelen responder en 1 día