Skip to content

Add retries to SCPMover.copy() - #153

Draft
pnuu wants to merge 8 commits into
pytroll:mainfrom
pnuu:refactor-scp-retries
Draft

Add retries to SCPMover.copy()#153
pnuu wants to merge 8 commits into
pytroll:mainfrom
pnuu:refactor-scp-retries

Conversation

@pnuu

@pnuu pnuu commented Jan 20, 2023

Copy link
Copy Markdown
Member

This PR adds retries to the SCPMover.copy() method. Currently there's only retries in creating the connection.

VERY early work.

  • Closes #xxxx
  • Tests added
  • Fully documented
  • Add your name to AUTHORS.md if not there already

@pnuu
pnuu requested a review from TAlonglong January 20, 2023 19:10
@pnuu pnuu self-assigned this Jan 20, 2023

@TAlonglong TAlonglong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah I good with thisl.

Is it your intention to drop the timeout to the put function by doing this?

Comment thread trollmoves/movers.py Outdated
scp = self._get_scp_client()
scp.put(self.origin, self.destination.path)
success = True
break

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do you need the break here if you break on success further down?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was already pretty tired when writing that, so probably not 😅

@pnuu

pnuu commented Jan 23, 2023

Copy link
Copy Markdown
Member Author

Is it your intention to drop the timeout to the put function by doing this?

I think we can keep the timeout option, too.

@codecov

codecov Bot commented Jan 24, 2023

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.85057% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.55%. Comparing base (5149f50) to head (ea70de1).
⚠️ Report is 366 commits behind head on main.

Files with missing lines Patch % Lines
trollmoves/movers.py 98.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #153      +/-   ##
==========================================
+ Coverage   88.37%   88.55%   +0.18%     
==========================================
  Files          22       22              
  Lines        4437     4492      +55     
==========================================
+ Hits         3921     3978      +57     
+ Misses        516      514       -2     
Flag Coverage Δ
unittests 88.55% <98.85%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants