Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump go 1.24.0 #5143

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/broken-link-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- .github/workflows/broken-link-checker.yml

env:
GO_VER: 1.23.6
GO_VER: 1.24.0

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- v3.*

env:
GO_VER: 1.23.6
GO_VER: 1.24.0
UBUNTU_VER: 22.04
FABRIC_VER: ${{ github.ref_name }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
env:
GOPATH: /opt/go
PATH: /opt/go/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
GO_VER: 1.23.6
GO_VER: 1.24.0

permissions:
contents: read # to fetch code (actions/checkout)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vulnerability-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.6
go-version: 1.24.0
- name: Scan
run: make scan
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ METADATA_VAR += CommitSHA=$(EXTRA_VERSION)
METADATA_VAR += BaseDockerLabel=$(BASE_DOCKER_LABEL)
METADATA_VAR += DockerNamespace=$(DOCKER_NS)

GO_VER = 1.23.6
GO_VER = 1.24.0
GO_TAGS ?=

RELEASE_EXES = orderer $(TOOLS_EXES)
Expand Down
4 changes: 2 additions & 2 deletions common/policies/implicitmeta.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (imp *ImplicitMetaPolicy) EvaluateSignedData(signatureSet []*protoutil.Sign
b.WriteString(" ")
}
b.WriteString("]")
logger.Debugf(b.String())
logger.Debug(b.String())
}
}
}()
Expand Down Expand Up @@ -126,7 +126,7 @@ func (imp *ImplicitMetaPolicy) EvaluateIdentities(identities []msp.Identity) err
b.WriteString(" ")
}
b.WriteString("]")
logger.Debugf(b.String())
logger.Debug(b.String())
}()

for _, policy := range imp.SubPolicies {
Expand Down
3 changes: 1 addition & 2 deletions core/committer/txvalidator/v14/vscc_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,7 @@ func (v *VsccValidatorImpl) GetInfoForValidate(chdr *common.ChannelHeader, ccID
// obtain name of the VSCC and the policy
cd, err := v.getCDataForCC(chdr.ChannelId, ccID)
if err != nil {
msg := fmt.Sprintf("Unable to get chaincode data from ledger for txid %s, due to %s", chdr.TxId, err)
logger.Errorf(msg)
logger.Errorf("Unable to get chaincode data from ledger for txid %s, due to %s", chdr.TxId, err)
return nil, nil, nil, err
}
cc.ChaincodeName = cd.Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ func (v *dispatcherImpl) GetInfoForValidate(chdr *common.ChannelHeader, ccID str
// obtain name of the validation plugin and the policy
plugin, args, err := v.getCDataForCC(chdr.ChannelId, ccID)
if err != nil {
msg := fmt.Sprintf("Unable to get chaincode data from ledger for txid %s, due to %s", chdr.TxId, err)
logger.Errorf(msg)
logger.Errorf("Unable to get chaincode data from ledger for txid %s, due to %s", chdr.TxId, err)
return "", nil, err
}
return plugin, args, nil
Expand Down
2 changes: 1 addition & 1 deletion core/common/validation/statebased/validator_keylevel.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (p *baseEvaluator) checkSBAndCCEP(cc, coll, key string, blockNum, txNum uin
// logged and ignored. The ledger will take the most appropriate action
// when performing its side of the validation.
case *ledger.CollConfigNotDefinedError, *ledger.InvalidCollNameError:
logger.Warningf(errors.WithMessage(err, "skipping key-level validation").Error())
logger.Warning(errors.WithMessage(err, "skipping key-level validation").Error())
// 3) any other type of error should return an execution failure which will
// lead to halting the processing on this channel. Note that any non-categorized
// deterministic error would be caught by the default and would lead to
Expand Down
8 changes: 4 additions & 4 deletions core/common/validation/statebased/vpmanagerimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func (m *KeyLevelValidationParameterManagerImpl) GetValidationParameterForKey(cc
// bail, if the validation parameter has been updated in the meantime
err := vCtx.waitForValidationResults(newLedgerKeyID(cc, coll, key), blockNum, txNum)
if err != nil {
logger.Errorf(err.Error())
logger.Error(err.Error())
return nil, err
}

Expand All @@ -316,7 +316,7 @@ func (m *KeyLevelValidationParameterManagerImpl) GetValidationParameterForKey(cc
state, err := m.StateFetcher.FetchState()
if err != nil {
err = errors.WithMessage(err, "could not retrieve ledger")
logger.Errorf(err.Error())
logger.Error(err.Error())
return nil, err
}
defer state.Done()
Expand All @@ -326,14 +326,14 @@ func (m *KeyLevelValidationParameterManagerImpl) GetValidationParameterForKey(cc
mdMap, err = state.GetStateMetadata(cc, key)
if err != nil {
err = errors.WithMessagef(err, "could not retrieve metadata for %s:%s", cc, key)
logger.Errorf(err.Error())
logger.Error(err.Error())
return nil, err
}
} else {
mdMap, err = state.GetPrivateDataMetadataByHash(cc, coll, []byte(key))
if err != nil {
err = errors.WithMessagef(err, "could not retrieve metadata for %s:%s:%x", cc, coll, []byte(key))
logger.Errorf(err.Error())
logger.Error(err.Error())
return nil, err
}
}
Expand Down
5 changes: 2 additions & 3 deletions core/handlers/library/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
package library

import (
"fmt"
"os"
"plugin"

Expand All @@ -23,11 +22,11 @@ import (
// loadPlugin loads a pluggable handler
func (r *registry) loadPlugin(pluginPath string, handlerType HandlerType, extraArgs ...string) {
if _, err := os.Stat(pluginPath); err != nil {
logger.Panicf(fmt.Sprintf("Could not find plugin at path %s: %s", pluginPath, err))
logger.Panicf("Could not find plugin at path %s: %s", pluginPath, err)
}
p, err := plugin.Open(pluginPath)
if err != nil {
logger.Panicf(fmt.Sprintf("Error opening plugin at path %s: %s", pluginPath, err))
logger.Panicf("Error opening plugin at path %s: %s", pluginPath, err)
}

if handlerType == Auth {
Expand Down
3 changes: 1 addition & 2 deletions core/handlers/library/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: Apache-2.0
package library

import (
"fmt"
"reflect"
"sync"
"time"
Expand Down Expand Up @@ -109,7 +108,7 @@ func (r *registry) loadCompiled(handlerFactory string, handlerType HandlerType,

o := registryMD.MethodByName(handlerFactory)
if !o.IsValid() {
logger.Panicf(fmt.Sprintf("Method %s isn't a method of HandlerLibrary", handlerFactory))
logger.Panicf("Method %s isn't a method of HandlerLibrary", handlerFactory)
}

inst := o.Call(nil)[0].Interface()
Expand Down
2 changes: 1 addition & 1 deletion core/ledger/kvledger/kv_ledger_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func (p *Provider) deleteUnderConstructionLedger(ledger ledger.PeerLedger, ledge
if cleanupErr == nil {
return creationErr
}
return errors.WithMessagef(cleanupErr, creationErr.Error())
return errors.WithMessage(cleanupErr, creationErr.Error())
}

// Open implements the corresponding method from interface ledger.PeerLedgerProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (c *committer) commitUpdates() error {
errorString := fmt.Sprintf("error saving document ID: %v. Error: %s, Reason: %s",
resp.ID, resp.Error, resp.Reason)

logger.Errorf(errorString)
logger.Error(errorString)
return errors.WithMessage(err, errorString)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ func createAttachmentPart(couchDoc *couchDoc) (bytes.Buffer, string, error) {
return *writeBuffer, "", errors.Wrap(err, "error marshalling json data")
}

couchdbLogger.Debugf(string(filesForUpload))
couchdbLogger.Debug(string(filesForUpload))

// create the header for the JSON
header := make(textproto.MIMEHeader)
Expand Down
2 changes: 1 addition & 1 deletion core/peer/deliverevents.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func toFilteredBlock(block *common.Block) (*peer.FilteredBlock, error) {

filteredTransaction.Data, err = transactionActions(tx.Actions).toFilteredActions()
if err != nil {
logger.Errorf(err.Error())
logger.Error(err.Error())
return nil, err
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/source/dev-setup/devenv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Go and SoftHSM are also available from Homebrew, but make sure you install the a

::

brew install go@1.23
brew install go@1.24
brew install softhsm

Docker Desktop must be launched to complete the installation, so be sure to open
Expand Down
4 changes: 2 additions & 2 deletions docs/source/prereqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ Optional: Install the latest Fabric supported version of [Go](https://golang.org
installed (only required if you will be writing Go chaincode or SDK applications).

```shell
brew install go@1.23.6
go version # => go1.23.6 darwin/amd64
brew install go@1.24.0
go version # => go1.24.0 darwin/amd64
```

### JQ
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hyperledger/fabric

go 1.23.6
go 1.24.0

require (
code.cloudfoundry.org/clock v1.15.0
Expand Down
2 changes: 1 addition & 1 deletion gotools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ go.fqp.misspell := github.com/client9/misspell/cmd/misspell
go.fqp.mockery := github.com/vektra/mockery/v2
go.fqp.protoc-gen-go := google.golang.org/protobuf/cmd/protoc-gen-go
go.fqp.protoc-gen-go-grpc := google.golang.org/grpc/cmd/protoc-gen-go-grpc
go.fqp.staticcheck := honnef.co/go/tools/cmd/staticcheck@2024.1.1
go.fqp.staticcheck := honnef.co/go/tools/cmd/staticcheck@2025.1
go.fqp.swagger := github.com/go-swagger/go-swagger/cmd/swagger

.PHONY: gotools-install
Expand Down
2 changes: 1 addition & 1 deletion integration/chaincode/module/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module module

go 1.23
go 1.24

require (
github.com/hyperledger/fabric-chaincode-go/v2 v2.0.0-20240802023949-a356b32676fd
Expand Down
2 changes: 1 addition & 1 deletion msp/mgmt/mgmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func loadLocalMSP(bccsp bccsp.BCCSP) msp.MSP {

newOpts, found := msp.Options[mspType]
if !found {
mspLogger.Panicf("msp type " + mspType + " unknown")
mspLogger.Panicf("msp type %s unknown", mspType)
}

mspInst, err := msp.New(newOpts, bccsp)
Expand Down
2 changes: 1 addition & 1 deletion orderer/consensus/etcdraft/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ func (c *Chain) forwardToLeader(lead uint64, req *orderer.SubmitRequest) error {
}

if atomicErr.Load() != nil {
return errors.Errorf(atomicErr.Load().(string))
return errors.New(atomicErr.Load().(string))
}
return nil
}
Expand Down
22 changes: 11 additions & 11 deletions tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module tools

go 1.23.6
go 1.24.0

require (
github.com/AlekSi/gocov-xml v0.0.0-20190121064608-3a14fb1c4737
Expand All @@ -12,15 +12,15 @@ require (
github.com/onsi/ginkgo/v2 v2.20.2
github.com/vektra/mockery/v2 v2.45.0
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/tools v0.24.0
golang.org/x/tools v0.30.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1
google.golang.org/protobuf v1.34.2
honnef.co/go/tools v0.4.7
honnef.co/go/tools v0.6.0
mvdan.cc/gofumpt v0.1.0
)

require (
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
Expand Down Expand Up @@ -71,13 +71,13 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
github.com/toqueteos/webbrowser v1.2.0 // indirect
go.mongodb.org/mongo-driver v1.5.1 // indirect
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 // indirect
golang.org/x/mod v0.23.0 // indirect
golang.org/x/net v0.35.0 // indirect
golang.org/x/sync v0.11.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/term v0.29.0 // indirect
golang.org/x/text v0.22.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading
Loading