diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 334e75ca0..91429fea9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -37,6 +37,21 @@ jobs: # Fail only if there are actual vet errors (not counting the filtered lock warnings) if grep -q "vet:" vet-output.txt; then exit 1; fi + vet-32bit: + name: Go Vet 32-bit + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v6 + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version-file: 'go.mod' + - name: Go Vet linux/386 (type-checks code and tests for 32-bit int overflows) + run: | + GOOS=linux GOARCH=386 go vet ./... 2>&1 | grep -v "MessageState contains sync.Mutex" | grep -v "IdentityAccessManagement contains sync.RWMutex" | tee vet-32bit-output.txt + if grep -q "vet:" vet-32bit-output.txt; then exit 1; fi + build: name: Build runs-on: ubuntu-latest diff --git a/test/s3/s3client/s3client.go b/test/s3/s3client/s3client.go index 0179ad27c..79f159092 100644 --- a/test/s3/s3client/s3client.go +++ b/test/s3/s3client/s3client.go @@ -23,7 +23,7 @@ func main() { Name: "newbucket", Versioning: false, }, - MaxBackoffDelay: aws.Int(int(time.Second * 5)), + MaxBackoffDelay: aws.Int(int((5 * time.Second).Milliseconds())), MaxRetryAttempts: aws.Int(1), } @@ -77,7 +77,7 @@ func MyAwsConfig(cfg MyConfig) (*aws.Config, error) { config.WithEndpointResolverWithOptions(customResolver), config.WithRetryer(func() aws.Retryer { r := retry.AddWithMaxAttempts(retry.NewStandard(), *cfg.MaxRetryAttempts) - return retry.AddWithMaxBackoffDelay(r, time.Duration(*cfg.MaxBackoffDelay*1000*1000)) + return retry.AddWithMaxBackoffDelay(r, time.Duration(*cfg.MaxBackoffDelay)*time.Millisecond) })) return &awsCfg, err } diff --git a/weed/worker/tasks/erasure_coding/ec_task_encode_files_e2e_test.go b/weed/worker/tasks/erasure_coding/ec_task_encode_files_e2e_test.go index f33e6713c..66632a09b 100644 --- a/weed/worker/tasks/erasure_coding/ec_task_encode_files_e2e_test.go +++ b/weed/worker/tasks/erasure_coding/ec_task_encode_files_e2e_test.go @@ -51,7 +51,7 @@ func TestEcEncodeLeavesRightFilesAndRemovesStubAndSource(t *testing.T) { framework.AllocateVolume(t, clientA, volumeID, collection) httpClient := framework.NewHTTPClient() for i := 0; i < 8; i++ { - fid := framework.NewFileID(volumeID, uint64(948000+i), uint32(0x9490CA00+i)) + fid := framework.NewFileID(volumeID, uint64(948000+i), 0x9490CA00+uint32(i)) payload := make([]byte, 4096) for j := range payload { payload[j] = byte(i + 1) diff --git a/weed/worker/tasks/erasure_coding/ec_task_julor_layout_e2e_test.go b/weed/worker/tasks/erasure_coding/ec_task_julor_layout_e2e_test.go index 854cb0b4d..f543f0134 100644 --- a/weed/worker/tasks/erasure_coding/ec_task_julor_layout_e2e_test.go +++ b/weed/worker/tasks/erasure_coding/ec_task_julor_layout_e2e_test.go @@ -66,7 +66,7 @@ func TestEcEncodeJulorLayoutConverges(t *testing.T) { framework.AllocateVolume(t, clients[srcServer], volumeID, collection) httpClient := framework.NewHTTPClient() for i := 0; i < 8; i++ { - fid := framework.NewFileID(volumeID, uint64(950000+i), uint32(0x9500CA00+i)) + fid := framework.NewFileID(volumeID, uint64(950000+i), 0x9500CA00+uint32(i)) payload := make([]byte, 4096) for j := range payload { payload[j] = byte(i + 1)