Skip to content
New issue

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

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

Already on GitHub? # to your account

[tmpnet] Add check for vm binaries to network and node start #3273

Merged
merged 5 commits into from
Aug 12, 2024

Conversation

marun
Copy link
Contributor

@marun marun commented Aug 6, 2024

Why this should be merged

Previously, a missing VM binary could fail network start with diagnosis requiring manually reviewing node logs. Now the failure should be obvious.

How this works

  • Adds checks to network and node start for the presence of VM binaries for configured chains

How this was tested

CI for regression, manually for usage:

[SynchronizedBeforeSuite] [FAILED] [0.006 seconds]
[SynchronizedBeforeSuite]
/home/me/src/avalanchego/master/tests/e2e/e2e_test.go:41

  [FAILED]
        Error Trace:    /home/me/src/avalanchego/master/tests/fixture/e2e/helpers.go:197
                                                /home/me/src/avalanchego/master/tests/fixture/e2e/env.go:119
                                                /home/me/src/avalanchego/master/tests/e2e/e2e_test.go:60
                                                /home/me/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.12.linux-arm64/src/reflect/value.go:596
                                                /home/me/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.12.linux-arm64/src/reflect/value.go:380
                                                /home/me/go/pkg/mod/github.com/onsi/ginkgo/v2@v2.13.1/internal/node.go:486
                                                /home/me/go/pkg/mod/github.com/onsi/ginkgo/v2@v2.13.1/internal/suite.go:642
                                                /home/me/go/pkg/mod/github.com/onsi/ginkgo/v2@v2.13.1/internal/suite.go:889
                                                /home/me/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.12.linux-arm64/src/runtime/asm_arm64.s:1197
        Error:          Received unexpected error:
                        failed to check VM binary for subnet "xsvm-a": stat /home/me/.avalanchego/plugins/v3m4wPxaHpvGr8qfMeyK6PRW3idZrPHmYcMTt7oXdK47yurVH: no such file or directory
                        failed to check VM binary for subnet "xsvm-b": stat /home/me/.avalanchego/plugins/v3m4wPxaHpvGr8qfMeyK6PRW3idZrPHmYcMTt7oXdK47yurVH: no such file or directory

  In [SynchronizedBeforeSuite] at: /home/me/go/pkg/mod/github.com/stretchr/testify@v1.8.4/assert/assertions.go:1495 @ 08/06/24 11:30:34.18

@marun marun added the testing This primarily focuses on testing label Aug 6, 2024
@marun marun self-assigned this Aug 6, 2024
tests/fixture/tmpnet/network.go Outdated Show resolved Hide resolved
for _, chain := range subnet.Chains {
pluginPath := filepath.Join(pluginDir, chain.VMID.String())
if _, err := os.Stat(pluginPath); err != nil {
errs = append(errs, fmt.Errorf("failed to check VM binary for subnet %q: %w ", subnet.Name, err))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like there is a trailing space in this error message. Was that intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@StephenButtolph StephenButtolph added this to the v1.11.11 milestone Aug 7, 2024
@marun marun added this pull request to the merge queue Aug 12, 2024
Merged via the queue into master with commit 5196934 Aug 12, 2024
21 checks passed
@marun marun deleted the tmpnet-vm-binaries-exist branch August 12, 2024 17:42
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
testing This primarily focuses on testing
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants