catalyst / moodle-tool_objectfs

Object file storage system for Moodle
https://moodle.org/plugins/tool_objectfs
87 stars 72 forks source link

Skip connection test for certain storage file systems (e.g. s3) if certain required fields aren't set #467

Open keevan opened 2 years ago

keevan commented 2 years ago

In the case of S3, this should reduce/remove the initial load time filled by the connection test, and alllow you to enter in the relevant details.

The keys to check and skip the connection test should likely be (at least for s3):

I'm not 100% sure about the other fields, but these seem like mandatory fields that if aren't set, would cause the connection to fail anyways, so it should fail immediately.

There is also the possibility of improving the wait period of this by setting a timeout on the connection test. More info: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_configuration.html#http-connect-timeout

dmitriim commented 2 years ago

will help to resolve https://github.com/catalyst/moodle-tool_objectfs/issues/472

dmitriim commented 2 years ago

should we count this one as done? @keevan

keevan commented 2 years ago

I think a configurable / sane default timeout might also be useful here, for example, if it was configured but maybe the configuration was not 100% correct.

https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_configuration.html#http-connect-timeout

This might be a bonus though, but I'll leave it there for discussion.