simvue-io / simvue-io/python-api
Sender will fail to upload file artifact if it changes between creation and sending
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 4
- Forks
- 1
- Merge medio
- 5 d 8 h
- PR fusionados (30 d)
- 4
Descripción
Description of Bug
When creating an Artifact via run.save_file(), the checksum is calculated and stored in the artifact JSON in the cache, along with the path to the file. If that file is then changed between the time when it was asked to be saved by the user, and when it is actually sent by the sender(), the checksum will no longer match the file, and so the upload will fail. You'll get back an error like:
E RuntimeError: uploading artifact 'test_file_artifact_6c49f901' to object storage failed for url '[https://simvue-ci.s3.amazonaws.com/'](https://simvue-ci.s3.amazonaws.com/%27) with status 400: <?xml version="1.0" encoding="UTF-8"?>
E <Error><Code>BadDigest</Code><Message>The SHA256 you specified did not match the calculated checksum.</Message></Error>
Steps To Reproduce
Steps to reproduce the behavior:
- Create a run in offline mode
- Create a file
- Do
run.save_file() - Change the contents of the file
- Run
sender()
Expected behavior
The file should be uploaded (I guess as it was when the user called save_file()
Actual Behaviour
Error due to mismatched checksum
Setup
- OS: Ubuntu 22.04
- Python version 3.10
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.
Línea de trabajo
Comienza siguiendo el flujo del artefacto desde run.save_file() pasando por el JSON del artefacto almacenado en caché hasta sender(), centrándote en cuándo se leen la suma de comprobación y el contenido del archivo. Reproduce los pasos del modo sin conexión del issue y verifica que un archivo modificado después de save_file() se cargue correctamente sin un error BadDigest.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- backend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100