psychoinformatics-de / datalad-debian

DataLad extension for working with Debian packages and package repositories
Other
2 stars 5 forks source link

Addressing #39 #98

Closed bpoldrack closed 1 year ago

bpoldrack commented 2 years ago

Add a marker at the end of the build log for datalad-debian to discover. We want deb-build-package's internal containers-run call to come back zero and commit the log, but deb-build-package needs to be able to discover and report that something went wrong.

In opposition to what's described under 1. in https://github.com/psychoinformatics-de/datalad-debian/issues/39#issuecomment-1181529398, we now get this (returns non-zero):

❱ datalad deb-build-package hello_2.10-2.dsc                                      
['hello_2.10.orig.tar.gz', 'hello_2.10-2.debian.tar.xz', 'hello_2.10-2.dsc']
[INFO   ] Making sure inputs are available (this may take some time) 
[INFO   ] == Command start (output follows) ===== 
INFO:    Converting SIF file to temporary sandbox...

#
# Extracting the source package: 2022-07-12T12:30:44+00:00
#

dpkg-source: error: invalid line in sha1 checksums string: f7bonc<nöornsufn2a2295e889f66e05ce9bfaed9ace3 725946 hello_2.10.orig.tar.gz
INFO:    Cleaning up image...
[INFO   ] == Command exit (modification check follows) ===== 
run(ok): /tmp/debian-playground/dist/packages/hello (dataset) [singularity run --bind builder/cache/var...]
add(ok): logs/hello_2.10-2_20220712T123044_amd64.txt (file)                                                                                                           
save(ok): . (dataset)                                                                                                                                                 
deb_build_package(error): /tmp/debian-playground/dist/packages/hello (dataset) [Build failed. Check /tmp/debian-playground/dist/packages/hello/logs/hello_2.10-2_20220712T123044_amd64.txt for details.]
action summary:
  add (ok: 1)
  deb_build_package (error: 1)
  get (notneeded: 7)
  run (ok: 1)
  save (notneeded: 1, ok: 1)

Not yet unittested

codecov-commenter commented 2 years ago

Codecov Report

Merging #98 (a3373ca) into main (08bc233) will decrease coverage by 0.08%. The diff coverage is 90.00%.

:exclamation: Current head a3373ca differs from pull request most recent head 724a401. Consider uploading reports for the commit 724a401 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
- Coverage   93.22%   93.14%   -0.08%     
==========================================
  Files          16       16              
  Lines         487      496       +9     
==========================================
+ Hits          454      462       +8     
- Misses         33       34       +1     
Impacted Files Coverage Δ
datalad_debian/build_package.py 89.36% <90.00%> (-0.12%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

adswa commented 1 year ago

Given that this PR was approved and I only did a minor review suggestion to use a helper; and the fact that the tests pass, I'll merge this.