tuhaihe opened a new issue, #66: URL: https://github.com/apache/cloudberry-backup/issues/66
``` [gpadmin@cdw cloudberry-backup]$ make lint fatal: No tags can describe 'b60130e8062e0b2a0a031b959bc742869ceedf5d'. Try --always, or create some tags. mkdir -p /home/gpadmin/go/bin curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /home/gpadmin/go/bin v1.55.2 golangci/golangci-lint info checking GitHub for tag 'v1.55.2' golangci/golangci-lint info found version: 1.55.2 for v1.55.2/linux/arm64 golangci/golangci-lint info installed /home/gpadmin/go/bin/golangci-lint golangci-lint run --tests=false utils/progress_bar.go:53:11: undefined: pb (typecheck) Start() *pb.ProgressBar ^ utils/progress_bar.go:64:3: undefined: pb (typecheck) *pb.ProgressBar ^ utils/plugin.go:53:8: undefined: yaml (typecheck) err = yaml.UnmarshalStrict(contents, config) ^ utils/plugin.go:382:14: undefined: yaml (typecheck) out, err := yaml.Marshal(plugin) ^ utils/plugin.go:402:6: undefined: yaml (typecheck) _ = yaml.Unmarshal(contents, keys) // if error happens, we catch it because no keys exist ^ utils/progress_bar.go:39:17: undefined: pb (typecheck) progressBar := pb.New(count).Prefix(prefix) ^ utils/progress_bar.go:47:10: cannot use verboseProgressBar (variable of type *VerboseProgressBar) as ProgressBar value in return statement: *VerboseProgressBar does not implement ProgressBar (missing method Add) (typecheck) return verboseProgressBar ^ report/report.go:52:12: report.IncludeSchemaFiltered undefined (type *Report has no field or method IncludeSchemaFiltered) (typecheck) if report.IncludeSchemaFiltered { ^ report/report.go:55:12: report.IncludeTableFiltered undefined (type *Report has no field or method IncludeTableFiltered) (typecheck) if report.IncludeTableFiltered { ^ report/report.go:58:12: report.ExcludeSchemaFiltered undefined (type *Report has no field or method ExcludeSchemaFiltered) (typecheck) if report.ExcludeSchemaFiltered { ^ report/report.go:61:12: report.ExcludeTableFiltered undefined (type *Report has no field or method ExcludeTableFiltered) (typecheck) if report.ExcludeTableFiltered { ^ report/report.go:69:12: report.Compressed undefined (type *Report has no field or method Compressed) (typecheck) if report.Compressed { ^ report/report.go:73:12: report.Plugin undefined (type *Report has no field or method Plugin) (typecheck) if report.Plugin != "" { ^ report/report.go:74:22: report.Plugin undefined (type *Report has no field or method Plugin) (typecheck) pluginStr = report.Plugin ^ report/report.go:77:12: report.DataOnly undefined (type *Report has no field or method DataOnly) (typecheck) if report.DataOnly { ^ report/report.go:80:12: report.MetadataOnly undefined (type *Report has no field or method MetadataOnly) (typecheck) if report.MetadataOnly { ^ report/report.go:84:12: report.MetadataOnly undefined (type *Report has no field or method MetadataOnly) (typecheck) if report.MetadataOnly { ^ report/report.go:86:19: report.SingleDataFile undefined (type *Report has no field or method SingleDataFile) (typecheck) } else if report.SingleDataFile { ^ report/report.go:90:12: report.WithStatistics undefined (type *Report has no field or method WithStatistics) (typecheck) if report.WithStatistics { ^ report/report.go:105:13: report.Incremental undefined (type *Report has no field or method Incremental) (typecheck) if !report.Incremental { ^ report/report.go:109:42: report.RestorePlan undefined (type *Report has no field or method RestorePlan) (typecheck) for _, restorePlanEntry := range report.RestorePlan { ^ report/report.go:130:48: report.DatabaseVersion undefined (type *Report has no field or method DatabaseVersion) (typecheck) LineInfo{Key: "gpdb version:", Value: report.DatabaseVersion}, ^ report/report.go:131:72: report.BackupVersion undefined (type *Report has no field or method BackupVersion) (typecheck) LineInfo{Key: "gpbackup version:", Value: fmt.Sprintf("%s\n", report.BackupVersion)}, ^ report/report.go:132:49: report.DatabaseName undefined (type *Report has no field or method DatabaseName) (typecheck) LineInfo{Key: "database name:", Value: report.DatabaseName}, ^ report/report.go:160:67: report.SegmentCount undefined (type *Report has no field or method SegmentCount) (typecheck) LineInfo{Key: "segment count:", Value: fmt.Sprintf("%d", report.SegmentCount)}) ^ helper/backup_helper.go:89:17: pipeWriter.Close undefined (type BackupPipeWriterCloser has no field or method Close) (typecheck) _ = pipeWriter.Close() ^ plugins/s3plugin/s3plugin.go:150:21: undefined: bytesize (typecheck) chunkSize, err := bytesize.Parse(opt.BackupMultipartChunksize) ^ plugins/s3plugin/s3plugin.go:165:21: undefined: bytesize (typecheck) chunkSize, err := bytesize.Parse(opt.RestoreMultipartChunksize) ^ plugins/s3plugin/s3plugin.go:193:7: r.NumMaxRetries undefined (type CustomRetryer has no field or method NumMaxRetries) (typecheck) if r.NumMaxRetries == 0 { ^ plugins/s3plugin/s3plugin.go:216:95: r.RetryRules undefined (type CustomRetryer has no field or method RetryRules) (typecheck) gplog.Debug("Https request attempt %d failed. Next attempt in %v. %s\n", req.RetryCount, r.RetryRules(req), req.Error.Error()) ^ plugins/s3plugin/s3plugin.go:218:92: r.RetryRules undefined (type CustomRetryer has no field or method RetryRules) (typecheck) gplog.Debug("Https request attempt %d failed. Next attempt in %v.\n", req.RetryCount, r.RetryRules(req)) ^ testutils/functions.go:35:46: undefined: sqlmock (typecheck) func SetupTestEnvironment() (*dbconn.DBConn, sqlmock.Sqlmock, *Buffer, *Buffer, *Buffer) { ^ testutils/functions.go:396:64: undefined: Buffer (typecheck) func SliceBufferByEntries(entries []toc.MetadataEntry, buffer *Buffer) ([]string, string) { ^ testutils/functions.go:452:64: undefined: Buffer (typecheck) func AssertBufferContents(entries []toc.MetadataEntry, buffer *Buffer, expected ...string) { ^ testutils/functions.go:491:27: undefined: Buffer (typecheck) func BufferLength(buffer *Buffer) uint64 { ^ testutils/functions.go:55:4: undefined: Fail (typecheck) Fail(fmt.Sprintf("Unsupported TEST_DB_TYPE: %s. Must be GPDB or CBDB.", envTestDbType)) ^ testutils/functions.go:154:3: undefined: Fail (typecheck) Fail("Could not create filespace test directory on 1 or more hosts") ^ testutils/functions.go:161:3: undefined: Fail (typecheck) Fail(fmt.Sprintf("Cannot create test filespace configuration: %s: %s", out, err.Error())) ^ testutils/functions.go:467:2: undefined: Expect (typecheck) Expect(len(entries)).To(BeNumerically(">", index)) ^ testutils/functions.go:472:2: undefined: Expect (typecheck) Expect(len(entries)).To(BeNumerically("==", index)) ^ testutils/functions.go:552:3: undefined: Skip (typecheck) Skip("Test only applicable to GPDB6 and above") ^ testutils/functions.go:558:3: undefined: Skip (typecheck) Skip("Test only applicable to GPDB7 and above") ^ ../../../usr/local/go1.23.4/src/runtime/time.go:189:17: cannot range over 3 (untyped int constant) (typecheck) for i := range 3 { ^ ../../../usr/local/go1.23.4/src/internal/fmtsort/sort.go:79:10: cannot infer T ($GOROOT/src/cmp/cmp.go:40:1) (typecheck) return cmp.Compare(aVal.Int(), bVal.Int()) ^ ../../../usr/local/go1.23.4/src/internal/fmtsort/sort.go:81:10: cannot infer T ($GOROOT/src/cmp/cmp.go:40:1) (typecheck) return cmp.Compare(aVal.Uint(), bVal.Uint()) ^ ../../../usr/local/go1.23.4/src/internal/fmtsort/sort.go:83:10: cannot infer T ($GOROOT/src/cmp/cmp.go:40:1) (typecheck) return cmp.Compare(aVal.String(), bVal.String()) ^ ../../../usr/local/go1.23.4/src/internal/fmtsort/sort.go:136:1: missing return (typecheck) } ^ ../../../usr/local/go1.23.4/src/reflect/iter.go:67:19: cannot range over v.Len() (value of type int) (typecheck) for i := range v.Len() { ^ ../../../usr/local/go1.23.4/src/reflect/iter.go:75:19: cannot range over v.Len() (value of type int) (typecheck) for i := range v.Len() { ^ ../../../usr/local/go1.23.4/src/reflect/iter.go:131:19: cannot range over v.Len() (value of type int) (typecheck) for i := range v.Len() { ^ make: *** [Makefile:63: lint] Error 1 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
