Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed pending decompression check #2641

Merged
merged 5 commits into from
Oct 31, 2023
Merged

Missed pending decompression check #2641

merged 5 commits into from
Oct 31, 2023

Conversation

islean
Copy link
Contributor

@islean islean commented Oct 30, 2023

Description

If one runs cg decompress case <case_id> when the decompression has already been started, the logging is weird, stating that files undergoing decompression are missing on Hasta, and does not start decompression of the remaining files for the sample. This PR adds a check for pending compressions.

Fixed

  • We check for pending decompressions in the decompress flow.

How to prepare for test

  • Ssh to relevant server (depending on type of change)
  • Use stage: us
  • Paxa the environment: paxa
  • Install on stage (example for Hasta):
    bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_cg -t cg -b fix-decompression-logging -a

How to test

  • Do ...

Expected test outcome

  • Check that ...
  • Take a screenshot and attach or copy/paste the output.

Review

  • Tests executed by
  • "Merge and deploy" approved by
    Thanks for filling in who performed the code review and the test!

This version is a

  • MAJOR - when you make incompatible API changes
  • MINOR - when you add functionality in a backwards compatible manner
  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

Implementation Plan

  • Document in ...
  • Deploy this branch on ...
  • Inform to ...

@islean islean requested a review from a team as a code owner October 30, 2023 13:04
@islean islean changed the title Missed pending check Missed pending decompression check Oct 30, 2023
cg/meta/compress/compress.py Outdated Show resolved Hide resolved
Copy link
Contributor

@seallard seallard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find 👍

@islean
Copy link
Contributor Author

islean commented Oct 30, 2023

Tested on Hasta with a provided sample which had some pending decompressions and now the decompression finishes as expected:

Check if pending compression file exists
Compression/decompression is pending for H3F22DSX5_sample_id_S14_L003
SPRING to FASTQ decompression not possible for sample_id
Check if pending compression file exists
Compression/decompression is pending for H3F22DSX5_sample_id_S14_L003
Spring file /home/proj/stage/housekeeper-bundles/sample_id/2022-12-04/H3F22DSX5_sample_id_S14_L003.spring is already being decompressed.
Check if pending compression file exists
/home/proj/stage/housekeeper-bundles/sample_id/2022-12-04/H3F22DSX5_sample_id_S14_L001.crunchy.pending.txt does not exist
Check if SPRING archive file exists
Check if FASTQ pair exists
/home/proj/stage/housekeeper-bundles/sample_id/2022-12-04/H3F22DSX5_sample_id_S14_L001_R1_001.fastq.gz does not exist
Decompression is possible
Decompressing /home/proj/stage/housekeeper-bundles/sample_id/2022-12-04/H3F22DSX5_sample_id_S14_L001.spring to FASTQ format for sample sample_id
Creating pending flag /home/proj/stage/housekeeper-bundles/sample_id/2022-12-04/H3F22DSX5_sample_id_S14_L001.crunchy.pending.txt
Fetch SPRING metadata from /home/proj/stage/housekeeper-bundles/sample_id/2022-12-04/H3F22DSX5_sample_id_S14_L001.json
Created temporary dir /home/proj/stage/housekeeper-bundles/sample_id/2022-12-04/spring_hbv1pa70_decompress
Submit sbatch /home/proj/stage/housekeeper-bundles/sample_id/2022-12-04/H3F22DSX5_sample_id_S14_L001_decompress_spring.sh
Running command sbatch /home/proj/stage/housekeeper-bundles/sample_id/2022-12-04/H3F22DSX5_sample_id_S14_L001_decompress_spring.sh
Submitted batch job 5468609
Spring decompression running as job 5468609

Copy link
Contributor

@diitaz93 diitaz93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bra jobbat ⭐

cg/meta/compress/compress.py Show resolved Hide resolved
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@islean islean merged commit f98cc70 into master Oct 31, 2023
9 checks passed
@islean islean deleted the fix-decompression-logging branch October 31, 2023 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants