APTrust / dart-runner

Run DART jobs and workflows without a GUI.
BSD 2-Clause "Simplified" License
5 stars 0 forks source link

DART runner writes incorrect tag values in workflow batch mode #9

Closed diamondap closed 1 year ago

diamondap commented 1 year ago

From Josh Westguard at UMD:

I have been troubleshooting some issues I noticed with the tags for some of the bags submitted with dart-runner's batch mode, and I think I have discovered a bug. I suspect that concurrency may play a role. I've been able to reproduce the error with test data, and so I'm attaching that.

The effect is that dart-runner creates bags with tags from the wrong lines of the spreadsheet. It appears to consistently create correctly named bag.tar files, containing the correct payload, so the error seems to be limited to the metadata.

I hope this is helpful. Feel free to reach out if you have questions. I'm reasonably certain that this is a bug and not human error, though one should never rule out the latter.

Josh


Steps to reproduce -- using the attached bug-test.tar.gz and a workflow configured to bag locally with no upload, run these commands:

(1) remove the files from bug-test/output

find bug-test/output -type f -delete

(2) re-create the bags using the attached tag file

./dart-runner --workflow=workflows/prod-no-upload.json --batch=bug-test/input/tags.csv --delete=false --concurrency=2 --output-dir=bug-test/output/bags

(3) extract the tags from the tar files into the directory bug-test/output/tags

for p in $(ls bug-test/output/bags/*); do f=$(basename $p); tar --extract --verbose --file=$p --directory=bug-test/output/tags --wildcards --no-wildcards-match-slash ${f%.tar}/*.txt; done

(4) observe that the tags in aptrust-info and bag-info are not from the correct spreadsheet rows.

See attachments. We have reproduced this, and it is a bug.

diamondap commented 1 year ago

Files to reproduce:

bug-test.tar.gz prod-no-upload.json.zip

diamondap commented 1 year ago

Summary of the effect of this bug:

diamondap commented 1 year ago

This bug is fixed in release 0.96-beta. To download the latest version of DART Runner, go to https://aptrust.github.io/dart-docs/users/dart_runner/#downloads