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

patch(PDC fetching) Except warnings from the dsmc command #2638

Merged
merged 10 commits into from
Nov 1, 2023

Conversation

Vince-janv
Copy link
Contributor

@Vince-janv Vince-janv commented Oct 27, 2023

Description

The cg.utils.commands.Process.run_command raises an error on all exit codes except 0 (success). This causes problems in the PDC flow since the dsmc command regularly gives warnings, which result in exit code 8. These are non-fatal and should not abort the command.

This PR catches CalledProcessError exceptions checks the return code and does not raise an error if it is 8.

Changed

  • Warning exit codes from the dsmc command no longer raise errors

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 fc-fetch-except-warnings

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

  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

Implementation Plan

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

@Vince-janv Vince-janv requested a review from a team as a code owner October 27, 2023 14:54
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.

Looks much cleaner and should handle the exit warnings 👍

Copy link

sonarqubecloud bot commented Nov 1, 2023

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 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Vince-janv
Copy link
Contributor Author

Retrieval and backup work on stage

@Vince-janv Vince-janv merged commit f3ea276 into master Nov 1, 2023
@Vince-janv Vince-janv deleted the fc-fetch-except-warnings branch November 1, 2023 15:54
@Vince-janv
Copy link
Contributor Author

Deployed in production

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