Compare commits

...

3 Commits

Author SHA1 Message Date
Morty
465c36e339 feat: temporarily disable codec_version check 2025-06-12 02:18:08 +08:00
yiweichi
2cd9217cc0 chore: auto version bump [bot] 2025-06-11 14:04:13 +00:00
Morty
343a1bb977 fix: aws s3 config 2025-06-11 22:01:40 +08:00
3 changed files with 11 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ import (
"runtime/debug"
)
var tag = "v4.5.23"
var tag = "v4.5.24"
var commit = func() string {
if info, ok := debug.ReadBuildInfo(); ok {

View File

@@ -136,12 +136,13 @@ func (b *BlobUploader) constructBlobCodec(dbBatch *orm.Batch) (*kzg4844.Blob, er
return nil, fmt.Errorf("failed to get chunks in range: %v", err)
}
// disable this check temporarily because the codec_version field for chunk was added later.
// check codec version
for _, dbChunk := range dbChunks {
if dbBatch.CodecVersion != dbChunk.CodecVersion {
return nil, fmt.Errorf("batch codec version is different from chunk codec version, batch index: %d, chunk index: %d, batch codec version: %d, chunk codec version: %d", dbBatch.Index, dbChunk.Index, dbBatch.CodecVersion, dbChunk.CodecVersion)
}
}
// for _, dbChunk := range dbChunks {
// if dbBatch.CodecVersion != dbChunk.CodecVersion {
// return nil, fmt.Errorf("batch codec version is different from chunk codec version, batch index: %d, chunk index: %d, batch codec version: %d, chunk codec version: %d", dbBatch.Index, dbChunk.Index, dbBatch.CodecVersion, dbChunk.CodecVersion)
// }
// }
chunks := make([]*encoding.Chunk, len(dbChunks))
var allBlocks []*encoding.Block // collect blocks for CodecV7

View File

@@ -25,8 +25,6 @@ type S3Uploader struct {
func NewS3Uploader(cfg *config.AWSS3Config) (*S3Uploader, error) {
// load AWS config
var opts []func(*awsconfig.LoadOptions) error
opts = append(opts, awsconfig.WithRegion(cfg.Region))
// if AccessKey && SecretKey provided, use it
if cfg.AccessKey != "" && cfg.SecretKey != "" {
opts = append(opts, awsconfig.WithCredentialsProvider(
@@ -38,6 +36,10 @@ func NewS3Uploader(cfg *config.AWSS3Config) (*S3Uploader, error) {
)
}
if cfg.Region != "" {
opts = append(opts, awsconfig.WithRegion(cfg.Region))
}
awsCfg, err := awsconfig.LoadDefaultConfig(context.Background(), opts...)
if err != nil {
return nil, fmt.Errorf("failed to load default config: %w", err)