Skip to content

Commit a976b91

Browse files
Fix wiz (#2946)
* fix sig agg * update sig agg version * sig agg changes * sig agg changes * sig agg changes * fix CI issues * bump go.mod deps * start fixing e2e * more lint fixes * nit * fix tmpnet runtime config initialization Simplify avalanche-go binary path configuration by setting it on the default runtime config instead of iterating through all nodes. Also handle case where Process config might be nil. * improve file operations and add db caching - Add db cache directory creation and management - Implement caching for avalanchego database downloads with 7-day TTL - Refactor file copy operations to use streaming for memory efficiency - Extract and expose archive extraction utilities for reuse - Add proper error handling and logging for cache operations * fix cached db file path extension Add .tar.gz extension to cached database file path to ensure proper file type identification and handling. * bump avalanchego dependency and simplify network ID retrieval - Update avalanchego to v1.13.3-0.20250911181736-31dcd1ea2540 - Remove local avalanchego replace directive - Simplify GetTmpNetNetworkID to use network.GetNetworkID() directly - Remove unused GetTmpNetNodeNetworkID function * add network ID migration for config files Implements migration logic to set NetworkID in network config files when missing, using old tmpnet network ID retrieval logic for backward compatibility. * refactor: reorganize ERC20 functionality and update test suite Moved ERC20 implementation from pkg/ictt/erc20.go to new pkg/erc20/ package structure and updated all references across commands and tests. Removed obsolete SOV public subnet test suite and updated E2E test configurations accordingly. * migrate blockchain configs from file-based to content-based storage - Add migrateNodeBlockchainConfigs function to migration.go for converting file-based chain configs to ChainConfigContentKey - Update tmpnet.go to use ChainConfigContentKey instead of ChainConfigDirKey for blockchain configurations - Remove file-based blockchain config directory setup and operations - Add cleanup of binary files in package manager test suite * remove unused chain config copying in AddNodeToLocalCluster Removes the manual copying of chain config files when adding a new node to the local cluster, along with unused imports for filepath and dircopy. The chain configuration is now handled through content-based storage. Signed-off-by: Felipe Madero <felipe.madero@gmail.com> * improve port management and fix import ordering - Add dynamic port allocation for ICM relayer metrics to avoid conflicts - Implement FindAvailablePort utility function for port discovery - Fix import ordering in whitelist.go to follow Go conventions Signed-off-by: Felipe Madero <felipe.madero@gmail.com> * fix acp-support string formatting in test assertions Update ContainSubstring calls to use proper string formatting for acp-support values in log file assertions. * use main branchs of SDK + ANR * fix wiz command for sovereign subnets and improve error handling - Skip subnet validation for sovereign subnets in wiz command - Add skipICMDeploy parameter to blockchain deploy - Improve relayer host null checking in start/stop commands - Update C-chain genesis generation for devnet - Fix dependencies version lookup for devnet networks - Remove unused validator weight validation - Enhance docker build error messages * fix nil pointer check in vmcAtL1 flag lookup Handle case where flag lookup returns nil by checking for nil before accessing flag.Changed property. * update Go version to 1.23.9 and simplify Docker base image - Bump BuildEnvGolangVersion from 1.22.1 to 1.23.9 in constants - Remove bullseye suffix from Docker golang base image in buildCustomVM script --------- Signed-off-by: Felipe Madero <felipe.madero@gmail.com> Co-authored-by: Raymond Sukanto <rsukanto@umich.edu>
1 parent 417a07d commit a976b91

File tree

11 files changed

+100
-101
lines changed

11 files changed

+100
-101
lines changed

cmd/blockchaincmd/add_validator.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ var (
6161
errNoSubnetID = errors.New("failed to find the subnet ID for this subnet, has it been deployed/created on this network?")
6262
errMutuallyExclusiveDurationOptions = errors.New("--use-default-duration/--use-default-validator-params and --staking-period are mutually exclusive")
6363
errMutuallyExclusiveStartOptions = errors.New("--use-default-start-time/--use-default-validator-params and --start-time are mutually exclusive")
64-
errMutuallyExclusiveWeightOptions = errors.New("--use-default-validator-params and --weight are mutually exclusive")
6564
ErrNotPermissionedSubnet = errors.New("subnet is not permissioned")
6665
clusterNameFlagValue string
6766
createLocalValidator bool
@@ -757,9 +756,6 @@ func CallAddValidatorNonSOV(
757756
if useDefaultStartTime && startTimeStr != "" {
758757
return errMutuallyExclusiveStartOptions
759758
}
760-
if useDefaultWeight && weight != 0 {
761-
return errMutuallyExclusiveWeightOptions
762-
}
763759

764760
if outputTxPath != "" {
765761
if utils.FileExists(outputTxPath) {

cmd/blockchaincmd/deploy.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,15 @@ func CallDeploy(
235235
useLedgerParam bool,
236236
useEwoqParam bool,
237237
sameControlKeyParam bool,
238+
skipICMDeploy bool,
238239
) error {
239240
subnetOnly = subnetOnlyParam
240241
globalNetworkFlags = networkFlags
241242
sameControlKey = sameControlKeyParam
242243
keyName = keyNameParam
243244
useLedger = useLedgerParam
244245
useEwoq = useEwoqParam
246+
icmSpec.SkipICMDeploy = skipICMDeploy
245247
return deployBlockchain(cmd, []string{blockchainName})
246248
}
247249

@@ -869,7 +871,7 @@ func deployBlockchain(cmd *cobra.Command, args []string) error {
869871
if sidecar.Sovereign {
870872
externalVmcDeploy := !vmcAtL1 || vmcChainFlags.Defined()
871873

872-
if flag := cmd.Flags().Lookup(vmcAtL1FlagName); flag != nil && !flag.Changed && !vmcChainFlags.Defined() {
874+
if flag := cmd.Flags().Lookup(vmcAtL1FlagName); (flag == nil || !flag.Changed) && !vmcChainFlags.Defined() {
873875
if network.Kind == models.Local {
874876
externalVmcDeploy = false
875877
} else {

cmd/interchaincmd/relayercmd/start.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,14 @@ func CallStart(_ []string, flags StartFlags, network models.Network) error {
7979
if err != nil {
8080
return err
8181
}
82-
if err := ssh.RunSSHStartICMRelayerService(host); err != nil {
83-
return err
82+
if host != nil {
83+
if err := ssh.RunSSHStartICMRelayerService(host); err != nil {
84+
return err
85+
}
86+
ux.Logger.GreenCheckmarkToUser("Remote AWM Relayer on %s successfully started", host.GetCloudID())
87+
} else {
88+
ux.Logger.PrintToUser("No ICM relayer host found on cluster %s", network.ClusterName)
8489
}
85-
ux.Logger.GreenCheckmarkToUser("Remote AWM Relayer on %s successfully started", host.GetCloudID())
8690
default:
8791
if relayerIsUp, _, _, err := relayer.RelayerIsUp(
8892
app.GetLocalRelayerRunPath(network.Kind),

cmd/interchaincmd/relayercmd/stop.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,14 @@ func CallStop(_ []string, flags StopFlags, network models.Network) error {
6767
if err != nil {
6868
return err
6969
}
70-
if err := ssh.RunSSHStopICMRelayerService(host); err != nil {
71-
return err
70+
if host != nil {
71+
if err := ssh.RunSSHStopICMRelayerService(host); err != nil {
72+
return err
73+
}
74+
ux.Logger.GreenCheckmarkToUser("Remote AWM Relayer on %s successfully stopped", host.GetCloudID())
75+
} else {
76+
ux.Logger.PrintToUser("No ICM relayer host found on cluster %s", network.ClusterName)
7277
}
73-
ux.Logger.GreenCheckmarkToUser("Remote AWM Relayer on %s successfully stopped", host.GetCloudID())
7478
default:
7579
b, _, _, err := relayer.RelayerIsUp(
7680
app.GetLocalRelayerRunPath(network.Kind),

cmd/nodecmd/create_devnet.go

Lines changed: 16 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ import (
2525
sdkutils "github.com/ava-labs/avalanche-tooling-sdk-go/utils"
2626
"github.com/ava-labs/avalanchego/config"
2727
avago_upgrade "github.com/ava-labs/avalanchego/upgrade"
28-
avago_constants "github.com/ava-labs/avalanchego/utils/constants"
2928
"github.com/ava-labs/avalanchego/utils/crypto/bls/signer/localsigner"
3029
"github.com/ava-labs/avalanchego/utils/formatting"
3130
"github.com/ava-labs/avalanchego/utils/logging"
3231
"github.com/ava-labs/avalanchego/vms/platformvm/signer"
32+
"github.com/ava-labs/libevm/common"
33+
"github.com/ava-labs/libevm/core"
3334
"github.com/ava-labs/subnet-evm/params"
34-
"github.com/ava-labs/subnet-evm/params/extras"
35-
subnetevmutils "github.com/ava-labs/subnet-evm/utils"
3635

3736
"golang.org/x/exp/maps"
3837
"golang.org/x/exp/slices"
@@ -45,52 +44,28 @@ const (
4544
defaultLocalCChainFundedAddress = "8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC"
4645
defaultLocalCChainFundedBalance = "0x295BE96E64066972000000"
4746
allocationCommonEthAddress = "0xb3d82b1367d362de99ab59a658165aff520cbd4d"
47+
defaultGasLimit = uint64(100_000_000) // Gas limit is arbitrary
4848
)
4949

5050
//go:embed upgrade.json
5151
var upgradeBytes []byte
5252

53+
var defaultFundedKeyCChainAmount = new(big.Int).Exp(big.NewInt(10), big.NewInt(30), nil)
54+
5355
func generateCustomCchainGenesis() ([]byte, error) {
54-
chainConfig := &params.ChainConfig{
55-
ChainID: big.NewInt(43112),
56-
HomesteadBlock: big.NewInt(0),
57-
DAOForkBlock: big.NewInt(0),
58-
DAOForkSupport: true,
59-
EIP150Block: big.NewInt(0),
60-
EIP155Block: big.NewInt(0),
61-
EIP158Block: big.NewInt(0),
62-
ByzantiumBlock: big.NewInt(0),
63-
ConstantinopleBlock: big.NewInt(0),
64-
PetersburgBlock: big.NewInt(0),
65-
IstanbulBlock: big.NewInt(0),
66-
MuirGlacierBlock: big.NewInt(0),
67-
}
68-
agoUpgrade := avago_upgrade.GetConfig(avago_constants.LocalID)
69-
params.GetExtra(chainConfig).NetworkUpgrades = extras.NetworkUpgrades{
70-
SubnetEVMTimestamp: subnetevmutils.NewUint64(0),
71-
DurangoTimestamp: subnetevmutils.TimeToNewUint64(agoUpgrade.DurangoTime),
72-
EtnaTimestamp: subnetevmutils.TimeToNewUint64(agoUpgrade.EtnaTime),
73-
FortunaTimestamp: nil, // Fortuna is optional and has no effect on Subnet-EVM
74-
GraniteTimestamp: nil, // Granite is optional and has no effect on Subnet-EVM
56+
cChainBalances := make(core.GenesisAlloc, 1)
57+
cChainBalances[common.HexToAddress(defaultLocalCChainFundedAddress)] = core.GenesisAccount{
58+
Balance: defaultFundedKeyCChainAmount,
7559
}
76-
cChainGenesisMap := map[string]interface{}{}
77-
cChainGenesisMap["config"] = chainConfig
78-
cChainGenesisMap["nonce"] = hexa0Str
79-
cChainGenesisMap["timestamp"] = hexa0Str
80-
cChainGenesisMap["extraData"] = "0x00"
81-
cChainGenesisMap["gasLimit"] = "0x5f5e100"
82-
cChainGenesisMap["difficulty"] = hexa0Str
83-
cChainGenesisMap["mixHash"] = "0x0000000000000000000000000000000000000000000000000000000000000000"
84-
cChainGenesisMap["coinbase"] = "0x0000000000000000000000000000000000000000"
85-
cChainGenesisMap["alloc"] = map[string]interface{}{
86-
defaultLocalCChainFundedAddress: map[string]interface{}{
87-
"balance": defaultLocalCChainFundedBalance,
88-
},
60+
chainID := big.NewInt(43112)
61+
cChainGenesis := &core.Genesis{
62+
Config: &params.ChainConfig{ChainID: chainID}, // The rest of the config is set in coreth on VM initialization
63+
Difficulty: big.NewInt(0), // Difficulty is a mandatory field
64+
Timestamp: uint64(avago_upgrade.InitiallyActiveTime.Unix()), // This time enables Avalanche upgrades by default
65+
GasLimit: defaultGasLimit,
66+
Alloc: cChainBalances,
8967
}
90-
cChainGenesisMap["number"] = hexa0Str
91-
cChainGenesisMap["gasUsed"] = hexa0Str
92-
cChainGenesisMap["parentHash"] = "0x0000000000000000000000000000000000000000000000000000000000000000"
93-
return json.Marshal(cChainGenesisMap)
68+
return json.Marshal(cChainGenesis)
9469
}
9570

9671
func generateCustomGenesis(

cmd/nodecmd/deploy.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ func deploySubnet(cmd *cobra.Command, args []string) error {
7979
useLedgerParam := false
8080
useEwoqParam := true
8181
sameControlKey := true
82+
skipICMDeploy := true
8283

8384
if err := blockchaincmd.CallDeploy(
8485
cmd,
@@ -89,6 +90,7 @@ func deploySubnet(cmd *cobra.Command, args []string) error {
8990
useLedgerParam,
9091
useEwoqParam,
9192
sameControlKey,
93+
skipICMDeploy,
9294
); err != nil {
9395
return err
9496
}

cmd/nodecmd/wiz.go

Lines changed: 54 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ The node wiz command creates a devnet and deploys, sync and validate a subnet in
103103
cmd.Flags().StringVar(&cmdLineGCPProjectName, "gcp-project", "", "use given GCP project")
104104
cmd.Flags().StringVar(&cmdLineAlternativeKeyPairName, "alternative-key-pair-name", "", "key pair name to use if default one generates conflicts")
105105
cmd.Flags().StringVar(&awsProfile, "aws-profile", constants.AWSDefaultCredential, "aws profile to use")
106-
cmd.Flags().BoolVar(&defaultValidatorParams, "default-validator-params", false, "use default weight/start/duration params for subnet validator")
106+
cmd.Flags().BoolVar(&defaultValidatorParams, "default-validator-params", true, "use default weight/start/duration params for subnet validator")
107107
cmd.Flags().BoolVar(&forceSubnetCreate, "force-subnet-create", false, "overwrite the existing subnet configuration if one exists")
108108
cmd.Flags().StringVar(&subnetGenesisFile, "subnet-genesis", "", "file path of the subnet genesis")
109109
cmd.Flags().BoolVar(&icmReady, "teleporter", false, "generate an icm-ready vm")
@@ -290,20 +290,23 @@ func wiz(cmd *cobra.Command, args []string) error {
290290
return err
291291
}
292292

293-
ux.Logger.PrintToUser("")
294-
ux.Logger.PrintToUser("%s", logging.Green.Wrap("Adding nodes as subnet validators"))
295-
ux.Logger.PrintToUser("")
296-
avoidSubnetValidationChecks = true
297-
useEwoq = true
298-
if err := validateSubnet(cmd, []string{clusterName, subnetName}); err != nil {
293+
sc, err := app.LoadSidecar(subnetName)
294+
if err != nil {
299295
return err
300296
}
301297

302-
network, err := app.GetClusterNetwork(clusterName)
303-
if err != nil {
304-
return err
298+
if !sc.Sovereign {
299+
ux.Logger.PrintToUser("")
300+
ux.Logger.PrintToUser("%s", logging.Green.Wrap("Adding nodes as subnet validators"))
301+
ux.Logger.PrintToUser("")
302+
avoidSubnetValidationChecks = true
303+
useEwoq = true
304+
if err := validateSubnet(cmd, []string{clusterName, subnetName}); err != nil {
305+
return err
306+
}
305307
}
306-
sc, err := app.LoadSidecar(subnetName)
308+
309+
network, err := app.GetClusterNetwork(clusterName)
307310
if err != nil {
308311
return err
309312
}
@@ -312,11 +315,13 @@ func wiz(cmd *cobra.Command, args []string) error {
312315
return constants.ErrNoSubnetID
313316
}
314317

315-
ux.Logger.PrintToUser("")
316-
ux.Logger.PrintToUser("%s", logging.Green.Wrap("Waiting for nodes to be validating the subnet"))
317-
ux.Logger.PrintToUser("")
318-
if err := waitForSubnetValidators(network, clusterName, subnetID, validateCheckTimeout, validateCheckPoolTime); err != nil {
319-
return err
318+
if !sc.Sovereign {
319+
ux.Logger.PrintToUser("")
320+
ux.Logger.PrintToUser("%s", logging.Green.Wrap("Waiting for nodes to be validating the subnet"))
321+
ux.Logger.PrintToUser("")
322+
if err := waitForSubnetValidators(network, clusterName, subnetID, validateCheckTimeout, validateCheckPoolTime); err != nil {
323+
return err
324+
}
320325
}
321326

322327
isEVMGenesis, _, err := app.HasSubnetEVMGenesis(subnetName)
@@ -341,6 +346,7 @@ func wiz(cmd *cobra.Command, args []string) error {
341346
if err != nil {
342347
return err
343348
}
349+
relayerVersion = strings.Replace(relayerVersion, "icm-relayer-", "", 1)
344350
if err := setICMRelayerHost(awmRelayerHost, relayerVersion); err != nil {
345351
return err
346352
}
@@ -356,15 +362,18 @@ func wiz(cmd *cobra.Command, args []string) error {
356362
}
357363
}
358364

359-
ux.Logger.PrintToUser("")
360-
ux.Logger.PrintToUser("%s", logging.Green.Wrap("Setting the nodes as subnet trackers"))
361-
ux.Logger.PrintToUser("")
362-
if err := syncSubnet(cmd, []string{clusterName, subnetName}); err != nil {
363-
return err
364-
}
365-
if err := node.WaitForHealthyCluster(app, clusterName, healthCheckTimeout, healthCheckPoolTime); err != nil {
366-
return err
365+
if !sc.Sovereign {
366+
ux.Logger.PrintToUser("")
367+
ux.Logger.PrintToUser("%s", logging.Green.Wrap("Setting the nodes as subnet trackers"))
368+
ux.Logger.PrintToUser("")
369+
if err := syncSubnet(cmd, []string{clusterName, subnetName}); err != nil {
370+
return err
371+
}
372+
if err := node.WaitForHealthyCluster(app, clusterName, healthCheckTimeout, healthCheckPoolTime); err != nil {
373+
return err
374+
}
367375
}
376+
368377
blockchainID := sc.Networks[network.Name()].BlockchainID
369378
if blockchainID == ids.Empty {
370379
return constants.ErrNoBlockchainID
@@ -376,30 +385,35 @@ func wiz(cmd *cobra.Command, args []string) error {
376385
return err
377386
}
378387
}
379-
if err := waitForClusterSubnetStatus(clusterName, subnetName, blockchainID, status.Validating, validateCheckTimeout, validateCheckPoolTime); err != nil {
380-
return err
381-
}
382388

383-
if b, err := hasICMDeploys(clusterName); err != nil {
384-
return err
385-
} else if b {
386-
ux.Logger.PrintToUser("")
387-
ux.Logger.PrintToUser("%s", logging.Green.Wrap("Updating Proposer VMs"))
388-
ux.Logger.PrintToUser("")
389-
if err := updateProposerVMs(network); err != nil {
390-
// not going to consider fatal, as icm messaging will be working fine after a failed first msg
391-
ux.Logger.PrintToUser(logging.Yellow.Wrap("failure setting proposer: %s"), err)
389+
if !sc.Sovereign {
390+
if err := waitForClusterSubnetStatus(clusterName, subnetName, blockchainID, status.Validating, validateCheckTimeout, validateCheckPoolTime); err != nil {
391+
return err
392+
}
393+
394+
if b, err := hasICMDeploys(clusterName); err != nil {
395+
return err
396+
} else if b {
397+
ux.Logger.PrintToUser("")
398+
ux.Logger.PrintToUser("%s", logging.Green.Wrap("Updating Proposer VMs"))
399+
ux.Logger.PrintToUser("")
400+
if err := updateProposerVMs(network); err != nil {
401+
// not going to consider fatal, as icm messaging will be working fine after a failed first msg
402+
ux.Logger.PrintToUser(logging.Yellow.Wrap("failure setting proposer: %s"), err)
403+
}
392404
}
393405
}
394406

395407
if sc.TeleporterReady && sc.RunRelayer && isEVMGenesis {
396408
ux.Logger.PrintToUser("")
397409
ux.Logger.PrintToUser("%s", logging.Green.Wrap("Setting up ICM on subnet"))
398410
ux.Logger.PrintToUser("")
411+
chainSpec := contract.ChainSpec{
412+
BlockchainName: subnetName,
413+
}
414+
chainSpec.SetEnabled(true, true, false, false, false)
399415
flags := messengercmd.DeployFlags{
400-
ChainFlags: contract.ChainSpec{
401-
BlockchainName: subnetName,
402-
},
416+
ChainFlags: chainSpec,
403417
PrivateKeyFlags: contract.PrivateKeyFlags{
404418
KeyName: constants.ICMKeyName,
405419
},
@@ -416,7 +430,7 @@ func wiz(cmd *cobra.Command, args []string) error {
416430
RegistryBydecodePath: icmRegistryBydecodePath,
417431
IncludeCChain: true,
418432
}
419-
if err := messengercmd.CallDeploy([]string{}, flags, models.UndefinedNetwork); err != nil {
433+
if err := messengercmd.CallDeploy([]string{}, flags, network); err != nil {
420434
return err
421435
}
422436
ux.Logger.PrintToUser("")

pkg/constants/constants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const (
162162
AvalancheGoLokiPort = 23101
163163
CloudServerStorageSize = 1000
164164
MonitoringCloudServerStorageSize = 50
165-
BuildEnvGolangVersion = "1.22.1"
165+
BuildEnvGolangVersion = "1.23.9"
166166
AnsibleInventoryDir = "inventories"
167167
AnsibleSSHShellParams = "-o IdentitiesOnly=yes -o StrictHostKeyChecking=no"
168168
AnsibleSSHUseAgentParams = "-o StrictHostKeyChecking=no"

pkg/dependencies/dependencies.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ import (
88
"fmt"
99
"strconv"
1010

11+
"github.com/ava-labs/avalanche-cli/pkg/application"
12+
"github.com/ava-labs/avalanche-cli/pkg/constants"
13+
"github.com/ava-labs/avalanche-cli/pkg/models"
1114
"github.com/ava-labs/avalanche-cli/pkg/subnet"
1215
"github.com/ava-labs/avalanche-cli/pkg/ux"
1316

1417
"golang.org/x/mod/semver"
15-
16-
"github.com/ava-labs/avalanche-cli/pkg/models"
17-
18-
"github.com/ava-labs/avalanche-cli/pkg/application"
19-
"github.com/ava-labs/avalanche-cli/pkg/constants"
2018
)
2119

2220
var ErrNoAvagoVersion = errors.New("unable to find a compatible avalanchego version")
@@ -50,7 +48,11 @@ func GetLatestCLISupportedDependencyVersion(app *application.Avalanche, dependen
5048
*rpcVersion,
5149
)
5250
}
53-
return parsedDependency.AvalancheGo[network.Name()].LatestVersion, nil
51+
depNetworkName := network.Name()
52+
if network.Kind == models.Devnet {
53+
depNetworkName = "DevNet"
54+
}
55+
return parsedDependency.AvalancheGo[depNetworkName].LatestVersion, nil
5456
case constants.SubnetEVMRepoName:
5557
return parsedDependency.SubnetEVM, nil
5658
case constants.SignatureAggregatorRepoName:

pkg/docker/image.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func BuildDockerImage(host *models.Host, image string, path string, dockerfile s
6666
cmd := fmt.Sprintf("cd %s && docker build -q --build-arg GO_VERSION=%s -t %s -f %s .", path, goVersion, image, dockerfile)
6767
_, err = host.Command(cmd, nil, constants.SSHLongRunningScriptTimeout)
6868
if err != nil {
69-
return fmt.Errorf("failed to build docker image %s: %w", image, err)
69+
return fmt.Errorf("failed to build docker image %s with command '%s': %w", image, cmd, err)
7070
}
7171
return nil
7272
}

0 commit comments

Comments
 (0)