moodle-tool_objectfs icon indicating copy to clipboard operation
moodle-tool_objectfs copied to clipboard

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

Open keevan opened this issue 2 years ago • 3 comments

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):

  • (s3_usesdkcreds) OR (s3_key AND s3_secret)
  • s3_bucket
  • s3_region

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

keevan avatar Mar 01 '22 01:03 keevan

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

dmitriim avatar Mar 23 '22 03:03 dmitriim

should we count this one as done? @keevan

dmitriim avatar Mar 25 '22 00:03 dmitriim

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.

keevan avatar Mar 25 '22 06:03 keevan