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

Fix #4897 - report css... #4899

Merged
merged 4 commits into from
Oct 1, 2024
Merged

Fix #4897 - report css... #4899

merged 4 commits into from
Oct 1, 2024

Conversation

dnil
Copy link
Collaborator

@dnil dnil commented Sep 30, 2024

This PR adds a functionality or fixes a bug.

Testing on cg-vm1 server (Clinical Genomics Stockholm)

Prepare for testing

  1. Make sure the PR is pushed and available on Docker Hub
  2. Fist book your testing time using the Pax software available at https://pax.scilifelab.se/. The resource you are going to call dibs on is scout-stage and the server is cg-vm1.
  3. ssh <USER.NAME>@cg-vm1.scilifelab.se
  4. sudo -iu hiseq.clinical
  5. ssh localhost
  6. (optional) Find out which scout branch is currently deployed on cg-vm1: podman ps
  7. Stop the service with current deployed branch: systemctl --user stop scout.target
  8. Start the scout service with the branch to test: systemctl --user start scout@<this_branch>
  9. Make sure the branch is deployed: systemctl --user status scout.target
  10. After testing is done, repeat procedure at https://pax.scilifelab.se/, which will release the allocated resource (scout-stage) to be used for testing by other users.
Testing on hasta server (Clinical Genomics Stockholm)

Prepare for testing

  1. ssh <USER.NAME>@hasta.scilifelab.se
  2. Book your testing time using the Pax software. us; paxa -u <user> -s hasta -r scout-stage. You can also use the WSGI Pax app available at https://pax.scilifelab.se/.
  3. (optional) Find out which scout branch is currently deployed on cg-vm1: conda activate S_scout; pip freeze | grep scout-browser
  4. Deploy the branch to test: bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_scout -t scout -b <this_branch>
  5. Make sure the branch is deployed: us; scout --version
  6. After testing is done, repeat the paxa procedure, which will release the allocated resource (scout-stage) to be used for testing by other users.

How to test:

  1. how to test it, possibly with real cases/data

Expected outcome:
The functionality should be working
Take a screenshot and attach or copy/paste the output.

Review:

  • code approved by CR
  • tests executed by DN, CR

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.80%. Comparing base (c5856ce) to head (15d0821).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4899   +/-   ##
=======================================
  Coverage   84.80%   84.80%           
=======================================
  Files         319      319           
  Lines       19314    19314           
=======================================
  Hits        16379    16379           
  Misses       2935     2935           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dnil
Copy link
Collaborator Author

dnil commented Sep 30, 2024

So the primary issue appears to be that wkhtmltopdf does not find the local static URL path. An option is to use an option external=True for the url_from() call. I still had messy pdfs locally when trying this, although not the same as the prod issue. It turns out I still have that with old reverts locally, so likely my local pdf generation env was a bit off as well. The present fix seems to do the trick on stage, but we could attempt to retest that with the full css via external URL fetch as well.

Copy link

sonarcloud bot commented Sep 30, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

Copy link
Member

@northwestwitch northwestwitch left a comment

Choose a reason for hiding this comment

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

Tested on stage and seems to work fine, so I think this PR is good enough to merge. If the problem shows up again we can attempt the fix you suggest (the url_for thing), I think

@@ -1140,7 +1142,7 @@ <h4>Scout case analysis report</h4> - created on:&nbsp;<strong>{{report_created_
{{ variant_phenotypes(variant) }}
</div>
<div class="card-body">
<table id="panel-table" class="table table-sm table-bordered" style="background-color: transparent; margin-left:-.3rem;>
<table id="panel-table" class="table table-sm table-bordered" style="background-color: transparent; margin-left:-.3rem;">
Copy link
Member

Choose a reason for hiding this comment

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

💯

@dnil dnil merged commit cf7af1f into main Oct 1, 2024
24 of 25 checks passed
dreamweaver-cell pushed a commit to gmc-norr/scout that referenced this pull request Oct 9, 2024
* hm, no external is no good - try direct paste style

* fix old typo, same as other PR

* and apply to SVs as well

* changelog
@northwestwitch northwestwitch deleted the fix_report_inheritance branch October 10, 2024 14:32
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.

2 participants