Refine S3 Tables implementation to address code review feedback

- Standardize namespace representation to []string
- Improve listing logic with pagination and StartFromFileName
- Enhance error handling with sentinel errors and robust checks
- Add JSON encoding error logging
- Fix CI workflow to use gofmt -l
- Standardize timestamps in directory creation
- Validate single-level namespaces
This commit is contained in:
Chris Lu
2026-01-28 10:04:27 -08:00
parent 08ee4e37d8
commit 33da87452b
10 changed files with 342 additions and 204 deletions

View File

@@ -133,10 +133,10 @@ jobs:
run: |
set -x
echo "=== Checking S3 Tables Go format ==="
unformatted=$(go fmt ./weed/s3api/s3tables/... 2>&1 | wc -l)
if [ "$unformatted" -gt 0 ]; then
unformatted=$(gofmt -l ./weed/s3api/s3tables)
if [ -n "$unformatted" ]; then
echo "Go format check failed - files need formatting"
go fmt ./weed/s3api/s3tables/...
echo "$unformatted"
exit 1
fi
echo "All S3 Tables files are properly formatted"
@@ -145,10 +145,10 @@ jobs:
run: |
set -x
echo "=== Checking S3 Tables test format ==="
unformatted=$(go fmt ./test/s3tables/... 2>&1 | wc -l)
if [ "$unformatted" -gt 0 ]; then
unformatted=$(gofmt -l ./test/s3tables)
if [ -n "$unformatted" ]; then
echo "Go format check failed for tests"
go fmt ./test/s3tables/...
echo "$unformatted"
exit 1
fi
echo "All S3 Tables test files are properly formatted"