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

feat: add timeout error #982

Merged
merged 7 commits into from Jan 19, 2024
Merged

feat: add timeout error #982

merged 7 commits into from Jan 19, 2024

Conversation

jlahovnik
Copy link
Collaborator

@jlahovnik jlahovnik commented Jan 11, 2024

  • handle timeout error in server mode
  • fixes search errors raised for a given provider

@jlahovnik jlahovnik self-assigned this Jan 11, 2024
@jlahovnik jlahovnik linked an issue Jan 11, 2024 that may be closed by this pull request
Copy link
Contributor

github-actions bot commented Jan 11, 2024

Test Results

    4 files  ±0      4 suites  ±0   4m 15s ⏱️ -5s
  455 tests +2    452 ✅ +3   3 💤 ±0  0 ❌  - 1 
1 820 runs  +8  1 740 ✅ +7  80 💤 +2  0 ❌  - 1 

Results for commit dadfa42. ± Comparison against base commit db70682.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jan 11, 2024

Code Coverage (Ubuntu)

File Coverage
All files 82%

Minimum allowed coverage is 70%

Generated by 🐒 cobertura-action against dadfa42

Copy link
Contributor

github-actions bot commented Jan 11, 2024

Code Coverage (Windows)

File Coverage
All files 76%

Minimum allowed coverage is 70%

Generated by 🐒 cobertura-action against dadfa42

@jlahovnik jlahovnik marked this pull request as draft January 11, 2024 14:34
@jlahovnik jlahovnik marked this pull request as ready for review January 11, 2024 16:03
Copy link
Collaborator

@sbrunato sbrunato left a comment

Choose a reason for hiding this comment

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

please implement TimeoutError in every piece of code where a timeout can occur (look for timeout= in methods args)

eodag/plugins/search/qssearch.py Outdated Show resolved Hide resolved
@sbrunato sbrunato marked this pull request as draft January 17, 2024 08:26
@jlahovnik jlahovnik force-pushed the 956-customized-timeout-errors branch from 321f1f2 to 9dbaabf Compare January 18, 2024 09:45
@jlahovnik jlahovnik marked this pull request as ready for review January 18, 2024 09:49
@jlahovnik
Copy link
Collaborator Author

please implement TimeoutError in every piece of code where a timeout can occur (look for timeout= in methods args)

done

@@ -154,6 +154,8 @@ def authenticate(self) -> Union[AuthBase, Dict[str, str]]:
exchange_url = user_consent_response.url
try:
token = self.exchange_code_for_token(exchange_url, state)
except requests.exceptions.Timeout as exc:
raise TimeOutError(str(exc))
Copy link
Collaborator

@sbrunato sbrunato Jan 19, 2024

Choose a reason for hiding this comment

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

please handle all timeout exceptions the way it is done in qssearch:

raise TimeOutError(exc, timeout=timeout) from exc

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@sbrunato sbrunato force-pushed the 956-customized-timeout-errors branch from 8f05815 to dadfa42 Compare January 19, 2024 19:16
@sbrunato sbrunato merged commit 1a0e007 into develop Jan 19, 2024
12 checks passed
@sbrunato sbrunato deleted the 956-customized-timeout-errors branch January 19, 2024 19:27
@sbrunato sbrunato added this to the 2.12.0 milestone Feb 12, 2024
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.

customized timeout errors
2 participants