Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

add connection error handling #148

Open
lsloan opened this issue May 12, 2020 · 4 comments
Open

add connection error handling #148

lsloan opened this issue May 12, 2020 · 4 comments

Comments

@lsloan
Copy link
Member

lsloan commented May 12, 2020

This issue was inspired by lack of connection error handling in MiVideo code, both for UDP's BigQuery and Kaltura's API, but it probably applies to code for other data sources and to the application's database as well.

Connection error handling should log messages and either retry the operation a specific number of times or exit with an error status.

When testing connection error handling, helpful techniques include (but not limited to):

  • Specify the wrong connection parameters (hostname, database name, port number, etc.)
  • Specify the wrong credentials (username, password, token, etc.)
  • Forcibly shut down the application DB
  • Forcibly shut down the network connection
@lsloan lsloan added the 🐛 bug Something isn't working label May 12, 2020
@ssciolla
Copy link
Contributor

This is too broad. We have exception catching for all (I believe) Canvas API calls and retry mechanisms for most of them. There is an issue for handling database transactions already (#135). This issue should be split into multiple issues for things I didn’t mention (mivideo, initial db and network connections). It’s not realistic for a single PR to address all these.

@ssciolla ssciolla reopened this May 13, 2020
@ssciolla
Copy link
Contributor

ssciolla commented May 13, 2020

It's possible I'm getting mixed up here and conflating connection errors with other kinds of API/DB errors. Still, I kinda felt like the reason for opening this issue was to make sure MiVideo/Kaltura API calls would retry if they got an irregular status code (besides the one you're already handling).

I understand the idea of creating this broad issue, and there are probably several connection-specific areas that could be improved, but more specific issues would probably serve us better.

@zqian
Copy link
Member

zqian commented May 29, 2020

@lsloan seems this issue is too broad, and may not fit the timeline of 2020.02.01 release. Can we move revise the scope and move it to the next release issue list?

@lsloan
Copy link
Member Author

lsloan commented May 29, 2020

@zqian: Yes, as we discussed a few days ago, I'm fine with moving it to another release.

Also, when @ssciolla suggested more error handling for the MiVideo code, I agreed. As I was creating this issue, I noticed that some of the other code doesn't seem to have enough error handling, which is why I broadened the scope of the issue. I don't mind narrowing the scope of this issue to MiVideo code only. However, if I'm correct in my analysis that other parts of the code need more error handling, issues for that should be opened. Issues for improved error handling should be linked together for ease of reference.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants