Skip to content

Commit

Permalink
Bump golang version to 1.21.10, go-algorand-sdk to 2.5.0, indexer, to… (
Browse files Browse the repository at this point in the history
#172)

* Bump golang version to 1.21.10, go-algorand-sdk to 2.5.0, indexer, to latest from hash from mainline branch.

* Update fileReadWriteTest for new incentive-related fields in block headers.

* Fix TestRoundTrip off by 1 bug & update block 9

---------

Co-authored-by: Jason Paulos <[email protected]>
  • Loading branch information
gmalouf and jasonpaulos authored May 9, 2024
1 parent 5ae5acb commit 7738e4e
Show file tree
Hide file tree
Showing 18 changed files with 72 additions and 54 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ jobs:
- name: Install specific golang
uses: actions/[email protected]
with:
go-version: '1.20.14'
go-version: '1.21.10'
- name: Check format
run: test -z `go fmt ./...`
- name: Vet
run: go vet ./...
- name: reviewdog-golangci-lint
uses: reviewdog/action-golangci-lint@v2.3.1
uses: reviewdog/action-golangci-lint@v2.6.1
with:
golangci_lint_version: "v1.53.2"
golangci_lint_version: "v1.58.0"
golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners"
go_version: "1.20.14"
go_version: "1.21.10"
reporter: "github-pr-review"
tool_name: "Lint Errors"
level: "error"
Expand Down
2 changes: 1 addition & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type StatusProvider interface {
}

func makeHealthHandler(p StatusProvider) func(w http.ResponseWriter, r *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
return func(w http.ResponseWriter, _ *http.Request) {
status, err := p.Status()
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
Expand Down
2 changes: 1 addition & 1 deletion conduit/plugins/importers/filereader/fileReadWrite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func TestRoundTrip(t *testing.T) {
defer cleanArtifacts(t)

round := sdk.Round(0)
lastRound := numGzippedFiles(t) - 2 // subtract round-0 and the separate genesis file
lastRound := numGzippedFiles(t) - 1 // subtract round 0
require.GreaterOrEqual(t, lastRound, uint64(1))
require.LessOrEqual(t, lastRound, uint64(1000)) // overflow sanity check

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
35 changes: 19 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
module github.com/algorand/conduit

go 1.20
go 1.21

toolchain go1.21.10

require (
github.com/algorand/go-algorand-sdk/v2 v2.4.0
github.com/algorand/go-algorand-sdk/v2 v2.5.0
github.com/algorand/go-codec/codec v1.1.10
github.com/algorand/indexer/v3 v3.4.0
github.com/algorand/indexer/v3 v3.4.1-0.20240509125535-dcf3a3b0bfd2
github.com/google/uuid v1.3.0
github.com/jackc/pgx/v4 v4.13.0
github.com/jackc/pgx/v4 v4.18.2
github.com/opensearch-project/opensearch-go/v2 v2.3.0
github.com/prometheus/client_golang v1.11.1
github.com/sirupsen/logrus v1.9.3
Expand All @@ -27,8 +29,9 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.8.0+incompatible // indirect
github.com/docker/docker v23.0.4+incompatible // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v24.0.9+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/getkin/kin-openapi v0.107.0 // indirect
Expand All @@ -40,14 +43,14 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/invopop/yaml v0.1.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.10.0 // indirect
github.com/jackc/pgconn v1.14.3 // indirect
github.com/jackc/pgerrcode v0.0.0-20201024163028-a0d42d470451 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.1.1 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.8.1 // indirect
github.com/jackc/puddle v1.1.3 // indirect
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgtype v1.14.0 // indirect
github.com/jackc/puddle v1.3.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/labstack/echo/v4 v4.9.1 // indirect
github.com/labstack/gommon v0.4.0 // indirect
Expand All @@ -73,11 +76,11 @@ require (
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.1.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
)
69 changes: 42 additions & 27 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkg/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ See other subcommands for further built in utilities and information.
Detailed documentation is online: https://github.com/algorand/conduit`,
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
err := runConduitCmdWithConfig(cfg)
if err != nil {
fmt.Fprintf(os.Stderr, "\nExiting with error:\t%s.\n", err)
os.Exit(1)
}
},
PersistentPreRun: func(cmd *cobra.Command, args []string) {
PersistentPreRun: func(_ *cobra.Command, _ []string) {
if vFlag {
fmt.Printf("%s\n", version.LongVersion())
os.Exit(0)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/internal/initialize/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ directory and additional help is written to stdout.
Once configured, launch conduit with './conduit -d /path/to/data'.`,
Example: "conduit init -d /path/to/data -i importer -p processor1,processor2 -e exporter",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
if data == "" {
return writeConfigFile(os.Stdout, importer, processors, exporter)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/internal/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Example:
conduit list importers algod
conduit list processors filter_processor`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
printAll()
return nil
},
Expand All @@ -41,7 +41,7 @@ func makeDetailsCommand(pluginType string, data func() []plugins.Metadata) *cobr
Short: fmt.Sprintf("Usage details for %s plugins.", pluginType),
Long: fmt.Sprintf(`Usage details for %s plugins. Pass in a specific plugin as a positional argument for a sample configuration file.`, pluginType),
Args: cobra.MaximumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
if len(args) == 0 {
printMetadata(os.Stdout, data(), 0)
} else {
Expand Down

0 comments on commit 7738e4e

Please sign in to comment.