matrix-org / synapse-s3-storage-provider

Synapse storage provider to fetch and store media in Amazon S3
Apache License 2.0
118 stars 33 forks source link

`True` vs `true` in the usage example, possible doc 🐛 #104

Closed jessebot closed 10 months ago

jessebot commented 10 months ago

In the usage example here it shows the following:

  store_local: True
  store_remote: True
  store_synchronous: True

Should all of those True be true (lower case t) since yaml is weird like that? 🤷 Happy to submit a quick PR for that if needed. :)

Also thanks for working on this! I haven't gotten it working yet, but I am very excited to eventually get it working.

Final question while I'm at it: If I set store_local to false will it only store stuff in the s3 and skip the local volume all together? 🤔

DMRobertson commented 10 months ago

Should all of those True be true (lower case t) since yaml is weird like that?

YAML is certainly weird, but I think both true and True are valid spellings of a truthy boolean literal. See https://yaml.org/type/bool.html and https://yaml.org/spec/1.2.2/#1032-tag-resolution

PyYAML seems happy too:

>>> import yaml
>>> yaml.safe_load("True")
True
>>> yaml.safe_load("true")
True
>>> yaml.safe_load("TRUE")
True
jessebot commented 10 months ago

awesome, I finally got it working on my end in my helm chart too, so we're good to go! Thanks for your help! :)