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

Add retries to SCPMover.copy() #153

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Conversation

pnuu
Copy link
Member

@pnuu pnuu commented Jan 20, 2023

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
Copy link
Collaborator

@TAlonglong TAlonglong left a comment

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?

scp = self._get_scp_client()
scp.put(self.origin, self.destination.path)
success = True
break
Copy link
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
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
Copy link
Member Author

pnuu commented Jan 23, 2023

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
Copy link

codecov bot commented Jan 24, 2023

Codecov Report

Merging #153 (ea70de1) into main (5149f50) will increase coverage by 0.18%.
The diff coverage is 98.85%.

@@            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.

Impacted Files Coverage Δ
trollmoves/movers.py 84.84% <98.11%> (+0.96%) ⬆️
trollmoves/server.py 68.83% <100.00%> (+1.02%) ⬆️
trollmoves/tests/test_server.py 100.00% <100.00%> (ø)
trollmoves/dispatcher.py 90.97% <0.00%> (-0.38%) ⬇️
trollmoves/client.py 82.79% <0.00%> (-0.19%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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.

None yet

2 participants