Repository navigation
fix(setup): setup lists what failed to install and exits non-zero instead of claiming it is complete - #481
Open
geiresx wants to merge 23 commits into
Open
fix(setup): setup lists what failed to install and exits non-zero instead of claiming it is complete#481geiresx wants to merge 23 commits into
geiresx wants to merge 23 commits into
Conversation
With a panel cut to regions, an autosome the panel had no file for was cut out by `-r` before MoChA ran. It had no row in the sites table, so the phase gate of og mocha report could not see it, and the sample read assessed with that autosome never looked at. The bash step and the Nextflow MOCHA_CALL process now put the phased genotypes onto every prepared site, so such an autosome reaches MoChA unphased, keeps its sites row, and the gate marks the sample not assessed and names it. Both paths print a warning that names it. Bead: i411-mocha-unpanelled-autosomes
…pped HG002's fixture holds slices on several autosomes, and the e2e panel is cut to the chr20 slice. The case asserted that MoChA read chr20 only, which is the bug. It now checks that the other autosomes reach the sites table with 0 phased sites, that the sample is not assessed, and that the message names each of them; a red control runs the same check on the sites table cut to chr20, which is all the step kept before. The Nextflow mirror also compares the summary message. Bead: i411-mocha-unpanelled-autosomes
An index built before the VCF was replaced can lack a contig the new file has; the indexed read then returned no records and the lookup answered no call. Compare the modification times, as og-bloodtype does, and stream the file with a note when the index is older. Bead: C15
…g setup is complete setup.sh swallowed the failures of its sample QC, STRchive, tandem-repeat, AnnotSV and clinical installers and of the phase 4 downloads, then printed "Setup complete!" and exited 0. A caller could not tell a partial setup from a full one. Each failure or skip now goes on a MISSING list with the command that retries it. The summary prints "Setup complete!" and exits 0 only when the list is empty; otherwise "Setup finished: core ready, N items missing", one line per item with its retry command, and exit status 3. tests/fake-docker/rv-setup-partial-status.sh covers a complete setup, a failed AnnotSV download, two VEP caches skipped for disk space, the --no-clinical-data opt-out and a plain fake setup. Bead: F04
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 27 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
AtomicFile created its temporary file with File::create on a name made of the target and the pid. The mode followed the umask, so under umask 022 a new output was 0644 and a replaced 0600 output became 0644. File::create also opened whatever was already at that name, and two AtomicFiles on one target in one process shared one temporary file. The temporary file is now opened with create_new (O_CREAT | O_EXCL) and mode 0600, or the replaced target's mode when that is stricter. Its name carries a process-wide counter, and a taken name moves on to the next. Bead: rv-io-owner-only-writes
Bead: rv-io-owner-only-writes
… every slice With the unpanelled autosomes kept, MoChA reads HG002's other fixture slices unphased and may call a germline CNV there (such as the chr4 UGT2B17 deletion, untyped because the cut panel's cnps.bed holds chr20 only). The zero-call check now counts chr20 only; the nothing-reported check stays. The red control on MOSAIC counts chr20 too, and the docs and comments say a call on another slice is reported no.
Collaborator
Author
|
@coderabbitai review |
Action not completed
|
…ds fail their checksums The fake downloads fail their pinned checksums, so a plain fake setup is partial: it now exits 3 and prints the 'Setup finished: core ready' banner. The troubleshooting page names the new banner and the Missing list, and the retry commands quote the script path so a path with a space pastes as is.
…some A Nextflow outdir copies the small .tbi before the large VCF, so a fresh index often carries the earlier time. Treating every older index as stale streamed whole genomes for every region there. An older index is now used when it lists the queried chromosome; only one that does not is skipped, with a note.
…lled-autosomes # Conflicts: # CHANGELOG.md
…ndex # Conflicts: # CHANGELOG.md
…writes # Conflicts: # CHANGELOG.md
…status # Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
…g runs as root The docker profile runs containers as root over a work folder the host user owns. Nextflow's fixOwnership never hands the files back there: the biocontainers images ship a busybox chown without --from. A 0600 file og wrote as root was then unreadable to the user, and Nextflow could not publish it. The atomic writer now gives its temporary file to the owner and group of the nearest folder above it that root does not own.
# Conflicts: # CHANGELOG.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
setup.shsaid "Setup complete!" and exited 0 even when installs had failed. The sample QC, STRchive, tandem-repeat, AnnotSV and clinical installers each ran with|| true. The other downloads in phase 4 also only printed a warning. After that came the same banner and exit status as a full setup. A user who missed one warning in a long log thought setup was done. A script that checked the exit status could not tell a partial setup from a full one. Meanwhilevalidate-setup.shreported the same gaps as warnings.Fix
--annotsv-data--vep-cache--clinical-data--sample-qc-data--strchive-data--og--no-clinical-datastill ends complete. Skipping the clinical data is a choice, not a gap.docs/getting-started.mdlists the three exit statuses: 0 complete, 3 partial, 1 a core failure.docs/troubleshooting.mdnames the new banner and theMissinglist.Decisions:
--annotsv-data,--clinical-dataand the others) keep their exit statuses.docs/troubleshooting.mdsit outside the package's first file list; they change here because the fix makes them wrong otherwise.Output change: a full
setup.shrun that misses something now exits 3 instead of 0, and its banner is different. Nothing changes for a complete setup.How it was checked
tests/fake-docker/rv-setup-partial-status.shcovers five runs:--annotsv-data, exit 3.--no-clinical-datawith everything else installed: complete, exit 0.scripts/ci/run-fake-docker-suite.shin anubuntu:24.04container:setup.sh:ASSERT FAIL: annotsv exited 0, expected 3note_missingturned into a no-op, which leaves the list empty:ASSERT FAIL: annotsv exited 0, expected 3rv-setup-partial-status: https://github.com/geiresx/OwnGenome/actions/runs/44292207614Bead: F04