simvue-io / simvue-io/python-api
Sender will fail to upload file artifact if it changes between creation and sending
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 4
- Forks
- 1
- Ø Merge
- 5 T. 8 Std.
- Gemergte PRs (30 T.)
- 4
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, den Artefaktfluss von run.save_file() über das zwischengespeicherte Artefakt-JSON bis zu sender() nachzuverfolgen, und konzentriere dich darauf, wann die Prüfsumme und der Dateiinhalt gelesen werden. Reproduziere die Schritte für den Offline-Modus aus dem Issue und verifiziere, dass eine Datei, die nach save_file() geändert wurde, ohne einen BadDigest-Fehler erfolgreich hochgeladen wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- backend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100