feat: move report artifacts to OSS storage

This commit is contained in:
Wyndham ARR
2026-08-04 12:37:26 +08:00
parent 727643f1f2
commit a2b86cdf10
45 changed files with 1288 additions and 1417 deletions

View File

@@ -112,6 +112,8 @@ class FileMetadata:
sha256: str
byte_size: int
mime_type: str
storage_provider: str = "local"
bucket_alias: str = "arr-project-root"
def validate(self) -> None:
storage = PurePosixPath(self.storage_key)
@@ -122,6 +124,12 @@ class FileMetadata:
or self.original_filename != PurePosixPath(self.original_filename).name
or not SHA256_RE.fullmatch(self.sha256)
or self.byte_size < 0
or not isinstance(self.storage_provider, str)
or self.storage_provider not in {"local", "local_fixture", "oss", "s3"}
or not isinstance(self.bucket_alias, str)
or not self.bucket_alias.strip()
or "/" in self.bucket_alias
or "\\" in self.bucket_alias
):
raise RepositoryError(
ErrorCode.PUBLISH_FAILED,