fix(setting): honor bare -1 for timeout settings (#39181)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
aminoy
2026-08-31 19:48:59 +00:00
committed by GitHub
co-authored by wxiaoguang
parent 70678e9a3d
commit fc9800b383
12 changed files with 130 additions and 58 deletions
+14 -14
View File
@@ -104,20 +104,20 @@ const storageSectionName = "storage"
func getDefaultStorageSection(rootCfg ConfigProvider) ConfigSection {
storageSec := rootCfg.Section(storageSectionName)
// Global Defaults
storageSec.Key("STORAGE_TYPE").MustString("local")
storageSec.Key("MINIO_ENDPOINT").MustString("localhost:9000")
storageSec.Key("MINIO_ACCESS_KEY_ID").MustString("")
storageSec.Key("MINIO_SECRET_ACCESS_KEY").MustString("")
storageSec.Key("MINIO_BUCKET").MustString("gitea")
storageSec.Key("MINIO_LOCATION").MustString("us-east-1")
storageSec.Key("MINIO_USE_SSL").MustBool(false)
storageSec.Key("MINIO_INSECURE_SKIP_VERIFY").MustBool(false)
storageSec.Key("MINIO_CHECKSUM_ALGORITHM").MustString("default")
storageSec.Key("MINIO_BUCKET_LOOKUP_TYPE").MustString("auto")
storageSec.Key("AZURE_BLOB_ENDPOINT").MustString("")
storageSec.Key("AZURE_BLOB_ACCOUNT_NAME").MustString("")
storageSec.Key("AZURE_BLOB_ACCOUNT_KEY").MustString("")
storageSec.Key("AZURE_BLOB_CONTAINER").MustString("gitea")
storageSec.Key("STORAGE_TYPE").MustString("local") // FIXME: INI-MUST-SIDE-EFFECT
storageSec.Key("MINIO_ENDPOINT").MustString("localhost:9000") // FIXME: INI-MUST-SIDE-EFFECT
storageSec.Key("MINIO_ACCESS_KEY_ID").MustString("") // FIXME: INI-MUST-SIDE-EFFECT
storageSec.Key("MINIO_SECRET_ACCESS_KEY").MustString("") // FIXME: INI-MUST-SIDE-EFFECT
storageSec.Key("MINIO_BUCKET").MustString("gitea") // FIXME: INI-MUST-SIDE-EFFECT
storageSec.Key("MINIO_LOCATION").MustString("us-east-1") // FIXME: INI-MUST-SIDE-EFFECT
storageSec.Key("MINIO_USE_SSL").MustBool(false) // FIXME: INI-MUST-SIDE-EFFECT
storageSec.Key("MINIO_INSECURE_SKIP_VERIFY").MustBool(false) // FIXME: INI-MUST-SIDE-EFFECT
storageSec.Key("MINIO_CHECKSUM_ALGORITHM").MustString("default") // FIXME: INI-MUST-SIDE-EFFECT
storageSec.Key("MINIO_BUCKET_LOOKUP_TYPE").MustString("auto") // FIXME: INI-MUST-SIDE-EFFECT
storageSec.Key("AZURE_BLOB_ENDPOINT").MustString("") // FIXME: INI-MUST-SIDE-EFFECT
storageSec.Key("AZURE_BLOB_ACCOUNT_NAME").MustString("") // FIXME: INI-MUST-SIDE-EFFECT
storageSec.Key("AZURE_BLOB_ACCOUNT_KEY").MustString("") // FIXME: INI-MUST-SIDE-EFFECT
storageSec.Key("AZURE_BLOB_CONTAINER").MustString("gitea") // FIXME: INI-MUST-SIDE-EFFECT
return storageSec
}