ava-labs / avalanchego

Go implementation of an Avalanche node.
https://avax.network
BSD 3-Clause "New" or "Revised" License
2.09k stars 646 forks source link

[antithesis] Enable workload instrumentation #3059

Closed marun closed 1 month ago

marun commented 1 month ago

Why this should be merged

The Antithesis test setups currently use regex matches on log output to trigger fault injection (by matching on output indicating that test setup was completed) and record desired test properties (e.g. by matching on output indicating that an X-Chain transaction was verified). The configuration of this matching is currently stored on Antithesis infrastructure and only accessible to Antithesis personal.

This changeset uses the Antithesis SDK to explicitly signal events so that the use of potentially unreliable regex matching can be avoided and so that the workload for a test setup can have more control over test execution and analysis. The use of the SDK's assertions by the workload requires the workload binary to be optionally instrumented as per the example of the node binary.

How this works

How this was tested

marun commented 1 month ago

Is there a reason why we need to update the docker images in this PR to support using the antithesis sdk in the workloads? Or are those separate changes

The Dockerfile changes enables instrumentation for the workload images which is required to use antithesis assertions.

Edit: Updated the description to hopefully make this clear, PTAL

StephenButtolph commented 1 month ago

I made a PR to add a number of additional assertions: https://github.com/ava-labs/avalanchego/pull/3064